You don't need to create the target database beforehand because RESTORE will
create it during the restore process. The rest of your process is correct -
restore from database backup and apply transaction log backups in order to
the desired point in time. The scripts:
RESTORE DATABASE PUBS2
FROM DISK='c:\Backups\PUBS.bak'
WITH
MOVE 'pubs' TO 'C:\DataFiles\pubs.mdf',
MOVE 'pubs_Log' TO 'C:\DataFiles\pubs_log.ldf',
NORECOVERY
RESTORE LOG PUBS2
FROM DISK='c:\Backups\PUBS_Log_0600.bak'
WITH NORECOVERY
RESTORE LOG PUBS2
FROM DISK='c:\Backups\PUBS_Log_1200.bak'
WITH NORECOVERY
RESTORE LOG PUBS2
FROM DISK='c:\Backups\PUBS_Log_1800.bak'
WITH
STOPAT = '20040717 14:00:00',
RECOVERY
--
Hope this helps.
Dan Guzman
SQL Server MVP
"David McGeorge" <so**********@yahoo.com> wrote in message
news:bc**************************@posting.google.c om...
Coming more from Oracle background, I want to do a point in time
recovery test on SQl Server. Let's say database PUBS backed up every
night and Trans log backup 3 time every 6 hours between 6 a.m. and 6
p.m. , now we want to create a database PUBS2 and recover data upto
2:00 p.m yesterday , i.e. I think applied backup from two night before
then apply to trans log backup ?? Is that what wehave to and how to
apply Trans log? I am not sure. Please script and advise.