SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


a question about sys.server_principals and sys.server_permissions


a question about sys.server_principals and sys.server_permissions

Author
Message
Akayisi
Akayisi
Valued Member
Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)Valued Member (65 reputation)

Group: General Forum Members
Points: 65 Visits: 198
Hi guys I am testing users' rights in sql server. However; I would like to add another column to sys.server_permissions which describes the name of endpoints. For instance;

I connect database engine -> From logins (SERVER BASE)->click a user->securable tab-> add endpoint (which is DAC)-> give some rights

But once i run this command (select * from sys.server_permissions) it gives just class_desc ;

100 SERVER 0 0 296 1 COSQ CONNECT SQL G GRANT
105 ENDPOINT 1 0 296 1 AL ALTER G GRANT
105 ENDPOINT 1 0 296 1 CL CONTROL W GRANT_WITH_GRANT_OPTION
105 ENDPOINT 1 0 296 1 CO CONNECT G GRANT
105 ENDPOINT 1 0 296 1 TO TAKE OWNERSHIP D DENY

I want have one more column which says the name of ENDPOINT such as TSQL Named Pipes,DAC etc...

I could not figure out where i can find it. Thanks in advance.
Ness
Ness
SSC-Addicted
SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)SSC-Addicted (429 reputation)

Group: General Forum Members
Points: 429 Visits: 974
Akayisi (2/18/2014)
Hi guys I am testing users' rights in sql server. However; I would like to add another column to sys.server_permissions which describes the name of endpoints. For instance;

I connect database engine -> From logins (SERVER BASE)->click a user->securable tab-> add endpoint (which is DAC)-> give some rights

But once i run this command (select * from sys.server_permissions) it gives just class_desc ;

100 SERVER 0 0 296 1 COSQ CONNECT SQL G GRANT
105 ENDPOINT 1 0 296 1 AL ALTER G GRANT
105 ENDPOINT 1 0 296 1 CL CONTROL W GRANT_WITH_GRANT_OPTION
105 ENDPOINT 1 0 296 1 CO CONNECT G GRANT
105 ENDPOINT 1 0 296 1 TO TAKE OWNERSHIP D DENY

I want have one more column which says the name of ENDPOINT such as TSQL Named Pipes,DAC etc...

I could not figure out where i can find it. Thanks in advance.



Try :
SELECT
SP.name
, E.protocol_desc
, E.type_desc
, s.*
FROM
sys.server_permissions s
JOIN sys.server_principals AS SP ON SP.principal_id = s.grantee_principal_id
JOIN sys.endpoints AS E ON E.endpoint_id = s.major_id

SQL DBA
Every day is a school day, and don't trust anyone who tells you any different.
http://sqlblogness.blogspot.co.uk
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search