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
SELECT * FROM sys.database_files
Here is another way
select * from sys.sysaltfiles
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With