g***l 发帖数: 18555 | 2 这个SCRIPT可以找出所有的ROLE来
declare @name as nvarchar(max)
declare @cmd as nvarchar(max)
declare @cnt int
set @cnt = 1
create table #temp
(server_name nvarchar(max),
level nvarchar(max),
login_name sysname,
dbname nvarchar(max),
db_role sysname,
issysadmin bit,
issecurityadmin bit,
isserveradmin bit,
issetupadmin bit,
isprocessadmin bit,
isdiskadmin bit,
isdbcreator bit,
isbulkadmin bit)
set @name = (select top 1 name from sys.sysdatabases order by name)
while @name IS NOT NULL
begin
set @cmd = 'select... 阅读全帖 |
|