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.

(6)

You rated this post out of 5. Change rating

2001-08-08

4,490 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. […]

(1)

You rated this post out of 5. Change rating

2001-08-08

3,088 reads

Blogs

Why Database AI Agents need Layers?

By

Third part in my Ai series with databases. When building AI solutions within the...

Un-Migrating From the Cloud: T-SQL Tuesday #199

By

This month we have a very interesting invitation from Koen Verbeeck. He has hosted...

T-SQL Tuesday #199: Back to the on-prem

By

It’s the second tuesday of the month, which means T-SQL Tuesday time! This month’s...

Read the latest Blogs

Forums

Unable to restrict permission

By LearningDBA

I have 13 restricted views in my EDW DB. 6 of them are created...

Install SQL Scripts via GUI Wizard

By Jörg

Hallo all! My problem is this: I have quite a bunch of TSQL scripts...

Would You Retire Rather Than ...

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Would You Retire Rather Than...

Visit the forum

Question of the Day

Converting Money

Does this run successfully on a SQL Server 2022, US English default installation?

DECLARE @YenAmount MONEY;
SET @YenAmount = ¥1500; 

SELECT @YenAmount AS RawValue;

See possible answers