Duplicate definition was found...

mstymsty Posts: 3 New member
edited October 14, 2016 10:11AM in SQL Source Control
While refreshing I get this error message, telling me that there's a duplicate definition on my stored procedure ...but that's not true! I've renamed an existing procedure to ProcName.OLD and there's another one with the name ProcName. Unlink and link again doesn't help. Deleting the old one doesn't help ...sending an error report not possible :? .
No clue what to do ...any help?

Greets,
Matthias

Comments

  • Hi Matthias,

    Sorry that you're experiencing this problem. It seems that SQL Source Control thinks that in your repository there are two CREATE statements for the ProcName object. In order to investigate this, I would suggest the following steps -

    1. Manually check out the contents of source control to a local directory.
    2. Search the directory for instances of the string ProcName - you can do this with a number of text editors including Notepad++ by using its "Find in Files" feature which can be found in the Search menu.

    If there is a second instance of a CREATE statement for ProcName somewhere then you'll need to remove it and manually commit any amended files to the repository.
    Software Engineer
    Redgate Software
  • mstymsty Posts: 3 New member
    HI Robert,
    That was the solution. Thank you.
    The problem was the following:
    For an other project I copied an existing database which should by slightly different from the original and linked that inside a subpath of the main database (TFS). (On the SQL Server there was a separate db...) It sems that SourceControl is going recursively through all directories inside an linked solution ...then there's of course a copy of this object because there's the whole tree inside one directory :D
    The weird thing is only that SourceControl found only one duplicate object and not all of them...

    At the end, my issue is solved

    Greets,
    Matthias
Sign In or Register to comment.