How to know Database Version or Build no from a Backup File?
Generally we don’t need this info for user database but when you have to recover or restore master database then you should have exact database version or build no else you cannot recover your database like i am giving you a scenario suppose you instance is corrupted now you are not able to access your sql server instance and even you don’t have exact database version like 9.00. ****. In this case you need exact build no else you cannot recover your sql server Instance. To get this info you need a master database backup file. You can run below cmd to get this info:
Restore headeronly from disk=’D:MSSQLBackupmaster.bak’
Now output will show you lot much info like user name,LSNs,device type,server name etc but you should look into below three columns to get exact version no of SQL Server. As per this output the version on which master database was backed up is 10.50.1600.Now you got the exact build so install sql server till this build no and restore master database easily.
SoftwareVersionMajor SoftwareVersionMinor SoftwareVersionBuild
10 50 1600
If you like this tip, you can follow us on our facebook page and on Twitter handle to get latest updates.
Read More:
- How to Change Database Default Locations in SQL Server?
- Understanding Database Shrink Operation and Why Should We Avoid It?
- SQL Server Backup & Recovery Interview Questions
- SQL Server Alwayson Interview Questions & Answers
- How to Fix SQL Error 1005: A Comprehensive Guide - April 9, 2023
- How to Fix SQL Server Error 207 – Invalid Column Name - April 9, 2023
- How to Fix SQL Error 1045: Resolving Access Denied Issues - April 8, 2023