Re: Database backup script
From: Gregory A. Larsen (greg.larsen_at_netzero.com)
Date: 06/29/04
- Next message: Rob: "sql6.5 login/pswd transfer to 2k"
- Previous message: Hari Prasad: "Re: Transaction log growing without bound"
- In reply to: David Thayer: "Database backup script"
- Next in thread: David Thayer: "Re: Database backup script"
- Reply: David Thayer: "Re: Database backup script"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 29 Jun 2004 09:36:38 -0700
Are you sure that your script gets all the way through the differential
restore? If for some reason the differential restore didn't happen or
failed, then you database would be in "loading" status.
-- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---- Need SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples "David Thayer" <dthayer@deltanet.net> wrote in message news:227bb01c45df3$a0fe1a20$a601280a@phx.gbl... > In SQL 7, we backup and restore an OLTP database to > another server to off-load some processing and to have a > static copy of the database at a point in time. > > Here's the procedure: > --restore from full backup > RESTORE DATABASE <database name> from > > DISK = > N'\\<server>\<share>\<folder>\<subfolder>\file_1.bak', > DISK = N'<server>\<share>\<folder>\<subfolder>\file_2.bak', > DISK = N'<server>\<share>\<folder>\<subfolder>\file_3.bak', > DISK = N'<server>\<share>\<folder>\<subfolder>\file_4.bak' > WITH MOVE '<file name 1>' to 'location\file1.mdf', > MOVE '<file name 2' to 'location\file2.mdf', > MOVE '<log file name 1>' to 'location\LOGfile1.ldf', > MOVE '<log file name 2>' to 'location\LOGfile2.ldf', > NORECOVERY, REPLACE > --restore differential backup > RESTORE DATABASE <database name> FROM DISK > = '<server>\<share>\<folder>\<subfolder>\filename.BAK' > with recovery > > > Periodically, this script completes, but leaves the > restored database in 'loading' status. I know how to > correct this, by using 'RESTORE DATABASE with RECOVERY', > but I'm wondering why this happens sometimes and not > others. Any suggestions?
- Next message: Rob: "sql6.5 login/pswd transfer to 2k"
- Previous message: Hari Prasad: "Re: Transaction log growing without bound"
- In reply to: David Thayer: "Database backup script"
- Next in thread: David Thayer: "Re: Database backup script"
- Reply: David Thayer: "Re: Database backup script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|