欢迎来到福编程网,本站提供各种互联网专业知识!

Sample script that deletes a SQL Server database

发布时间:2007-06-16 作者: 来源:转载
SamplescriptthatdeletesaSQLServerdatabase.SupportedPlatformsSQLServer2000YesScriptCode复制代码代码如下:strDBServerName="."strDBToDelete="ScriptingGuysTestDB"SetobjSQLServer=CreateObject("SQLDMO.SQLServer")objSQLServer.LoginSecure
SamplescriptthatdeletesaSQLServerdatabase.

SupportedPlatforms

SQLServer2000
Yes


ScriptCode

复制代码 代码如下:
strDBServerName="."
strDBToDelete="ScriptingGuysTestDB"

SetobjSQLServer=CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure=True
objSQLServer.ConnectstrDBServerName

objSQLServer.KillDatabasestrDBToDelete

相关推荐