All Columns from user tables and views
This script lists the columns with type and length. It eliminates system tables.
2001-12-13
775 reads
This script lists the columns with type and length. It eliminates system tables.
2001-12-13
775 reads
This script allows the capture of the locks to a table. After the capture, you can see the commands and the moment of the lock.
2001-12-13
2,998 reads
Thanks to Raul Sharma for his brilliant ideas. This is a modification of one of his scripts. The script takes only the user tables. Those tables which does not have PK are not listed!
2001-12-13
743 reads
These 2 files plus sleep.exe (Resource kit) gives an administrator a good view of important blocking statistics in almost a real time fashion. You can use this with profiler to obtain some unique information very fast on a lead blocker if your gathering the right counters in profiler and dumping them in a table and […]
2001-12-10
538 reads
Have you ever wished T-SQL allowed you to pass an array into a stored procedure? Well the spListToTable stored procedure listed below accepts a delimeted string and turns it into a table. Code your stored procedure to accept a varchar, create a temporary table, call spListToTable, and use the populated temporary table as if it […]
2001-12-10
2,861 reads
Run the '1'-first script.This stored procedures will easily script all the logins and passwords, which will then help you to transfer them to another SQL Server. Run the '2' - Second Script. This will fix the Orphane Connections. Run the '3' - Third Script. Fixing some Orphaned Users left after step 2. NOTE: Script below […]
2001-12-09
2,157 reads
There are many times when you might be concatenating text in a stored procedure to make a where clause, because the input parameters are optional. An alternative is to create many versions of the stored procedure - one for each possible combination of parameters - which can soon become too big. There is a more […]
2001-11-25
4,277 reads
I sometimes have to loop through records in a database and perform a specific action on the value that is returned. For example, In the script below I loop through the user tables in sysobjects and simply print them out. This technique is useful when dropping all indices/triggers on a particular table, or adding WITH […]
2001-11-25
9,182 reads
Convert, up to 8 nibbles, hex string ('FFFFFFFF'...'00000000')to signed 32-bit int (-2147483648..2147483647).
2001-11-15
2,455 reads
Convert, up to 16 nibbles, hex ('FFFFFFFFFFFFFFFF'..'0000000000000000') to Signed 64-bit bigint (-9223372036854775808..9223372036854775807).
2001-11-15
663 reads
By Ed Elliott
All Spark Connect Posts I have just finished an update for the spark connect dotnet...
By Steve Jones
One of the things I’ve been experimenting with in AI is taking things other...
By Steve Jones
I’ll be at SQL Bits tomorrow, Saturday Jun 20, 2025 for the final day...
In Azure SQL DB, i want to merge records from the staging table to...
Full error message: SSRS error: The Value for the image 'Image1' has a constant...
We are in the process of upgrading to SQL Server 2022 and would like...
I have a table, called dbo.logger, in SQL Server 2022. I decide to add two new columns to this table with this code.
ALTER TABLE dbo.logger ADD CreateDate DATETIME CONSTRAINT dfGetDate DEFAULT GETDATE() GO ALTER TABLE dbo.logger ADD ModifyDate DATETIME DEFAULT dfGetDate GOWhat happens when I run these two batches? See possible answers