Duplicate Definition for User - I can only find the user in one file

DaveFirthDaveFirth Posts: 2 New member
edited June 22, 2020 10:18AM in SQL Source Control
I am getting the following error which is causing SQL Version Control Crash. I am using both Version Control And Change Automation.

As per advise on website I have searched for the relevant Create User Script but have only been able to find it in one file in the Repo.

Error Message

A duplicate definition was found for the user 'doldba'.

Ensure that case sensitivity options are set correctly and all object creation scripts are valid.If the problem persists, contact Redgate support.
Tagged:

Answers

  • DanCDanC Posts: 587 Gold 4
    edited June 23, 2020 11:17AM
    Hi @DaveFirth ,

    Sorry to hear you're experiencing this issue!

    Please correct me if I'm wrong, but as you mentioned you're using SQL Change Automation as well, could you look inside the .sqlproj file and check if there's an extra reference to the sql file creating that user?

    If that's not the case let me know and we will troubleshoot further!

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • DaveFirthDaveFirth Posts: 2 New member
    Thanks for you're response Dan
    Yes there was a sqlproj file - which included a reference to to a schema object for the user. However when I deleted these (its on my local machine and this is a test setup) I still saw the same error

    Do you think I would be best getting started with SQL Source Control without the change automation? Or is there away to ensure scripts generated by these two programs don't cause conflicts?

  • Hi @DaveFirth

    That's odd, what I can do is follow up with you via a support ticket to see if we can find where this issue stems from!

    Generally speaking you shouldn't come across too many issues using both tools as it's common for SQL Change Automation projects to be SQL Source Control projects using the scripts folder. 

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Sign In or Register to comment.