Question

When i go to restore my database in SQL server 2012 i can let display the script or command line action as you know. What do these additional parameters do, Nounload and stats = 10.

RESTORE DATABASE [db2] FROM  DISK = N'C:\folder\db2.bak' WITH  FILE = 1,  NOUNLOAD,  STATS = 10
GO
Was it helpful?

Solution

Stats = 10 indicates that it will show you in the messages section of SSMS the progress of the restore in increments of 10% e.g.

  • 10% complete
  • 20% complete
  • 30% complete
  • xx% complete.........

Etc..

NOUNLOAD is a tape thing, if you are restoring from tape, specifying this will ensure that the tape is not unloaded from the drive once the restore is complete, if you're not restoring from a tape drive this option is ignored.

Documentation for RESTORE is available here:

TechNet: RESTORE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top