The login already has an account under a different user name.

  • OK, I'm not a noob by any means but this one is bugging me simply because it's my account that it's doing it to. I tried to add my account "joe\SCHMOE" to a newly created DB and I get this error....

    The login already has an account under a different user name. (Microsoft SQL Server, Error: 15063)

    So I figured, let's delete the DB and re-create it......same thing.

    Then I figured, let's just add the rest of the users......worked fine as designed.

    So I tried my account again and guess what, the same error.

    I checked to see if my account was really there....nope, it's not there.

    Then I checked to get my accounts principal_id by running this...

    select * from sys.server_principals

    So I got my principal_id and I ran the below against the DB...

    select * from sys.database_principals

    I checked if either my user name or my principal_id was present but they were not.

    My account does have sysadmin rights but that's not the point.......lol

    Why do I get the error adding my account to a new DB?

    Anyone have any ideas?

    Thanks

  • Is your login the explicit dbo of the database.

    If that is the case you cannot add yourself because your already are a user as dbo.

  • You'll find if you are dbo in SSMS under Database/properties/Files/Owner

  • yup, that was it. Upon creation, <default> meant the account I was logged in as.

    Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply