虎贲小队程序猿

get along

导航

数据库快照

--创建数据库快照 
create database SchoolManagement_SnapShot_0425 
on 
( 
NAME=SchoolManagement, 
filename='E:\SchoolManagement_SnapShot_0425.mdf' 
) 
AS snapshot of SchoolManagement

--用快照恢复数据库 
restore database SchoolManagement from database_snapshot='SchoolManagement_SnapShot_0425'

SELECT * FROM sys.databases 
    WHERE NAME='SchoolManagement_SnapShot_0425'

--删除快照  
drop database SchoolManagement_SnapShot_0425

 

posted on 2013-04-25 09:14  jjssl  阅读(116)  评论(0编辑  收藏  举报