SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 msdb..backupmediafamily Incorrect - Why???
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DBADave
Constraint Violating Yak Guru

USA
366 Posts

Posted - 04/24/2006 :  20:50:53  Show Profile  Reply with Quote
I'm seeing strange results when I query backupmediafamily for some of my databases. I ran a script to generate the "restore database" commands for all databases and noticed this script fails for some databases. For those failures it generates a physical disk path that does not exist. sysdevices has the correct path so I'm not sure where backupmediaset gets its data. It's possible this path existed in the past, but it isn't there anymore. The puzzling thing is these backup files are from new backups.

select max (backup_start_date), physical_device_name
from msdb..backupmediafamily a
join msdb..backupset b
on a.media_set_id = b.media_set_id
where physical_device_name like '%imsql1%'
group by physical_device_name
order by physical_device_name


Any ideas?

Dave

DBADave
Constraint Violating Yak Guru

USA
366 Posts

Posted - 04/24/2006 :  23:22:49  Show Profile  Reply with Quote
Here is an update. I found that if I do not specify a backup device or if I create a new backup device with a different name, backupmediafamily contains the correct information. However, if I delete the backup device and create it with the same name, backupmediafamily contains the wrong path. For example, the path it contains is G:\MSSQL\Backup\Server1\Accounting.bak when the actual path is G:\MSSQL\Backup\Accounting.bak. I don't understand what's happening.

SQL Server 2000 with sp3a running on Windows 2000 SE.

Dave
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 04/24/2006 :  23:49:32  Show Profile  Send jen a Yahoo! Message  Reply with Quote
use sp_dropdevice when deleting, not just deleting it from the drive,
which will delete the entry from master.dbo.sysdevices




--------------------
keeping it simple...
Go to Top of Page

DBADave
Constraint Violating Yak Guru

USA
366 Posts

Posted - 04/25/2006 :  08:08:30  Show Profile  Reply with Quote
I've confirmed the device gets dropped from sysdevices, however when I recreate it the physical device name is incorrect. I believe this is a bug related to msdb..backupmediafamily.

Thanks, Dave
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000