Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 default database path

Author  Topic 

hrishi_des
Yak Posting Veteran

76 Posts

Posted - 2006-12-14 : 02:30:11
I want to find default data file path for databasein sql server 2005. if i dont set default database location property in database settings property from enterprise manager, does it takes path of model database to create new database, if yes how to find that path programmatically?

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-14 : 02:39:01
I guess the default data file path is taken from the registry key which is setup during installation:

HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQL\Data




Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

hrishi_des
Yak Posting Veteran

76 Posts

Posted - 2006-12-14 : 02:46:50
Hi Harsh,

Thatz right but that registry key value is not set if we dont set
default database location property in database settings property from enterprise manager. so in that case does it takes path of model database to create new database data file?

thanks,
hrishikesh

quote:
Originally posted by hrishi_des

I want to find default data file path for databasein sql server 2005. if i dont set default database location property in database settings property from enterprise manager, does it takes path of model database to create new database, if yes how to find that path programmatically?


Go to Top of Page
   

- Advertisement -