May 24, 2015 at 12:31 am
One of my database is not available(offline). Now how can I know the location of mdf & ldf of the database
May 24, 2015 at 6:38 am
Execute this code
select d.name,mf.name,mf.physical_name
from sys.databases d
inner join sys.master_files mf on mf.database_id=d.database_id
Igor Micev,My blog: www.igormicev.com
May 24, 2015 at 9:26 am
its working
thanks @ Mr.Igor Micev
May 26, 2015 at 1:19 pm
or without the join
select db_name(database_id), name, physical_name
from sys.master_files
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply