Can I grant database permission on a login object?











up vote
0
down vote

favorite












I'm trying to grant create database permission to a login because the login owns the database and there is no user. My question is what's the default user if the login owns the database and is not mapped to an explicit user?










share|improve this question






















  • Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
    – scsimon
    Nov 7 at 17:30










  • Yes, would I need to create a new user for each login?
    – HaydenH
    Nov 7 at 18:21

















up vote
0
down vote

favorite












I'm trying to grant create database permission to a login because the login owns the database and there is no user. My question is what's the default user if the login owns the database and is not mapped to an explicit user?










share|improve this question






















  • Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
    – scsimon
    Nov 7 at 17:30










  • Yes, would I need to create a new user for each login?
    – HaydenH
    Nov 7 at 18:21















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to grant create database permission to a login because the login owns the database and there is no user. My question is what's the default user if the login owns the database and is not mapped to an explicit user?










share|improve this question













I'm trying to grant create database permission to a login because the login owns the database and there is no user. My question is what's the default user if the login owns the database and is not mapped to an explicit user?







sql-server






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 7 at 17:28









HaydenH

33




33












  • Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
    – scsimon
    Nov 7 at 17:30










  • Yes, would I need to create a new user for each login?
    – HaydenH
    Nov 7 at 18:21




















  • Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
    – scsimon
    Nov 7 at 17:30










  • Yes, would I need to create a new user for each login?
    – HaydenH
    Nov 7 at 18:21


















Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
– scsimon
Nov 7 at 17:30




Is the true question how to map a server login to a db user? i.e. do you have an orphaned user?
– scsimon
Nov 7 at 17:30












Yes, would I need to create a new user for each login?
– HaydenH
Nov 7 at 18:21






Yes, would I need to create a new user for each login?
– HaydenH
Nov 7 at 18:21














1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










If a login has permission to CREATE a database (perhaps they have the dbcreator role) then when the database is created the user dbo will be mapped to their login.






share|improve this answer





















  • The login does not have permission to create a database.
    – HaydenH
    Nov 7 at 18:22










  • @HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
    – Larnu
    Nov 8 at 8:40










  • I never marked the answer as a solution and the question seems concise.
    – HaydenH
    Nov 14 at 16:20










  • Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
    – Larnu
    Nov 14 at 16:26











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194720%2fcan-i-grant-database-permission-on-a-login-object%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








up vote
0
down vote



accepted










If a login has permission to CREATE a database (perhaps they have the dbcreator role) then when the database is created the user dbo will be mapped to their login.






share|improve this answer





















  • The login does not have permission to create a database.
    – HaydenH
    Nov 7 at 18:22










  • @HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
    – Larnu
    Nov 8 at 8:40










  • I never marked the answer as a solution and the question seems concise.
    – HaydenH
    Nov 14 at 16:20










  • Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
    – Larnu
    Nov 14 at 16:26















up vote
0
down vote



accepted










If a login has permission to CREATE a database (perhaps they have the dbcreator role) then when the database is created the user dbo will be mapped to their login.






share|improve this answer





















  • The login does not have permission to create a database.
    – HaydenH
    Nov 7 at 18:22










  • @HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
    – Larnu
    Nov 8 at 8:40










  • I never marked the answer as a solution and the question seems concise.
    – HaydenH
    Nov 14 at 16:20










  • Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
    – Larnu
    Nov 14 at 16:26













up vote
0
down vote



accepted







up vote
0
down vote



accepted






If a login has permission to CREATE a database (perhaps they have the dbcreator role) then when the database is created the user dbo will be mapped to their login.






share|improve this answer












If a login has permission to CREATE a database (perhaps they have the dbcreator role) then when the database is created the user dbo will be mapped to their login.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 7 at 18:00









Larnu

13.6k31430




13.6k31430












  • The login does not have permission to create a database.
    – HaydenH
    Nov 7 at 18:22










  • @HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
    – Larnu
    Nov 8 at 8:40










  • I never marked the answer as a solution and the question seems concise.
    – HaydenH
    Nov 14 at 16:20










  • Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
    – Larnu
    Nov 14 at 16:26


















  • The login does not have permission to create a database.
    – HaydenH
    Nov 7 at 18:22










  • @HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
    – Larnu
    Nov 8 at 8:40










  • I never marked the answer as a solution and the question seems concise.
    – HaydenH
    Nov 14 at 16:20










  • Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
    – Larnu
    Nov 14 at 16:26
















The login does not have permission to create a database.
– HaydenH
Nov 7 at 18:22




The login does not have permission to create a database.
– HaydenH
Nov 7 at 18:22












@HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
– Larnu
Nov 8 at 8:40




@HaydenH Why did you eit the answer to say it isn't helpful, yet mark it as a solution? They are quite different actions. There's not a lot of description in your question, hence the short answer. I think you need to expand on your question and explain better.
– Larnu
Nov 8 at 8:40












I never marked the answer as a solution and the question seems concise.
– HaydenH
Nov 14 at 16:20




I never marked the answer as a solution and the question seems concise.
– HaydenH
Nov 14 at 16:20












Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
– Larnu
Nov 14 at 16:26




Only the OP of a question can mark an answer as the solution @HaydenH, so only you can mark it as the answer.
– Larnu
Nov 14 at 16:26


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194720%2fcan-i-grant-database-permission-on-a-login-object%23new-answer', 'question_page');
}
);

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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini