Hi all,
I need to write a stored procedure which will return file details for all the user databases on a server.
Ideally I would like the following information per db:
database, data file name, data physical file name, data status (attached/detached)
database, log file name, log physical file name, log status (attached/detached)
I've looked at the sysfiles system table, but I'm having trouble working out the status flags.
Thanks.