Technical Article

Detection of Broken Forign Key Relationship

  • Script

Under special circumstances, it could happen that database contains "orphan" records. Data in dependant table exists without it's "parent" record in a master table. It could be caused by a bulk insert operation without CHECK_CONSTRAINTS option, or by disabling foreign key for a while or adding a foreign key to a table that already contains […]

5 (1)

You rated this post out of 5. Change rating


193 reads

Technical Article

Rows count for each and every table in a DB 

  • Script

       By using this script one can find number of rows for each and every table in a database. Just cut and past this script in your DB and excute. A stored procedure will be created as 'Get_rowcounts_for_eachtable'. If U excuted this stored procedure, U can get all tablenames and rowcounts for respected […]

You rated this post out of 5. Change rating


584 reads

Technical Article

SP to import to a file

  • Script

Is a SP that imports a table to a file. You just put the table name, the path and the sa password and then you have it. It is important that it parse the table inserted (pubs.dbo.sales for example) and checks that the db, the table with the owner exists

You rated this post out of 5. Change rating


1,675 reads

Technical Article

Encryption Example

  • Script

Here in this T-sql tip I'am trying to compare the word "Hijacker" with two cases(line 3 and 4). Now they are in same when you compare the case (letter to letter), now you change the case of word "Hijacker" in either of the lines and run this SQL statements it will return different results. This […]

You rated this post out of 5. Change rating


667 reads

Technical Article

Granting Access Permissions...

  • Script

Usually when we recreate or rename a table we need to give the appropriate access permissions to the SQL users...this is very common in database under development environment where frequently table structure changes and we have to recreate it....we can accomplish this with Enterprise Manager but what will you do if Enterprise Manager fails to […]

You rated this post out of 5. Change rating


827 reads


How Long Will It Take to Learn SQL? The Truth Might Surprise You


In today's data-driven world, SQL (Structured Query Language) is a blazing-hot skill. It's your...

Flying Halfway Around the World to Australia


I leave tonight for Australia. I was in London 3 days ago, so this...

Dealing with Change – Two Resources


As I look at the state of information technology today, I see one constant:...

Read the latest Blogs


Row-level security in SQL server

By dzukik0711

In this scenario, I seek assistance in implementing row-level permissions for a table named...

SSIS Web Service task SSL errors

By smithloo

I've tried different credentials, target server versions, etc. hitting our Primavera WSDL. Works great...

CDC Custom Alert

By Abdul122

Hi All,   I am writing an alert in a sql agent job, basically...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers