Discussion on:

5
Comments

Join the conversation!

Follow via:
RSS
Email Alert
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.
What for mysql? Is there similar scripts
0 Votes
+ -
minor correction?
Malkie 27th Jan 2011
"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."
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
0 Votes
+ -
It is exactly what I was looking for.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.