Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 5th, 2003, 01:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default Restoring Files from a Disk Device

Hi,

I have a question about an apparently annoying feature of EM.

Let's say I run the following script:

sp_addumpdevice 'disk', 'full_backup', 'c:\tmp\fullbackup.dat'
go
backup database test_db to full_backup
go
backup database test_db to full_backup
go
backup database test_db to full_backup
go

I get a single .dat file with three backup sets on it, position 1-3, which I can see by running:

restore headeronly from full_backup

So far so good. Now I run a fourth backup using 'with init':

backup database test_db to full_backup with init

This overwrites the .dat file, leaving me with one backup set at position 1, as I can see by running 'restore headeronly'.

This all makes sense. 'Restore headeronly' gives me accurate info about what backup sets actually exist on the backup device.

Not so with EM. If I right click on test_db and select Restore Database from the All Tasks menu, EM lists four backup sets, one for each of the backups I performed above. Problem is the earliest backup displayed in EM is now inaccurate because it was over written by the fourth backup(both wrote to file position 1), and the second and third backups listed in EM are invalid because files positions 2 and 3 no longer exist on the disk backup device. Only backup set four displayed in EM is a good backup.

So my questions are:

1. Is there anyway to get EM to accurately display the contents of the disk device, listing only valid available backups?

2. I assume 'restore headeronly' is reading the the contents of the disk device directly. Where is EM getting it's available backup info from, msdb?

3. Why does EM want to display a backup history instead of valid, available backups?

Any insights appreciated.

Bob



 
Old October 5th, 2003, 01:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hmmm....

I guess all backup and restore history is kept in the master db. Is the answer just that EM displays the entire backup history and thats all there is to it?

 
Old October 5th, 2003, 06:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Never mind. I think I get it now. Just seems odd that the restore dialog would bother displaying unrestoreable backup sets...

Any way, thanks for letting me think out loud.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems restoring database thomasah SQL Server 2005 0 June 12th, 2007 05:01 AM
Restoring a table anandham SQL Server 2000 1 November 12th, 2005 12:39 AM
How to search whole disk for .doc files? bcmaverik VB.NET 2002/2003 Basics 2 February 18th, 2004 09:25 AM
Restoring a Table jbenson001 SQL Server 2000 2 January 2nd, 2004 03:42 PM
ThePhile: Restoring Database mbschmitt BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 29th, 2003 07:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.