Where are the Database and Log files for the SQL server stored?
Symptom
- You need access to the Database file and the Log because the server crashed and you only have access to a command prompt.
Applies to
- ILLiad
Resolution
You can store the files anywhere. The default locations would be off the main drive.
For the Database File, it is c:\DATA\MSSQL.10_50.MSSQLSERVER\MSSQL\DATA and the file is going to be your database name.mdf. An example is ILLData.mdf
For the Log file, it is c:\LOG\MSSQL.10_50.MSSQLSERVER\MSSQL\data and the file is going to be your database name.LDF. An example is ILLData.LDF
You might have to search the drive for the .mdf and the .LDF files. You can then copy them over so you can use them for your new Database.