Reputation: 1357
How to open .mdf and .ldf files ?
These files were created using SQL 2005. I just installed SQL 2008.
I am unable to open this file. What am I am missing here ?
Upvotes: 10
Views: 85362
Reputation: 1266
You probably just want to attach these and you can do that through SSMS.
However, if you really want to “read” these note that there is no default way to do so but there are some workarounds you can try.
Reading .ldf file is only possible using third party tools such as ApexSQL Log.
There is also SQL Log Rescue which is free but only for SQL Server 2000.
Take a look at these thread for more details on this (if this is what you were after)
Read the log file (*.LDF) in sql server 2008
SQL Server Transaction Log Explorer/Analyzer
Upvotes: 5
Reputation: 3632
In SQL Server management studio you can "Attach" an MDF file, which is associated with the LDF (log file).
Alternatively, you can use Visual Studio's Server Explorer to attach to and browse MDF files.
Upvotes: 2
Reputation: 15958
You can't just open those files. But what you can do is attach them to your new version of SQL 2008. Here's the instructions to do that : http://msdn.microsoft.com/en-us/library/ms190209.aspx
Upvotes: 4
Reputation: 6465
You should be able to just attached the mdf file using SQL Server Mgmt Studio. See this link http://www.packtpub.com/article/moving-a-database-from-sql-server-2005-to-sql-server-2008-in-three-steps
Upvotes: 7