The KillDatabase method drops a database from the Microsoft® SQL Server™ installation referenced, regardless of the status or availability of the database.
object.KillDatabase( Database )
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
Database | String specifying an existing database by name |
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.
HRESULT KillDatabase(
SQLDMO_LPCSTR szDatabase);