Miscellaneous

Technical Article

Get all user information at the database level

  • Script

This is based on Clint Herring's work and was better than what I was using ;). It has one user definded variable @path that is where to store the files generated. It will make one file per database and one master file to restore all user permissions into that database. Used mostly for DR and […]

You rated this post out of 5. Change rating

2005-03-30 (first published: )

1,024 reads

Technical Article

alert on blocking chains via email

  • Script

This is a script I use to watch for blocking chains on a server there are four variables to be set. @Duration tells it how long to run. This will be an active thread for the duration. @IntervalSec how often to poll for blocking. @maxwaittime time in miliseconds a thread that is blocked that you […]

(1)

You rated this post out of 5. Change rating

2004-09-01 (first published: )

1,799 reads

Technical Article

Generate all user stored procedures in all dbs

  • Script

This generates all user stored procedures in all databases to aid in QA loads and DR situations. No OLE or DMO. has one configureable variable @path for storing the scripts. Also generates an osql script to run for each database.

You rated this post out of 5. Change rating

2004-08-31 (first published: )

428 reads

Technical Article

Search for text in procedures and show context

  • Script

This script will search for text within stored procedures and udf's. As a bonus, it will also diplay a user-configurable number of lines from each stored proc to show the search text "in context" so you can tell if it is something you need to deal with without having to open every proc manually.

You rated this post out of 5. Change rating

2004-08-30 (first published: )

253 reads

Technical Article

Run DTS Pkg from VBScript (with progress dialog)

  • Script

This script will run a DTS package from any registered SQL Server instance and display the standard package execution progress dialog while the package is running.To specify the SQL Server instance and package to run, amend the parameters for the ExecuteDTS function in the "Main Program" section of the script.The script is written using SQL […]

You rated this post out of 5. Change rating

2004-08-03 (first published: )

1,070 reads

Technical Article

Bulk Insert proc to try out ur optimization skills

  • Script

This SP can be used for bulk inserting data from an ascii text file onto a table. You have to change the structure, of the temporary table (ITEM_MASTER_TEMP) and the actual table onto which data is inserted, to suit ur needs . I wish you people workout this SP and try to optimize it as […]

You rated this post out of 5. Change rating

2004-08-26 (first published: )

203 reads

Technical Article

Remove multiple whitespace from a string

  • Script

Simple enough routine that I've had to write I don't know how many times in different languages. It does what it says in the title i.e. kills multiple occurences of the whitespace character, leaving one behind to tell the tale.

You rated this post out of 5. Change rating

2004-09-20 (first published: )

143 reads

Technical Article

Modified sp_who - more info & extra parameter

  • Script

This procedure, sp_who3, is based on the system-supplied sp_who2, but is modified to return the actual text of the commands executed by each spid.  Very helpful for troubleshooting!  In addition, I have added a @hostname parameter to allow the user the option of viewing activity originating from only one computer, if desired.

You rated this post out of 5. Change rating

2004-05-06

653 reads

Blogs

Runing tSQLt Tests with Claude

By

Running tSQLt unit tests is great from Visual Studio but my development workflow...

Getting Your Data GenAI-Ready: The Next Stage of Data Maturity

By

I remember a meeting where a client’s CEO leaned in and asked me, “So,...

Learn Better: Pause to Review More

By

If you want to learn better, pause more in your learning to intentionally review.

Read the latest Blogs

Forums

The Long Name

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Long Name

Eight Minutes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Eight Minutes

T-SQL in SQL Server 2025: Fuzzy String Search I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item T-SQL in SQL Server 2025:...

Visit the forum

Question of the Day

The Long Name

I run this code to create a table:Create table with unicode nameWhen I check the length, I get these results:Table with length of name shown as 132 charactersA table name is limited to 128 characters. How does this work?

See possible answers