Supported Platforms
SQL Server 2000
Yes
Script Code
代码如下:
strDBServerName = "."
strDBToDelete = "ScriptingGuysTestDB"
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
objSQLServer.KillDatabase strDBToDelete