RE: Backups.

RE: Backups.

 

  

First:

RESTORE DATABASE debug_db
FROM DISK = '\\nas-01\db\db_200401260200.BAK'
WITH REPLACE, NORECOVERY

Then write a script to run the following command recursively with all the
transaction log backups that were taken after the full backup:

RESTORE LOG debug_db
FROM DISK = '????'
WITH NORECOVERY

once that's done run the following:

RESTORE DATABASE debug_db WITH RECOVERY


Hope this helps.

Mohan

-----Original Message-----
From: Aaron [mailto:[Email Address Removed]
Sent: Tuesday, January 27, 2004 3:11 PM
To: Surendran, Mohan
Cc: LazyDBA.com Discussion
Subject: Re: Backups.


Example? :)

Surendran, Mohan wrote:
> If you do take transaction log backups on the production database you
> could restore the database and the subsequent transaction logs every
> 12 hours...
>
> -----Original Message-----
> From: Aaron [mailto:[Email Address Removed] Sent: Tuesday, January 27, 2004 2:23 PM
> To: LazyDBA.com Discussion
> Subject: Re: Backups.
>
>
> This is what I did, it's working now... but I would like to update
> debug_db every 12 hrs, but prod_db is only backed up every 24 hrs, and
> the .bak file will change names ... unfortunately with the current
> configuration I can not setup replication.
>
> RESTORE DATABASE debug_db
> FROM DISK = '\\nas-01\db\db_200401260200.BAK'
> WITH REPLACE
>
>
> [Email Address Removed] wrote:
>
>
>>In the DTS designer, create a connection for the server to restore to.
>>Then create an Execute SQL Task using that connection with the SQL
>>Statement "RESTORE DATABASE mydb...".
>>
>>-----Original Message-----
>>From: Aaron [mailto:[Email Address Removed] Monday, January 26, 2004 3:43 PM
>>To: LazyDBA.com Discussion
>>Subject: Backups.
>>
>>
>>I'm looking for a way to replication two databases nightly. Is it
>>possible to use DTS to restore a backup from one server to another? It
>>makes sense, but I can't seem to figure out how to build the DTS
>>package.
>>
>>Thanks
>>a
>>
>>---------------------------------------------------------------------
>>TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get
>>today's cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
>>mssqldba-[Email Address Removed] For additional commands, e-mail:
>>mssqldba-[Email Address Removed] REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get
>>today's cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
>>mssqldba-[Email Address Removed] For additional commands, e-mail:
>>mssqldba-[Email Address Removed]
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get
> today's
> cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
> mssqldba-[Email Address Removed] For additional commands, e-mail:
> mssqldba-[Email Address Removed]
>
> **********************************************************************
> This is a commercial communication from Commerzbank AG.
>
> This communication is confidential and is intended only for the person
> to whom it is addressed. If you are not that person you are not
> permitted to make use of the information and you are requested to
> notify <mailto:LONIB.[Email Address Removed] immediately that
> you have received it and then destroy the copy in your possession.
>
> Commerzbank AG may monitor outgoing and incoming e-mails. By replying
> to this e-mail you consent to such monitoring. This e-mail message and
> any attached files have been scanned for the presence of computer
> viruses. However, you are advised that you open attachments at your
> own risk.
>
> This email was sent either by Commerzbank AG, London Branch, or by
> Commerzbank Securities, a division of Commerzbank. Commerzbank AG is
> a limited liability company incorporated in the Federal Republic of
> Germany. Registered Company Number in England BR001025. Our registered
> address in the UK is 23 Austin Friars, London, EC2P 2JD. We are
> regulated by the Financial Services Authority for the conduct of
> investment business in the UK and we appear on the FSA register under
> number 124920.
>
> **********************************************************************
>


**********************************************************************
This is a commercial communication from Commerzbank AG.

This communication is confidential and is intended only for the person to
whom it is addressed. If you are not that person you are not permitted to
make use of the information and you are requested to notify
<mailto:LONIB.[Email Address Removed] immediately that you have
received it and then destroy the copy in your possession.

Commerzbank AG may monitor outgoing and incoming e-mails. By replying to
this e-mail you consent to such monitoring. This e-mail message and any
attached files have been scanned for the presence of computer viruses.
However, you are advised that you open attachments at your own risk.

This email was sent either by Commerzbank AG, London Branch, or by
Commerzbank Securities, a division of Commerzbank. Commerzbank AG is a
limited liability company incorporated in the Federal Republic of Germany.
Registered Company Number in England BR001025. Our registered address in
the UK is 23 Austin Friars, London, EC2P 2JD. We are regulated by the
Financial Services Authority for the conduct of investment business in the
UK and we appear on the FSA register under number 124920.

**********************************************************************

MS Sql Server LazyDBA home page