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
 General SQL Server Forums
 New to SQL Server Programming
 DefaultData and DefaultLog tables

Author  Topic 

arusu
Yak Posting Veteran

60 Posts

Posted - 2011-08-18 : 10:27:30
I was also wondering, how can I get the path for the DefaultData and DefaulLog? I know you can find it in the registry but is there a way to find it in a table?

so select * from sys.sysfiles will get you the master paths but this is not what I want.

arusu
Yak Posting Veteran

60 Posts

Posted - 2011-08-18 : 10:46:54
so these will get them from the registry

EXEC xp_instance_regread
N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\MSSQLServer\MSSQLServer',N'DefaultData'
EXEC xp_instance_regread
N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\MSSQLServer\MSSQLServer',N'DefaultLog'
Go to Top of Page

arusu
Yak Posting Veteran

60 Posts

Posted - 2011-08-18 : 10:48:38
Ok so maybe I can use the registry if this is the only way but I need to read it for a specific sql server instance
Go to Top of Page
   

- Advertisement -