locked
Error attempting to create a new login RRS feed

  • Question

  • I have a mirrored database that I use a script to keep the logins in sync with the principal database.  After the last user was create on the principal the script was giving the error "the server principal (xyz) already exists".  I tried to manually create the login with create login and got the same error.  I can't find the user name anywhere in syslogins or server_principals.  There are 8 SIDS in the server_principal view that aren't in the syslogins view, all belonging to system system user with sids like 0x01, etc.  I tried creating a new login with some random name just to get the same error.  I doubt the problem has anything to do with the name of the login.

     

    Any Ideas?

     

    Jeff D

    Friday, August 26, 2011 8:14 PM

All replies

  • Jeff

    What does it return DROP LOGIN login_name


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Sunday, August 28, 2011 7:46 AM
  • Hi Jeff,

    It sounds like you got this error message when you creating a SQL Server login (not login created from Windows user)? If this is the case, could you please run the following T-SQL to see whether you have any exist login with the same name on the server:

    SELECT * FROM sys.server_principals
    WHERE type_desc = 'SQL_LOGIN'
    


    If this is not the case, please provide the following information:

    1. SQL Server instance version by running SELECT @@VERSION
    2. Complete error message when creating logins

    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Monday, August 29, 2011 6:26 AM
  • Drop login returns.  BTW I am logged in as sa.

    Cannot drop the login ..., because it does not exist or you do not have permission.

    Tuesday, August 30, 2011 5:15 PM
  • User does not exist when looking at sys.server_principals

    Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

    Msg 15025, Level 16, State 1, Line 1

    The server principal 'randomuser' already exists.

    The statement has been terminated.

    I tried to create a login for randomuser

     

    Tuesday, August 30, 2011 5:18 PM
  • Hi,

    It sounds strange. For further investigation, I would recommend you open a support incident with Microsoft Customer Services & Support where there would be a dedicated support engineer assigned for this case. Please visit the below link to see the various paid support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone


    Best Regards
    Alex Feng | Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Wednesday, August 31, 2011 1:59 AM
  • Can you connect to SQL Server via random user login?
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Wednesday, August 31, 2011 6:46 AM
  • Can you connect to SQL Server via random user login?
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Wednesday, August 31, 2011 6:47 AM
  • No. I cannot connect using the randomuser login

    Wednesday, August 31, 2011 1:14 PM
  • check whether server logins are present in the mirrored instance or not also check database mapping.
    Monday, September 5, 2011 12:48 PM