Scripts

Technical Article

Kill Processes in a Database

This script kills all the processes using a given database.  It is useful for removing users from a database so it can be restored.To use this script change the server variable and the database variable at the top of the script.  Notifications are written to the windows application eventlog.Use this script at your own risk. […]

You rated this post out of 5. Change rating

2002-07-12

1,127 reads

Technical Article

Script to create a standby database server.

This script will do a full backup and transaction log backup of all the user database on the primary server and restore it over to the secondary server. The full backup/restore runs once every day and the transaction log backup/restore runs every minutes. Just provide the name of the primary and the secondary server and […]

You rated this post out of 5. Change rating

2002-07-12

531 reads

Technical Article

A new version of RowCount

Hello,Here is a (another one, but improved) stored procedure that returns rowcounts for all tables in the current database, or only for @tablename, if provided. Output can be ordered by name or by number of rows.Improvement : Rowcount is right aligned and formatted with thousand separator.To use it : - open a connection on your […]

You rated this post out of 5. Change rating

2002-07-11

331 reads

Blogs

T-SQL Snapshot Backups on Availability Group Secondary Replicas

By

One of my favourite features of SQL Server 2022 was the T-SQL Snapshot Backups....

The Book of Redgate: Hours

By

I have said and written this many times: Redgate Software is the type of...

How to Check TDE Progress and Elapsed Time in SQL Server

By

How to Check TDE Progress and Elapsed Time in SQL Server ...

Read the latest Blogs

Forums

Squared Values

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Squared Values

I Don't Want To Do XX

By Steve Jones - SSC Editor

Comments posted to this topic are about the item I Don't Want To Do...

Managing Feature Flags with GET_BIT() and SET_BIT() in SQL Server

By john.martin

Comments posted to this topic are about the item Managing Feature Flags with GET_BIT()...

Visit the forum

Question of the Day

Squared Values

What happens when I run this code in SQL Server 2022?

SELECT SQUARE('12')

See possible answers