zoukankan      html  css  js  c++  java
  • What are database states? [forward]

    A database is always in one specific state. For example, these states include ONLINE, OFFLINE, or SUSPECT. To verify the current state of a database, select the state_desc column in the sys.databases catalog view. The following table defines the database states.

    • ONLINE - Database is available for access. The primary filegroup is online, although the undo phase of recovery may not have been completed.
    • OFFLINE - Database is unavailable. A database becomes offline by explicit user action and remains offline until additional user action is taken. For example, the database may be taken offline in order to move a file to a new disk. The database is then brought back online after the move has been completed.
    • RESTORING - One or more files of the primary filegroup are being restored, or one or more secondary files are being restored offline. The database is unavailable.
    • RECOVERING - Database is being recovered. The recovering process is a transient state; the database will automatically become online if the recovery succeeds. If the recovery fails, the database will become suspect. The database is unavailable.
    • RECOVERY PENDING - SQL Server has encountered a resource-related error during recovery. The database is not damaged, but files may be missing or system resource limitations may be preventing it from starting. The database is unavailable. Additional action by the user is required to resolve the error and let the recovery process be completed.
    • SUSPECT - At least the primary filegroup is suspect and may be damaged. The database cannot be recovered during startup of SQL Server. The database is unavailable. Additional action by the user is required to resolve the problem.
    • EMERGENCY - User has changed the database and set the status to EMERGENCY. The database is in single-user mode and may be repaired or restored. The database is marked READ_ONLY, logging is disabled, and access is limited to members of the sysadmin fixed server role. EMERGENCY is primarily used for troubleshooting purposes. For example, a database marked as suspect can be set to the EMERGENCY state. This could permit the system administrator read-only access to the database.
  • 相关阅读:
    EML格式解析及其访问实现
    Windows Live Writer测试
    这几天为搬房子的事烦死了。
    今天装MSSQL2005时发现有些安装文件要跟2000共享(无法更改安装盘符)
    今天看到一段比较有意思的JS脚本,根据访问速度来选择镜像。
    MS的帮助越来越多视频了。
    邹健写的公交车路线查询(包括转车近到远排列)。
    今天终于搬到这边住了,就是感觉贵了点。
    第一次看到银行系统用DotNet来做。
    这几天上火了
  • 原文地址:https://www.cnblogs.com/flyinthesky/p/1621973.html
Copyright © 2011-2022 走看看