SQL Server 7.0 Restore Problem

SQL Server 7.0 Restore Problem

Post by Bob Avallon » Tue, 15 Jan 2002 23:40:44



By my reading of the documentation, you should be able to recover a database
to any point using a backup file and the log.  The scenario would be that we
backup the database nightly. During the day there is a hard drive crash and
the database is destroyed. The log is on a different drive and it remains
intact. We should be able to recover to the point of the crash.

My backup procedure is as follows:

Backup database ContactManager2 to disk = 'e:\backup\ContactManager2.bak';

Backup log ContactManager2 with truncate_only;

The recovery procedure I used is

 RESTORE DATABASE ContactManager

  FROM    disk = 'e:\backup\ContactManager.bak'

  WITH NORECOVERY;

  RESTORE LOG ContactManager

      From ContactManager_log

     WITH RECOVERY;

The restore database part works ok but I get an error message on the restore
log:

No entry in sysdevices for backup device 'ContactManager_log'. Update
sysdevices and rerun statement.

What am I doing wrong?

 
 
 

SQL Server 7.0 Restore Problem

Post by Dinesh T » Tue, 15 Jan 2002 23:51:08


Bob,

Backup log ContactManager2 with truncate_only

The above command will not take a backup of log...it simply frees up log
space.The changes thus recorded in log would be destroyed.For disaster
recovery purposes you should backup database immediately after that.

Dinesh.


Quote:> By my reading of the documentation, you should be able to recover a
database
> to any point using a backup file and the log.  The scenario would be that
we
> backup the database nightly. During the day there is a hard drive crash
and
> the database is destroyed. The log is on a different drive and it remains
> intact. We should be able to recover to the point of the crash.

> My backup procedure is as follows:

> Backup database ContactManager2 to disk = 'e:\backup\ContactManager2.bak';

> Backup log ContactManager2 with truncate_only;

> The recovery procedure I used is

>  RESTORE DATABASE ContactManager

>   FROM    disk = 'e:\backup\ContactManager.bak'

>   WITH NORECOVERY;

>   RESTORE LOG ContactManager

>       From ContactManager_log

>      WITH RECOVERY;

> The restore database part works ok but I get an error message on the
restore
> log:

> No entry in sysdevices for backup device 'ContactManager_log'. Update
> sysdevices and rerun statement.

> What am I doing wrong?


 
 
 

SQL Server 7.0 Restore Problem

Post by Dan Guzma » Wed, 16 Jan 2002 00:19:15


Always specify the version of SQL Server are you are using.

The TRUNCATE_ONLY option should not normally be used after your backup.
Once the log is truncated without a log backup, subsequent log backups
are not allowed.  TRUNCATE_ONLY is used to expeditiously recovery from a
full log situation.  I suggest something like:

--nightly db backup
BACKUP DATABASE ContactManager2
TO DISK = 'e:\backup\ContactManager2.bak'
WITH INIT

--this will backup, truncate the log and init backup file
BACKUP LOG ContactManager2
TO DISK = 'e:\backup\ContactManager2Log.bak'
WITH INIT
GO

--periodic log backup
this will backup and truncate the log
BACKUP LOG ContactManager2
TO DISK = 'e:\backup\ContactManager2Log.bak'
GO

Your recovery scenario (backup log with NO_TRUNCATE) will work with SQL
2000 but not SQL 7.  In SQL 7, you can only recover to the point of your
last successful log backup when the primary data file is lost.  See
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q218739 for
details.

Be sure to periodically test your recovery plan under a variety of
scenarios.

Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy  Neil Pike):

http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------


Quote:> By my reading of the documentation, you should be able to recover a
database
> to any point using a backup file and the log.  The scenario would be
that we
> backup the database nightly. During the day there is a hard drive
crash and
> the database is destroyed. The log is on a different drive and it
remains
> intact. We should be able to recover to the point of the crash.

> My backup procedure is as follows:

> Backup database ContactManager2 to disk =

'e:\backup\ContactManager2.bak';

- Show quoted text -

Quote:

> Backup log ContactManager2 with truncate_only;

> The recovery procedure I used is

>  RESTORE DATABASE ContactManager

>   FROM    disk = 'e:\backup\ContactManager.bak'

>   WITH NORECOVERY;

>   RESTORE LOG ContactManager

>       From ContactManager_log

>      WITH RECOVERY;

> The restore database part works ok but I get an error message on the
restore
> log:

> No entry in sysdevices for backup device 'ContactManager_log'. Update
> sysdevices and rerun statement.

> What am I doing wrong?

 
 
 

SQL Server 7.0 Restore Problem

Post by Bob Avallon » Wed, 16 Jan 2002 05:41:38


I don't understand. There has to be a way to recover from the log. If
not, there is no value in having a log. I would just do a backup of the
database periodically and restore from the data backup file. What value
is the log?

Bob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

SQL Server 7.0 Restore Problem

Post by Dan Guzma » Wed, 16 Jan 2002 14:05:52


You recover using log backups, not the log itself.  This is why the log
should be backed up periodically.  Worst case, you only lose data since
your last log backup, even if the entire server is lost.

To recover, restore from your last database backup (with NORECOVERY) and
then restore your log backups in sequence.

Log backups are usually smaller than full database or differential
backups.

See "Designing a Backup and Restore Strategy" in the SQL Server 2000
Books Online (adminsql.chm::/ad_bkprst_63eh.htm).

Hope this helps.


Quote:> I don't understand. There has to be a way to recover from the log. If
> not, there is no value in having a log. I would just do a backup of
the
> database periodically and restore from the data backup file. What
value
> is the log?

> Bob

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

 
 
 

1. Microsoft SQL Server 7.0 Restore Problem.....Please Help.

I currently am running NT 4.0 with SQL 7.0 running on it.  I have been given
the task of migrating our servers to Windows 2000.  I have installed Windows
2000 Server and subsequently installed SQL 7.0.  I have moved over my .BAK
files from where I backup the SQL databases every night but I continually
get errors while trying to restore my databases to the new Windows 2000
server.  Can anyone give me some assistance as to what path I can follow or
maybe a URL for me to visit that better explains how I can restore these
databases to this new server with LESS problems.   Thanks in advance.

2. Calling stored procedure with an OUTPUT param

3. SQL Server 7.0 Restore Problem

4. Paradox unusable for commercial applications ?

5. Backup/restore from SQL 7.0 Server to SQL 7.0 SP1 Server

6. Those dual processor G4s

7. problem while restoring sql server2000 db in sql server 7.0

8. SQL Server Database name

9. Restore Problems with SQL Server 7.0

10. Restore problems SQL server 7.0

11. Restore problem in SQL Server 7.0

12. Restoring SQL Server 7.0 database to SQL Server 2000 Environment Question

13. Restore database from SQL Server 2000 to SQL Server 7.0