Scripts

Technical Article

Drop all Connections from a Database

On development servers, at times there is a need for dropping and renaming database(s). These scripts can be used for achieving these tasks. The usp_DropDB script will kill the connections to the database and then drop the database. It takes care of the space in the database name, if any and also makes sure that […]

5 (2)

You rated this post out of 5. Change rating

2001-08-08

5,453 reads

Technical Article

Kill All Users in A Given Database

This script will kill all users in a given database. Before disconnecting, it can optionally send the user a NET SEND Message giving them a warning to disconnect. To run, simply call it like usp_killusers 'dbname'. Make sure the @dbname parameter is not the master database.

4.17 (6)

You rated this post out of 5. Change rating

2001-08-08

4,475 reads

Technical Article

Quickly Enable/Disable Triggers and Constraints

When loading data, nothing can be more frustrating than having to deal with stubborn constraints and triggers. This is especially true when you know your data is fine but the constraints are too prohibitive for a mass initial load. Here's a technique I use to disable the constraints and triggers temporarily during a mass load. […]

5 (1)

You rated this post out of 5. Change rating

2001-08-08

3,067 reads

Blogs

T-SQL Tuesday #191: Invitation–Your Favorite String Parsing

By

It’s that time of the month, and I’m late. My apologies. I had a...

Fabric as a Data Mesh Enabler: Rethinking Enterprise Data Distribution

By

For decades, enterprises have approached data management with the same mindset as someone stuffing...

Truncate Table Pitfalls

By

 Truncate Table Pitfalls Truncating a table can be gloriously fast—and spectacularly dangerous when used carelessly....

Read the latest Blogs

Forums

The Improvement Limit

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Improvement Limit

Migrate SSRS Reports to a New Server in Just a Few Clicks

By Kunal Rathi

Comments posted to this topic are about the item Migrate SSRS Reports to a...

Technological Dinosaurs or Social Dinosaurs?

By Grant Fritchey

Comments posted to this topic are about the item Technological Dinosaurs or Social Dinosaurs?

Visit the forum

Question of the Day

DBCC CHECKIDENT

What is returned as a result set when I run this command without a new seed value?

See possible answers