Guilherme Pedrosa
This post is about how to inspect the content of SQL database (.mdf and .ldf files). The answer is to attach these files to an existing SQL server instance, instead of opening them directly with a tool such as SQL Management Studio. This was not clear time until I stumbled upon this video.
Steps
- Keep a SQL Server instance running in the background;
- Fire up SQL Management studio and connect to this instance by providing .\SQLEXPRESS in the “Server name” field;
- Right click “Database” and attach the mdf file. The ldf is automatically included;
Attention points
To check #1 spin up SQL Configuration Manager and look for SQL Server (SQLEXPRESS) instance. It should be already running by default, as shown in Figure 1.
As for #2 make sure to login using the system credentials as shown in Figure 2.
As for #3, if you are not admin the mdf file needs to be stored somewhere in the Public user profile so the SQLExpress instance is able to locate it.
Hey, be the first who comment this article.