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

565 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

286 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

478 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 […]

5 (1)

You rated this post out of 5. Change rating

2002-06-14

3,129 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,450 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

799 reads

Blogs

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Read the latest Blogs

Forums

SQL server native CDC

By SQL_Surfer

Have anyone implemented CDC, and if so, what has been your experience with it?...

Import and Export wizard stuck on Guest user

By Sam-263310

I'm getting a error when using the Import and Export wizard to copy tables...

Aligning Compatibility Version Strategy

By BOR15K

I have joined a new project, where the business uses Azure SQL Hyperscale for...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers