Friday, February 24, 2012

get path of the database file using a query

Hi guys,
all i want to do is , get the path of the location of my database and log
file using a query of a command i could write down in the query anylyser.
Thanks
Sameer MuzammilTry using:
sp_helpfile
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"sameer" <sameer@.discussions.microsoft.com> schrieb im Newsbeitrag
news:25DDB26C-501D-4DCA-979F-3587514744D0@.microsoft.com...
> Hi guys,
> all i want to do is , get the path of the location of my database and log
> file using a query of a command i could write down in the query anylyser.
> Thanks
> Sameer Muzammil|||Hi,
You could also use
sp_helpdb <dbname>
Thanks
Hari
SQL Server MVP
"sameer" <sameer@.discussions.microsoft.com> wrote in message
news:25DDB26C-501D-4DCA-979F-3587514744D0@.microsoft.com...
> Hi guys,
> all i want to do is , get the path of the location of my database and log
> file using a query of a command i could write down in the query anylyser.
> Thanks
> Sameer Muzammil|||Hi Sameer,
You can extract info from sysdatabses system table. As Jens replied you
sp_helpfile this system stored procdure also make use of this system table.
select name,filename from sysdatabases
go
Thanks
Syed Zulfiqar
"sameer" <sameer@.discussions.microsoft.com> wrote in message
news:25DDB26C-501D-4DCA-979F-3587514744D0@.microsoft.com...
> Hi guys,
> all i want to do is , get the path of the location of my database and log
> file using a query of a command i could write down in the query anylyser.
> Thanks
> Sameer Muzammil

No comments:

Post a Comment