github twitter linkedin email rss
Reading SQL Dumps with SQL Server management Studio
Apr 12, 2020
One minute read

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

  1. Keep a SQL Server instance running in the background;
  2. Fire up SQL Management studio and connect to this instance by providing .\SQLEXPRESS in the “Server name” field;
  3. 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.

Figure 1: SQL Express running instance

Figure 1: SQL Express running instance

As for #2 make sure to login using the system credentials as shown in Figure 2.

Figure 2: SQL Server login

Figure 2: SQL Server login

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.


Back to posts


Hey, be the first who comment this article.