– 查询Sql Server当前数据库用户账户的权限
select object_name(id) obj,
(case [action] when 26 then ‘REFERENCES’
when 178 then ‘CREATE FUNCTION’
when 193 then ‘SELECT’
when 195 then ‘INSERT’
when 196 then ‘DELETE’
when 197 then ‘UPDATE’
when 198 then ‘CREATE TABLE’
when 203 then ‘CREATE DATABASE’
when 207 then ‘CREATE VIEW’
when 222 then ‘CREATE PROCEDURE’
when 224 then ‘EXECUTE’
when 228 then ‘BACKUP DATABASE’
when 233 then ‘CREATE DEFAULT’
when 235 then ‘BACKUP LOG’
when 236 then ‘CREATE RULE’ end) perm
from sysprotects where [uid]=user_id()
查询Sql Server当前数据库用户账户的权限
最新推荐文章于 2025-04-01 22:26:17 发布