KillDatabase Method

后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The KillDatabase method drops a database from the referenced Microsoft SQL Server installation, regardless of the status or availability of the database.

语法

object
.KillDatabase(
Database
)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Database
    String specifying an existing database by name.

Prototype (C/C++)

HRESULT KillDatabase(
SQLDMO_LPCSTR szDatabase);

备注

The Remove method of the Database object and Databases collection drops a referenced database. A database drop can fail if the database is offline. When the Remove method of the Database object or Databases collection fails, use the KillDatabase method to force a drop of the database.

Applies To:

SQLServer Object