RESTORE DATABASE <database_name> FROM DATABASE_SNAPSHOT missing WITH STATS - by Miron contrib

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 735132 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 4/2/2012 5:07:11 PM
Access Restriction Public


I think this is a bug, missing feature.
Although it could be a good suggestion.
Please help classify this issue correctly.

when attempted to run command "RESTORE DATABASE <my_database_name> FROM DATABASE_SNAPSHOT = '<my_database_snapshot_name>' WITH STATS = 5 

got back error message. Message reads: 

Msg 4355, Level 16, State 2, Line 1
The revert command is incorrectly specified. The RESTORE statement must be of the form: RESTORE DATABASE <x> FROM DATABASE_SNAPSHOT = <y>.


Interestingly, parsing this statement ( under SQL Server Management Studio "Query" top level menu click on "Parse" ) completes with message, message reads: "Command(s) completed successfully."

Product: SQL Server 2008
Product version: 10.0.2531

SQL Server management Studio output of "Copy Info" under "Help->About" top level menu:

Microsoft SQL Server Management Studio						10.0.2531.0
Microsoft Analysis Services Client Tools						10.0.1600.22
Microsoft Data Access Components (MDAC)						6.1.7600.16385
Microsoft MSXML						3.0 6.0 
Microsoft Internet Explorer						8.0.7600.16385
Microsoft .NET Framework						2.0.50727.4959
Operating System						6.1.7600
Sign in to post a comment.
Posted by Miron contrib on 2/27/2013 at 12:41 AM
Appreciate your informative reply.

It would be very nice if MSDN and SQL Server On - Line documentation reflected same.


Posted by Kevin [MSFT] on 2/19/2013 at 3:35 PM
REstoring a database from database snapshot is a completely different process and the standard restore statistics don't apply.