Next step of programming

Just another WordPress.com weblog

Archive for November 2008

Check the information about the MDF File

with 2 comments

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

Written by A.Sethi

November 29, 2008 at 4:57 am

Posted in MS SQL SERVER

Tagged with , , , ,