How do I open and view MDF and LDF files in SQL Server 2005?

  • Thread starter ionlylooklazy
  • Start date
  • Tags Tags
    Mysql
1 reply · 5K views · last reply
ionlylooklazy
Messages
30
Reaction score
0
Hello,

I have never used SQL before and I have a .mdf & a .ldf file and I need to change some parameters. Is there a way to view them like an Access Database?

I have Microsoft SQL Server 2005, but to my knowledge there is no utility included to access these files.

Thanks
 
Since you have SQL 2005 installed, you can use the Microsoft SQL Server 2005 Management Studio. If you don't have the Management Studio you can install it from the SQL Server 2005 Installer or download a CTP version from Microsoft.

Using the Management Studio, Connect to your local instance of SQL Server, then on the right pane (the object explorer) right-click on the Databases folder and click "Attach...".

Specify the location of your database file (the .mdf) and the log file (the .ldf)
The database will then show up under the databases folder. You'll be able to browse its tables, perform queries, etc.