Hi Folks,
How do I get the Physical Database and Log File location (file system path) of a DB in SQL Server 2005?
I used this to get the mdf file: {SELECT [Name], FileName FROM sysdatabases} but need to get the log file as well...
Cheers, Conor
Hi Folks,
How do I get the Physical Database and Log File location (file system path) of a DB in SQL Server 2005?
I used this to get the mdf file: {SELECT [Name], FileName FROM sysdatabases} but need to get the log file as well...
Cheers, Conor
You should be using sp_helpdb or sp_helpfile for this.
e.g:
sp_helpdb 'master'