Last year at TechEd India 2009 I talked about Recovery of database with SQL Server. In SQL Server 2005+, there are 7 database states. And there is a method to analyze these database states, which I will discuss later. At any point of time, a database can only be in one state.
- RECOVERY PENDING
A database changes its state after an operation that happens automatically due to some sequence of events on the server. Some of state changes result from manual commands being executed. The current state of a database is exposed by the catalog view sys.databases using 2 columns: state and state_desc. The state column shows the state of the database using the integer code that represents a specific state. The state_desc shows the verbose information that pertains to the integer code shown by the state column. Since this column is present, there is no more a need to decode the various state bits as we used to do in previous versions of the product.
Maybe in a future post, I will try to talk about each of these database states and some of the significance of moving the states from one to another … There is a method to madness to this whole state management.
Which is the database error state you have encountered most of the time?
This entry was posted on Tuesday, May 4th, 2010 at 14:13 and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.