Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Create Error Login - Server Principal Already exists

Status
Not open for further replies.

bmacbmac

IS-IT--Management
Jan 26, 2006
392
US
Hello. I have a program that creates it's own user in SQL. A new SQL server was just added to our domain and I am moving our databases to this server.

I am using our program to create a specific SQL login and receive the error: The Server Principal 'MyUserName' already exists.

I have checked sys.server_principals, but the 'MyUserName' principal is not listed. Any ideas on what I can check?
 
You say you are using a program to create the new user...is this an application? First thing I would check is that the program is pointing to the new server, you might still be trying to create it on the old server where the login already exists.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Hi there. Thanks for the reply. Yes it is an application. During the username creation process we enter the servername\instancename along with the sa username/password and the database name. I am sure that during this process we are pointing to the correct server.
 
Have you tried to use SQL commands on the server to create the login, just to see if it works? That will help narrow down the issue. If using SQL commands on the server creates the user, you know it's an issue with the application. If it doesn't create it and returns the same error, that will let you focus on the server itself.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top