Backup and restore

Technical Article

spEasyBackup

  • Script

Database backup made simple. You dont even have to pass any parameters if desired. It will all be handled for you.Capable of Net Send status notifications and writes status message to Windows event log.Side Effects:When not passing any @database params the the backup is done of the database where the proc resides. That means if […]

You rated this post out of 5. Change rating

2002-09-06

571 reads

Technical Article

Script to create a standby database server(new).

  • Script

New feature to relocate files on the secondary server has been added to this script. If you don't need this feature please use my other script that is posted on this website.Run this script on a secondary SQL Server to replicate the data of all the user databases from the primary server every 15 minutes. […]

You rated this post out of 5. Change rating

2002-08-09

296 reads

Technical Article

Script to create a standby database server.

  • Script

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

505 reads

Technical Article

List all Databases and Last Full Backups

  • Script

This script will create a procedure to list all databases on the server (except tempdb), the last time the database was backed up (database backup, not log backups), and a comment which could be customized.  For my purposes, I flag any database which hasn't been backed up in the last week.  This provides a quick […]

(1)

You rated this post out of 5. Change rating

2002-06-14

3,141 reads

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,509 reads

Blogs

Dry-run xp_delete_file Before Actually Deleting Files?

By

Dry-run xp_delete_file Before Actually Deleting Files? xp_delete_file doesn’t really have a...

Happy Thanksgiving! (USA Holiday)

By

In the United States, today is Thanksgiving. The intent behind the holiday is to...

Getting SQL Server 2025 RTM Running in Containers on macOS

By

SQL Server 2025 RTM is here, and if you’re running Docker on macOS, you...

Read the latest Blogs

Forums

Cannot execute SQL cursor in Azure Query Editor (Preview)

By omkarp88

Apologies if this is posted in the wrong forum, but I am trying to...

SQl Server 2014 linked server remote server

By johnnyrmtl

Hello all, I have a linked server created on an instance which only has...

Find all the tables in a database containing particular column value

By RCRock

Hi, I want to find all the tables name under a database where tables...

Visit the forum

Question of the Day

The Ending Substring

In Azure SQL Database and SQL Server 2025, if I run this, what is returned?

SELECT '[' + SUBSTRING('Steve Jones', 7) + ']'

See possible answers