SQL Sever Log Restore | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL Sever Log Restore

Hello!
I want to know which t-sql statement can restore transaction with following
In general panel:
Restore : From Device,
Restore Backup Set: transaction log
In Options panel:
Recovery Complete State: Leave database read-only and able to restore additional transaction logs. I know how to do it in Enterprise Manager, but I need to know how to do it in T-SQL and write a procedure. Thanks in advance Max
See Restore Log in Books Online. Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

Brad / Satya Please move this topic to General DBA Questions. Max, Please refrain from posting one topic at multiple locations. I have deleted the other post. Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

True, use RESTORE LOG DBNAME FROM…. WITH RECOVERY for the last set of backup to keep dB in usable mode. (Thanks Gaurav,post moved) _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

": Leave database read-only and able to restore additional transaction logs." I think he’s after WITH NORECOVERY or STANDBY. Tom Pullen
DBA, Oxfam GB
Thanks for the correction Tom, I’d answered similar question in the forum which was affected here. Still he would be able to apply further Tlogs with usual NORECOVERY or STANDBY options, though WITH RECOVERY is used (only it changes the state).
_________
Satya SKJ
Moderator
SQL-Server-Performance.Com

The complete SQL statement will be something like this:
Restore log <DB name> from disk = ‘<full path for the log backup file>’
with STANDBY = ‘<any file name>’
Thanks a lot for everyone. Where can I get T-SQL on line reference which covers detail for each function and statement? Max
http://msdn.microsoft.com/library will be your best bet. For example,
the following link covers details about ‘sp_change_users_login’.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_8qzy.asp
SQL Server Books Online (installed with SQL Server) is by far and away your best bet for TSQL reference – it’s pretty comprehensive.
Tom Pullen
DBA, Oxfam GB
]]>