The Server level queries requires sa-type rights, or you won't see very much information.
The Database level queries require dbo-type rights, or you won't see much information.
If you have these rights, however, these are very useful queries.
Discussion on:
View:
Show:
"Permissions on data are one of the most critical aspects of database administration. If you???re too strict as a database administrator then your users will not be able to do their jobs. If you???re not lenient, then data can be compromised or even leaked. It is a very fine balance to control. The ability to determine these permissions on your database systems is absolutely paramount."
"If you???re not lenient, then data can be compromised or even leaked." should be "If you???re too lenient, then data can be compromised or even leaked."
"If you???re not lenient, then data can be compromised or even leaked." should be "If you???re too lenient, then data can be compromised or even leaked."
I think for the part "Who has access to my Databases?", the SQL should be. Please correct me if I'm wrong
SELECT
UserName = dp.name, UserType = dp.type_desc, LoginName = sp.name, LoginType = sp.type_desc
FROM sys.database_principals dp
JOIN sys.server_principals sp ON dp.sid=sp.sid
SELECT
UserName = dp.name, UserType = dp.type_desc, LoginName = sp.name, LoginType = sp.type_desc
FROM sys.database_principals dp
JOIN sys.server_principals sp ON dp.sid=sp.sid
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































