Sample script that deletes a SQL Server database
人气:0
Sample script that deletes a SQL Server database.
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
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
加载全部内容