当前位置:Gxlcms > JavaScript > SamplescriptthatdeletesaSQLServerdatabase_javascript技巧

SamplescriptthatdeletesaSQLServerdatabase_javascript技巧

时间:2021-07-01 10:21:17 帮助过:12人阅读

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

人气教程排行