Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log Shipping and Restore

Status
Not open for further replies.

DrSql

Programmer
Jul 16, 2000
615
0
0
US
I am in the process of setting up a DR location.
Daily 12.00 AM I have full DB backup from prod and 1 AM Copy the backup and restore to DR loaction. This step has been working fine for last few days. Now I am trying to add restore the trasnaction log every 4 hours starting 4 AM to 8PM. After lastnights full restore now I am trying to restore the log files, then I am getting the error.
Here is the query and error. Any suggestions.

RESTORE LOG PUBS
FROM Disk = 'F:\Mssql\Backup\Upstream\PUBS_log_04am.bak'
WITH STANDBY = 'F:\MSSQL\Backup\Upstream\undoPUBS.ldf'

Server: Msg 913, Level 16, State 8, Line 1
Could not find database ID 65535. Database may not be activated yet or may be in transition.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.


Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
Try this

RESTORE LOG PUBS
FROM Disk = 'F:\Mssql\Backup\Upstream\PUBS_log_04am.bak'
with norecovery

Cyno
 
Can you expaln whst is the differnce between With Standby and norecovery?

Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
NORECOVERY

Used only with BACKUP LOG. Backs up the tail of the log and leaves the database in the Restoring state. NORECOVERY is useful when failing over to a secondary database or when saving the tail of the log prior to a RESTORE operation.

STANDBY = undo_file_name

Used only with BACKUP LOG. Backs up the tail of the log and leaves the database in read-only and standby mode. The undo file name specifies storage to hold rollback changes which must be undone if RESTORE LOG operations are to be subsequently applied.


Thanks,
Cyno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top