SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Database Snapshot Create/Drop/Restore SQL Script.

By SQL Master,

Database Snapshot Creat/Drop/Restore SQL Script for Single or multiple data files of databases. The four steps are described in the script, but here are the summaries:

  1. This SQL script to create database snapshot for ALL databases having a single data file except system DBs. It generates the SQL Query as OUTPUT.
  2. This SQL script to create database snapshot for ALL databases having a multiple data file except system DBs. It generates the SQL Query as OUTPUT.
  3. DROP the created database snapshots (Pl. make changes in sql query acc. to your requirements.)
  4. Restore data from snapshot script (Pl. make changes in sql query acc. to your requirements.)

Total article views: 842 | Views in the last 30 days: 4
 
Related Articles
BLOG

A Script A Day - Day 6 - Drop and Create Database Snapshots

Today's Script will drop all database snapshots and create a database snapshot for all online read w...

FORUM

Problems in creating database snapshots

Problems in creating database snapshots

FORUM

Database SnapShot

Database SnapShot

SCRIPT

Create Snapshot Dynamicly

Create Snapshot Dynamically considering multiple database files

FORUM

Creating a Database Snapshot.

Creating a Database Snapshot, without space in disk.

 
Contribute