|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, March 11, 2010 1:09 AM
Points: 1,100,
Visits: 908
|
|
Comments posted to this topic are about the item Restore of the Database
--------------------------------------------------- "Thare are only 10 types of people in the world: Those who understand binary, and those who don't."
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, March 19, 2010 3:11 AM
Points: 849,
Visits: 524
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, March 03, 2010 5:28 AM
Points: 2,155,
Visits: 1,676
|
|
Not that obvious. ;)
"Keep Trying"
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, February 25, 2010 9:10 AM
Points: 1,182,
Visits: 289
|
|
So why does the documentation for the restorehistory table show a setting of 'V' = Verifyonly for column restore_type?
http://msdn.microsoft.com/en-us/library/ms187408.aspx
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, March 19, 2010 8:20 AM
Points: 1,130,
Visits: 2,107
|
|
I agree with Warren. I read the same BOL article and that's why I answered YES.
By the way, the MSDN article quoted to justify NO being the correct answer doesn't even mention the msdb.dbo.restorehistory table.
--------------------------------------------------------------------------
The function of good software is to make the complex appear to be simple. (Grady Booch)
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, March 19, 2010 1:46 PM
Points: 1,242,
Visits: 92
|
|
This answer is wrong. Just because SQL does not actually perform the backup, doesn't mean it won't store information about the RESTORE command. In that table, there's a restore_type that could be verifyonly:
restore_type
char(1)
Type of restore operation:
D = Database
F = File
G = Filegroup
I = Differential
L = Log
V = Verifyonly
R = Revert
Can be NULL.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 7:39 PM
Points: 925,
Visits: 1,274
|
|
I must be pretty bored today. I just tried it on both SQL 2005 and 2008, and niether wrote a record to the restorehistory table.
One interesting thing I did observe...
The backup file I used to play with was a backup of a database with several filegroups that live on different drives in production. On the dev box I was using that only has one, it actually spit out the same error message a regular restore does when you don't use the WITH MOVE clause to tell where you want those files to go. I found that slightly cool.
Jason Shadonix MCTS, SQL 2005
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, March 09, 2010 7:08 AM
Points: 1,211,
Visits: 215
|
|
I agree with Warren as well. I originally thought the answer was NO until I read the restorehistory docs which have a verifyonly entry, so I answered YES which came back as incorrect to my suprise.
ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/9140ecc1-d912-4d76-ae70-e2a857da6d44.htm
Could someone explain when the V = Verifyonly entry would be used for if there is NOT an entry made in this table with a RESTORE VERIFYONLY?
Thanks!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Monday, April 06, 2009 1:29 PM
Points: 2,057,
Visits: 215
|
|
I got the question wrong, but after searching some more found out I WAS wrong. It would put the information into the restorehistory table if you used the LOADHISTORY option. which wasn't used in the question.
http://msdn.microsoft.com/en-us/library/ms178615.aspx
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 7:39 PM
Points: 925,
Visits: 1,274
|
|
Steven Cameron (1/21/2009) I got the question wrong, but after searching some more found out I WAS wrong. It would put the information into the restorehistory table if you used the LOADHISTORY option. which wasn't used in the question.
http://msdn.microsoft.com/en-us/library/ms178615.aspx
Interesting. I missed that option when I read it the first time.
It's sometimes handy to see restores in that table just to see who did what and when. But I wonder what use there would be for keeping a record of restore verifyonly executions?
The only think I can think of is a senior DBA checking up on a jr. dba making sure they run restore verifyonly before running the real restore? But even that seems like a stretch.
Jason Shadonix MCTS, SQL 2005
|
|
|
|