Sample script that displays all of the users in a given SQL Server DB
摘要:SamplescriptthatdisplaysalloftheusersinagivenSQLServerDB.SupportedPlat...
SamplescriptthatdisplaysalloftheusersinagivenSQLServerDB.
SupportedPlatforms
SQLServer2000
Yes
ScriptCode
复制代码 代码如下:
strDBServerName="."
strDBName="ScriptingGuysTestDB"
SetobjSQLServer=CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure=True
objSQLServer.ConnectstrDBServerName
SetobjDB=objSQLServer.Databases(strDBName)
SetcolUsers=objDB.Users
ForEachobjUserIncolUsers
WScript.Echo"User:"&objUser.Name
WScript.Echo"Login:"&objUser.Login
Next
【Sample script that displays all of the users in a given SQL Server DB】相关文章:
★ 測試代碼真方便
★ window.onload与$(document).ready()的区别分析
★ JavaScript正则表达式之multiline属性的应用