Scripts

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,418 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,027 reads

Blogs

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

Read the latest Blogs

Forums

Looking for a Recommended Azure SQL Managed Instance Book

By shew

Can anyone recommend an Azure SQL Managed Instance book? I'm looking for information about...

timeout in vs for ssas tabular deploy is 0 but i still timeout deploying

By stan

hi we run 2019 std but i'm testing this on 2016.   following some old...

Table variable declared within cursor persists across loop iterations

By Steve Collins

If you run this code it creates a 2 row cursor loop.  Within the...

Visit the forum

Question of the Day

The Backup File Extension

I run this command in SQL Server 2022. What is the extension of the backup file?

BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'

See possible answers