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