there is always something to develop
How to determine file names used by current database
Information about database's files are stored in master database and table sysaltfiles. To determine which database is current one we need to use db_name(). So we have:
SELECT db_name(dbid), * FROM master.dbo.sysaltfiles where db_name(dbid)=db_name() ORDER BY size DESC
See also
Comments
"To have a right to do a thing is not at all the same as to be right in doing it."
You are 3852 reader
since 1st April 2009
Yes | 0 | |
No | 0 |