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
"The problem is never how to get new, innovative thoughts into your mind, but how to get old ones out. Every mind is a building filled with archaic furniture. Clean out a corner of your mind and creativity will instantly fill it."
You are 3531 reader
since 1st April 2009
Yes | 0 | |
No | 0 |