sql compare deploy always errors on users

Downloaded and installed latest trial version as of June 25. If I checkmark the user accounts to deploy them, sql compare deployment to new empty database fails saying they already exist. If I don't check them for deployment, sql compare deployment fails saying the user(s) don't exist.

kind of frustrating :( (and never had this problem with DBGhost...)
Tagged:

Comments

  • clarification: Sqlcompare deployment error says "the login already has an account under different name". But if don't checkmark the user account for deployment, the deployment fails saying "user does not exist".
  • Hi - sorry to hear you're having problems with SQL Compare

    If I understand the problem correctly, near the top of the deployment script there should be some lines like this: (when the user is selected)
    IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'loginX')
    CREATE LOGIN [loginX] WITH PASSWORD = 'p@ssw0rd'
    GO
    CREATE USER [userX] FOR LOGIN [loginX]
    

    It sounds like the login already exists, so the CREATE LOGIN statement isn't running, but the CREATE USER statement is failing because the login is already assigned to a different user. I think the thing to do is to find this other user that the login is assigned to and deploy that one first, so that the login is freed up to be assigned to the user that you want to deploy.

    Hope that's helpful,
  • Yes sir I believe you understand the issue despite my muddy description. I will give your suggestion a try, thank you.
Sign In or Register to comment.