October 7, 2011 at 9:32 am
Okay, this should be impossible, but...
Coworker went to restore a copy of a production db in our QC environment. We already have a QC db called MyDb, the new copy was supposed to be MyDb_ProdCopy. He went into the GUI, picked the proper db backup, changed the path but forgot to change the file names (so it wouldn't try to use the same logical / physical files as the original MyDb). Restore went fine. NO ERRORS.
That's when he figured out what he'd forgotten to change. msdb.dbo.restorehistory says MyDb_ProdCopy was indeed restored a few minutes ago. A quick check of the regular MyDb shows that a proc that we changed in it yesterday is back to the version that's in production. So it appears as if the production copy overwrote the qa files and both databases are using the same logical / physical db files.
So far as I know that shouldn't even be possible, right?
Anyone have an explanation? Or can anyone replicate this behavior?
SQL Version is Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) .
October 7, 2011 at 9:55 am
In the property pages for the databases, what is shown for the paths to the database files?
October 7, 2011 at 10:38 am
He already changed things, so the information I'm looking at is not what it was when the restore was originally done.
Currently, the directories are both identical, but the file names are different. But I was being told that was not the case when this originally happened and I didn't get a chance to look at that info. Still, you raise a good point. I wonder if he saved it to a different directory path.
Which doesn't explain the proc situation, though.
October 8, 2011 at 11:10 am
it is impossible to have 2 files named exactly the same within Windows and SQL Server doesn't have anyway of circumventing this. Generally the restore will name the OS files based on the database name you supplied, the logical names won't change. You need to change those after the restore.
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
October 13, 2011 at 12:39 pm
Perry,
That's what I kept telling him, but he was panicking. (New DBA Syndrome)
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply