首先恢复时一个完整的备份,但在完整的备份里一定要选择with nonerecovery(企业管理器里选项中是第2项)
sql 语句是
restore database mydata from disk = 'c:\temp\movedb.bak' with norecovery
这时数据库就会变成恢复模式,这样你就可以一条一条的把trn文件添加进行恢复了.
语句是
restore log Mydata from disk =
"D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\data\data_tlog_200407290022.TRN"
with norecovery
当你恢复到你想要的数据时,再把数据库变成正常的模式就可以.
语句为
restore log Mydata from disk =
"D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\data\data_tlog_200407290022.TRN"
with recovery
这样就可以在你的备用的机器上把数据恢复到某个时间点了.
sql 语句是
restore database mydata from disk = 'c:\temp\movedb.bak' with norecovery
这时数据库就会变成恢复模式,这样你就可以一条一条的把trn文件添加进行恢复了.
语句是
restore log Mydata from disk =
"D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\data\data_tlog_200407290022.TRN"
with norecovery
当你恢复到你想要的数据时,再把数据库变成正常的模式就可以.
语句为
restore log Mydata from disk =
"D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\data\data_tlog_200407290022.TRN"
with recovery
这样就可以在你的备用的机器上把数据恢复到某个时间点了.