Who has SHOWPLAN permissions on a database
Is there a way I can see all users in a database who currently have access to view execution plans? That is, who has SHOWPLAN
permissions
sql-server-2014 permissions execution-plan showplan
add a comment |
Is there a way I can see all users in a database who currently have access to view execution plans? That is, who has SHOWPLAN
permissions
sql-server-2014 permissions execution-plan showplan
add a comment |
Is there a way I can see all users in a database who currently have access to view execution plans? That is, who has SHOWPLAN
permissions
sql-server-2014 permissions execution-plan showplan
Is there a way I can see all users in a database who currently have access to view execution plans? That is, who has SHOWPLAN
permissions
sql-server-2014 permissions execution-plan showplan
sql-server-2014 permissions execution-plan showplan
asked Jan 8 at 14:10
SEarle1986SEarle1986
396314
396314
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You asked "in a database", so setting aside sysadmins and people who have been granted permission at the server level, you can see people who were granted or denied that permission at the database level by running this query in the database you're curious about:
SELECT p.name, perm.*
FROM sys.database_permissions perm
INNER JOIN sys.database_principals p ON perm.grantee_principal_id = p.principal_id
WHERE perm.permission_name = 'SHOWPLAN';
Note that I'm not filtering for state_desc (grant or deny) there because if you're interested in who has access, you're probably also interested in who's been denied access.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f226588%2fwho-has-showplan-permissions-on-a-database%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You asked "in a database", so setting aside sysadmins and people who have been granted permission at the server level, you can see people who were granted or denied that permission at the database level by running this query in the database you're curious about:
SELECT p.name, perm.*
FROM sys.database_permissions perm
INNER JOIN sys.database_principals p ON perm.grantee_principal_id = p.principal_id
WHERE perm.permission_name = 'SHOWPLAN';
Note that I'm not filtering for state_desc (grant or deny) there because if you're interested in who has access, you're probably also interested in who's been denied access.
add a comment |
You asked "in a database", so setting aside sysadmins and people who have been granted permission at the server level, you can see people who were granted or denied that permission at the database level by running this query in the database you're curious about:
SELECT p.name, perm.*
FROM sys.database_permissions perm
INNER JOIN sys.database_principals p ON perm.grantee_principal_id = p.principal_id
WHERE perm.permission_name = 'SHOWPLAN';
Note that I'm not filtering for state_desc (grant or deny) there because if you're interested in who has access, you're probably also interested in who's been denied access.
add a comment |
You asked "in a database", so setting aside sysadmins and people who have been granted permission at the server level, you can see people who were granted or denied that permission at the database level by running this query in the database you're curious about:
SELECT p.name, perm.*
FROM sys.database_permissions perm
INNER JOIN sys.database_principals p ON perm.grantee_principal_id = p.principal_id
WHERE perm.permission_name = 'SHOWPLAN';
Note that I'm not filtering for state_desc (grant or deny) there because if you're interested in who has access, you're probably also interested in who's been denied access.
You asked "in a database", so setting aside sysadmins and people who have been granted permission at the server level, you can see people who were granted or denied that permission at the database level by running this query in the database you're curious about:
SELECT p.name, perm.*
FROM sys.database_permissions perm
INNER JOIN sys.database_principals p ON perm.grantee_principal_id = p.principal_id
WHERE perm.permission_name = 'SHOWPLAN';
Note that I'm not filtering for state_desc (grant or deny) there because if you're interested in who has access, you're probably also interested in who's been denied access.
answered Jan 8 at 14:30
Brent OzarBrent Ozar
34.2k19101229
34.2k19101229
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f226588%2fwho-has-showplan-permissions-on-a-database%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown