Condividi tramite


KillDatabase Method

Questa caratteristica verrà rimossa a partire da una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

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

Sintassi

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);

Osservazioni

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: