Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Restoring partial logs from a log backup

Author  Topic 

chwanhun
Starting Member

22 Posts

Posted - 2005-12-30 : 10:48:21
Hello,

Is there any way I can start a log restore from a log backup file, tell it stop at a certain point in time, and then hours later, start up another log restore from the same backup beginning from the time I stopped the first one?

I want to be able to schedule some SQL Server jobs to restore logs all day long.

Thanks in advance.
chwanhun

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-12-30 : 11:29:02

Read the following subjects in SQL Server Books Online
"How to restore to a point in time"
"How to set up, maintain, and bring online a standby server"


-- Sample restore log to standby mode and point in time
RESTORE LOG MyNwind
FROM
MyNwind_log3
WITH
STANDBY = 'c:\undo.ldf',
STOPAT = '2005-12-30 10:59:59.947'




CODO ERGO SUM
Go to Top of Page

chwanhun
Starting Member

22 Posts

Posted - 2005-12-30 : 11:41:43
Ok, that would allow me to restore logs until a certain point. How can I start restoring from a point in time? Is there a startat feature?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-12-30 : 12:19:28
quote:
Originally posted by chwanhun

Ok, that would allow me to restore logs until a certain point. How can I start restoring from a point in time? Is there a startat feature?


The database records the last LFN that was applied from the log, and it will just start there.





CODO ERGO SUM
Go to Top of Page

chwanhun
Starting Member

22 Posts

Posted - 2005-12-30 : 12:45:24
So, if I scheduled to run a script something like this 'restore log Online from logbackup, no recovery'
3 times a day, it would know where to start up the 2nd and 3rd times I run it?

Thanks.
Go to Top of Page
   

- Advertisement -