views:

27

answers:

4

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?

+1  A: 

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\

SQLMenace
A: 

By default, in \Program Files\Microsoft SQL Server\

SLaks
not always true, especially not on a server, for example on my server Log files are on the L drive and data files on the U and V drives..it is determined by the model database
SQLMenace
@SQLMenace: He's asking about a _default_ installation
SLaks
I see, it also depends what you mean by default, our default is L for logs, M for system, T for tempdb and rest of userDB
SQLMenace
@SQLMenace: But that's not a default _installation_.
SLaks
+2  A: 

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

Sam
-1 because you didn't tell me to scroll to the right. Just kidding! :) Thank you very much!
kirk.burleson
A: 

You should probably do a database export from management studio so there aren't any compatibility issues.

Byron Whitlock