Error 945

Severity Level 16
Message Text

Database '%.*ls' cannot be opened because some of the files could not be activated.

Explanation

Microsoft® SQL Server™ returns error 945 and does not set the status column of sysdatabases to suspect if SQL Server is unable to complete recovery on a database due to any situation other than the disk being full.

Action

To determine the cause of, and possible solution for the problem, use the appropriate DATABASEPROPERTY property. For example, to determine if the database is offline, use the IsOffline property of DATABASEPROPERTY.

Enabled DATABASEPROPERTY Error message resolution
IsShutDown** Fixing the database and log files and restarting the server.
IsEmergencyMode Explicitly changing the sysdatabases.status bit.
IsInLoad* Retrying the restore operation, continuing the restore operation if it occupied multiple tapes, or dropping the database and trying again.
IsInRecovery* Doing nothing, except allowing recovery to continue.
IsInStandby* Doing nothing. This server is acting as a warm backup or standby server. For more information, see Using Standby Servers.
IsOffline** Executing sp_dboption with a value of false for the offline setting.
IsSuspect Freeing disk space if the operating system ran out of disk space during recovery. Reset the sysdatabases.status bit, and then restart the server. Contact your primary support provider if none of these options is successful.

* Indicates that these options can be enabled, in any combination, simultaneously.
** Indicates that neither IsOffline nor IsShutDown should be enabled when IsSuspect is enabled.

See Also

DATABASEPROPERTY

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.