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,353 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,425 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,029 reads

Blogs

Master Advanced SQL: 2 Essential Courses for Every Data Analyst

By

If you're a data analyst, you already know that SQL isn't just a nice-to-have...

Friday Flyway Tips–State-based Deployments

By

Recently the Flyway Desktop (FWD) team release support for state-based deployments. These are similar...

A New Word: Insoucism

By

insoucism – n. the inability to decide how much sympathy your situation really deserves,...

Read the latest Blogs

Forums

The Costs and Rewards of Speaking

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Costs and Rewards of...

Manage Elastic jobs in Azure using Azure Elastic Jobs Manager

By Kunal Rathi

Comments posted to this topic are about the item Manage Elastic jobs in Azure...

Takeaways from Data Grillen 2024

By Tonie Huizer

Comments posted to this topic are about the item Takeaways from Data Grillen 2024

Visit the forum

Question of the Day

Inserting Transaction Marks

When is a transaction mark first inserted into the msdb.dbo.logmarkhistory table?

See possible answers