SQL Server schema

Tags:
SQL Server
T-SQL
Hi,    How can i get the user names assigned to the Schema through (T-SQL) Regards; Rino

Software/Hardware used:
sql server

Answer Wiki

Thanks. We'll let you know when a new response is added.

<pre>select * from sys.sysusers (nolock) or
select * from sys.database_principals (nolock)</pre>

This will get you the list of “named” users of the database.

<pre>select * from sys.server_principals (nolock)
where type_desc = ‘WINDOWS_LOGIN’</pre>

This will get you the list of users authorized by their Windows authentications. (This is probably what you really want.)

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Fhhdjfhjdhfjhjdfh
    Hi sir , Thnx for ur reply that was helpfull , but i want the users who are assigned to specific Shema name in a database.
    135 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following