Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does SQL Server 2005 keep the .mdf files?

I'm upgrading from SQL Server 2005 to 2008. I've detached the database I need, but can't find it on the file system.

Where does a default installation of SQL Server 2005 store these?

like image 860
kirk.burleson Avatar asked Aug 16 '10 23:08

kirk.burleson


2 Answers

You can also use management studio to look at the properties>files of any database - that will show the files and their growth settings.

like image 136
Sam Avatar answered Sep 19 '22 06:09

Sam


try this, run this query

use model
go
SELECT physical_name FROM sys.database_files

in my case on my laptop it is in this folder

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\

like image 40
SQLMenace Avatar answered Sep 18 '22 06:09

SQLMenace