How to become a good database administrator (DBA)? To me, you must love this job and update DBA knowledge frequently. Most of my job is related to database design/development and business analysis, so I mostly focus on database query and business analysis in this blog. You may find a lot of queries here as well as some query quizzes. Hope you enjoy it! (Best with screen resolution 1280 by 1024)

Followers

Saturday, September 19, 2009

SELECTDATABASEPROPERTYEX(db_name(), 'Status')Return value:ONLINE = Database is available for query.OFFLINE = Database was explicitly taken offline.RESTORING = Database is being restored.RECOVERING = Database is recovering and not yet ready for queries.SUSPECT = Database did not recover.EMERGENCY = Database is in an emergency, read-only state. Access is restricted to sysadmin members