-- AdventureWorks DB에 대한 SnapShot 만들기
Create Database AW_SS
On
(
Name = AdventureWorks_Data,
FileName = 'C:\SqlAdmin\SS.ss'
)
As Snapshot of AdventureWorks
go
-- 테스트
Select * From AW_SS.Sales.SalesOrderDetail
go
Select * From AdventureWorks.Sales.SalesOrderDetail
go
-- 원본 테이블 삭제
Drop Table AdventureWorks.Sales.SalesOrderDetail
go
-- 스냅샷으로부터 복원
Restore Database AdventureWorks
From DATABASE_SNAPSHOT = 'AW_SS'
Go