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
 We to find de mdf path on SQL Server 2005

Author  Topic 

shifis
Posting Yak Master

157 Posts

Posted - 2008-07-08 : 16:55:41
Hi
Where can I check the path of my log and mdf files.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-07-08 : 17:19:04
You can use the script on the link below.

Get Server Database File Information:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=89058



CODO ERGO SUM
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-08 : 18:15:38
In Database properties.
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2008-07-09 : 06:06:26
use windows search with .*mdf or *.ldf


Arnav
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2008-07-09 : 06:10:11
sp_helpdb 'database name'

*##* *##* *##* *##*
Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-09 : 22:08:04
quote:
Originally posted by sunsanvin

use windows search with .*mdf or *.ldf


Arnav
Even you learn 1%, Learn it with 100% confidence.



This is not efficient from your machine. What if you have 100 databases.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-12 : 00:41:47
Still faster than look at properties of 100 dbs.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-12 : 05:12:06
quote:
Originally posted by rmiao

Still faster than look at properties of 100 dbs.


Querying on sysfiles would be faster
Refer the link that MVJ posted

Also I would say this must be faster though it is undocumented

exec sp_msforeachdb 'Select * from ?..sysfiles'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2008-07-18 : 06:13:18
How about a all time sp_helpfile

***************************
Life is for having Fun, and then a little SQL Server on the side
Go to Top of Page
   

- Advertisement -