Backup and restore

Technical Article

Kill all Connections

  • Script

There are times you want to kill all the connections in a database. This would do that trick. This can be very useful when you replace a database regularly and some connections still exist so your automated restore fails. You can issue this command to kill all the connections before issuing a restore command.

You rated this post out of 5. Change rating

2002-04-17

2,426 reads

Technical Article

Check for orphaned user or sid in syslogins

  • Script

When rebuilding a server or setting up a backup or DR server the logins need to be added into master and synchronised with the user databases.Inevitably there are orphaned users is sysusers or the sid's do not match with syslogins.I use this stored procedure to check for a particular user when the user experiences a […]

You rated this post out of 5. Change rating

2002-03-07

792 reads

Technical Article

Perform an action when a file exisits

  • Script

Script to check whether a file exists with todays date and performs an action based on whether the file exisits or not. We use this to check whether backups have completed from another SQL Srver and if they have completed we restoe on a server used for management information

You rated this post out of 5. Change rating

2002-01-09

2,049 reads

Technical Article

Generate Restore DB Scripts from prev backups v1.0

  • Script

Using the the MSDB backup tables, will generate the basic disk RESTORE commands for a database. It will include the Full, differential and all associated log recovery commands for you. Run the stored proc in Query Analyser then copy/alter the output to recover your DB. Great if using EE is not your cup of tea. […]

You rated this post out of 5. Change rating

2002-01-03

372 reads

Technical Article

Fix - Orphaned User Connections

  • Script

Run the '1'-first script.This stored procedures will easily script all the logins and passwords, which will then help you to transfer them to another SQL Server. Run the '2' - Second Script. This will fix the Orphane Connections. Run the '3' - Third Script. Fixing some Orphaned Users left after step 2. NOTE: Script below […]

3 (1)

You rated this post out of 5. Change rating

2001-12-09

2,122 reads

Blogs

Set a Runtime Variable in an Azure DevOps Pipeline

By

Note: I DO NOT recommend this. Any changes to a pipeline should be in...

A New Word: Symptomania

By

symptomania – n. the fantasy that there’s some elaborate diagnosis out there that neatly...

Query Store Keeps Switching Itself Off, Getting it Moving Again

By

I recently received a complaint that Query Store for a particular database was turned...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers