Tips and scripts relating to database administration. Mainly SQL Server but some MySQL and every now and again something different. Posts are brief and to the point.It's as much a place to make notes for my own use as anything else.
Thursday, 26 July 2012
Transaction Log Restore
The following statement can be used to restore a transcation log back up and keep the database on standby as read only.
RESTORE LOG [corporate_log]
FROM DISK = N'\\10.0.1.83\dba\logship\dbname\filename.trn'
WITH FILE = 1
,STANDBY = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\ROLLBACK_UNDO_dbname.BAK'
,NOUNLOAD
,STATS = 10
No comments:
Post a Comment