Get version info from SQL backup

This neat little snippet shows you alot of information from a SQL database backup (.bak file)

RESTORE HEADERONLY

FROM DISK = N'c:\temp\dbMyDatabase.bak'

WITH NOUNLOAD;

If this doesn't work you're probebly trying to run it on an older SQL Server version than the backup was taken from.

Unfortunately I haven't found a proper lookup table to translate the version number to SQL Server version, but here's two:
611 = SQL Server 2005
655 = SQL Server 2008

If you find a good resource for version lookup, please post it in the comments, thanks!

Related posts:

Comments

comments powered by Disqus