共用方式為


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 Databaseobject or Databases collection fails, use the KillDatabase method to force a drop of the database.

Applies To: