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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sp_helpfile

Author  Topic 

Bex
Aged Yak Warrior

580 Posts

Posted - 2005-07-13 : 05:58:37
Morning all

I am SOOOOO frustrated at the moment. The other day, I obtained a list of the location of all the data and log files, the databasees to which they belonged to and the size of each file. I need to do the same again, but have absolutely no recollection of how I did it. After much searching and frustration, I thought I would ask you guys instead.

I have been using sp_helpfile which returns the required info (and extra), but cannot get all the files in one hit. I thought that the master database stores all this information (in sysfiles or sysfiles1 or something), yet all i get is the location of the master files. Am I being a complete dunce ....please help me before I pull out all my hair!

Thanks

Hearty head pats

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-07-13 : 06:55:50
The information for each individual database is stored in sysfiles in that database.

CODO ERGO SUM
Go to Top of Page

Bex
Aged Yak Warrior

580 Posts

Posted - 2005-07-13 : 07:16:44
Hi Michael,

Thanks for you reply.

That was my initial thought, and hence, shouldn't the sysfiles table in the master database hold all the path locations for all the databases on the server?? However, it only contains the path to the Master database and not all others.

I recall (but not where or how), obtaining all the file path locations querying a single table, which I thought was the master sysfiles table. What am I doing wrong??

Hearty head pats
Go to Top of Page
   

- Advertisement -