Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3991760
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:39:16+00:00 2026-05-20T06:39:16+00:00

I created a login named mylogin with password= ‘pass_1’ Then i logged into sql

  • 0

I created a login named mylogin with password= ‘pass_1’

Then i logged into sql server using this login & tried to create a database , which gave the error that permission denied.

Then i executed this : sp_addsrvrolemember ‘mylogin’, ‘dbcreator’

Then, again I logged into sql server using above login & tried to create a database, this time the database was created successfully

This was because I added the dbcreator server role for the login.

But, then i created a USER myloginuser for LOGIN mylogin ,
then executed this query:
execute as user = ‘myloginuser’

then again i tried to create a database, but it failed. why so?

when the login MYLOGIN to which the user MYLOGINUSER is associated has the permission to create a database then why does the user does not have the permission? then whats the solution for this? do i have to grant permission to the user separately irrespective of the permissions granted to the login?

also, a user which is created for a login , have to be created inside a database? is it necessary?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:39:17+00:00Added an answer on May 20, 2026 at 6:39 am

    The default user for the LOGIN [mylogin] was mylogin (which was created executing

    sp_addsrvrolemember ‘mylogin’,
    ‘dbcreator’

    Hence this mylogin user had the db create permission. But you have created a MYLOGINUSER for the same Login. So the existing user mylogin was set to orphaned user, hence the mylogin Login dropped the db creator permission.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this T-SQL: CREATE USER my_test_user WITHOUT LOGIN; SELECT USER_NAME(), USER, SUSER_SNAME(),SYSTEM_USER, suser_name(); EXECUTE
I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database
I've created a login submit form in HTML but for some reason user/password autocompletion
I have created a user login page and am using Forms Authentication. Users are
I'm using VS2008 and I created an app with a login screen. That screen
When I try to create a SQL Server Login by saying CREATE LOGIN [ourdomain\SQLAccessGroup]
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
I am writing an ASP MVC 3 application. I am using Sql Server 2008
I have a database created in SQL Server 2008 on my machine. It contains
I am using SQL Server Express 2005. I have a single database myDB I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.