SQL Error Logs - changes to DB states and detachements

SQL Error Logs - changes to DB states and detachements

am 29.08.2007 07:57:04 von snafu66

Hi All,

Hoping someone can assist with this. Is there an SQL trace flag, or
other method, where I can get the SQL server error logs (2000 and
2005) to log database detachements, and changes in DB status (eg to
read only from online etc).

I thought about a trigger on sysdatabases (sys.databases) but am
highly skeptical of triggers on system tables.

Why am I doing this? I need to monitor the up time of individual
databases on an instance, and third party tools are not an option.

thanks in advance.