운영/권한 관리
2021. 11. 9.
데이터베이스 사용자 권한 조회
SELECT L.name, ISNULL(R.db_datareader,'') [db_datareader], ISNULL(R.db_datawriter,'') [db_datawriter], ISNULL(R.db_ddladmin,'') [db_ddladmin], ISNULL(R.db_owner,'') [db_owner], ISNULL(R.eland_operator,'') [eland_operator], ISNULL(R.sysadmin,'') [sysadmin] FROM sys.syslogins AS L LEFT JOIN ( SELECT DatabaseUserName, case when [db_datareader] is null then '' else 'O' end as [db_datareader], case w..