Archive for November 2008
Check the information about the MDF File
Some of the time databases are not attached to the MSSQL server and while attaching them we need the name of the database which is there in the mdf file. Getting the name is very much important while attaching to the MSSQL Server so for that purpose we can utilise the following command
dbcc checkprimaryfile ('F:\Microsoft SQL Server\MSSQL10.MSSQL2008\MSSQL\DATA\AdventureWorks_Data.mdf',2)
It will give the following result
| Database name | AdventureWorks |
| Database version | 655 |
| Collation | 53256 |