simple script, but should give you the results...
select name,
database_id,
user_access_desc,
state_desc,
(CASE is_in_standby WHEN '0' THEN 'NO' ELSE 'YES' END) as Is_in_standby,
GETDATE() as time_stamp
from sys.databases
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle