Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

Undo an applied transaction log ?

$
0
0

USE [master]
RESTORE DATABASE [EmployeeRecovered] FROM  DISK = N'D:\Backups\Normal\EmployeeFULL.BAK' WITH  FILE = 1,  
MOVE N'Employee' TO N'D:\MSSQL\DATA\EmployeeRecovered1.mdf',  
MOVE N'Employee_log' TO N'D:\MSSQL\LOG\EmployeeRecovered1_log.ldf',  
NOUNLOAD,  STATS = 5, NORECOVERY
GO

RESTORE LOG [EmployeeRecovered] FROM  DISK = N'D:\Backups\Normal\TranBackup1.trn' WITH  FILE = 1,  STANDBY = N'D:\Backups\Normal\EmployeeStandby.BAK',  NOUNLOAD,  STATS = 10
GO

RESTORE LOG [EmployeeRecovered] FROM  DISK = N'D:\Backups\Normal\TranBackup2.trn' WITH  FILE = 1,  STANDBY = N'D:\Backups\Normal\EmployeeStandby.BAK',  NOUNLOAD,  STATS = 10
GO

now I realze the recovery point is somewhere in TranBackup2.trn and need to go back to the state where only TranBackup1.trn is applied.

How can i do this ?



Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>