EllieDBA
SSCommitted
Points: 1786
More actions
June 10, 2009 at 10:47 am
#155814
I have done this many times before but have forgotten the simple statement, can someone assist me with the query we run against master and returns lists all data, log files on that server and their sizes?
thank you
spaghettidba
SSC Guru
Points: 105732
June 10, 2009 at 11:01 am
#1007565
sp_msForEachdb 'USE ?
EXEC sp_helpfile'
It's not exactly what you were asking, but it goes very close, I think.
-- Gianluca Sartori
June 10, 2009 at 11:06 am
#1007568
Another way to get it in a single result set:
select top 0 *
into #files
from sysfiles
EXEC sp_msforeachdb 'insert into #files select * from ?.dbo.sysfiles'
select * from #files
drop table #files
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply