473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Recovery SQL Server

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.
Jul 20 '05 #1
1 1517
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.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jens Kalkbrenner | last post by:
MS SQL-Server 7.0 Bypassing recovery for database 'EfW_765' because it is marked IN LOAD. What does this mean? Our customer is backing up is maindatabase and is recovering it to this database for...
4
by: joshsackett | last post by:
Hi All, I have a 2MB database set to SIMPLE recovery. This database is used only to generate new keys to web users. It has two columns - UID and LASTDATE. The UID column is only updated when users...
5
by: rcamarda | last post by:
I need a sql statment to return a list of tables for a given database where the Recovery Model option is Simple. TIA Rob
7
by: Network Administrator | last post by:
Looks like for the first time in 6 years, I'm experienced some database table corruption. This was due to the space filling up on a server (you don't want to know how that happened). I have 3...
8
by: Neil Truby | last post by:
There's something clearly missing in my understanding of recovery: I set up a small sample datavase and deleted all the rows from a table. Crucially, I omitted the "commit". I then shut down...
10
by: xixi | last post by:
i have db2 udb v8.1 on windows 64 bit 2003 server, after db2 server start , i found this in the db2diag.log, is this error? 2004-05-05-15.28.30.780000 Instance:DB2 Node:000...
2
by: deebeeay | last post by:
Hi all, I have a SQL Server 2000 database that is using the Full recovery model. The database is purely receiving inserts (and plenty of them) with maybe some view/table creation for reporting....
2
by: Matik | last post by:
Hello, I've follow problem - thing to consider. SQLServer 200 sp3a, ms win 2003 server db simple recovery There is a production database, wich is around 20gb big. Db is backed up each...
3
by: TG | last post by:
Coming from a (mostly) Oracle shop, I am unclear how SS transaction logs work as far as up to point of failure recovery goes. I have the few MSSQL databases I look after in full recovery mode,...
0
by: Winder | last post by:
Computer Data Recovery Help 24/7 Data recovering tools and services is our focus. We will recover your data in a cost effective and efficient manner. We recover all operating systems and media....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.