v3.7.4.425 - duplicate objects found with name...

jsreynolds1jsreynolds1 Posts: 93 Silver 2
edited September 18, 2014 12:41PM in SQL Source Control Previous Versions
Not something I've seen before.

"Duplicate objects found with name [dbo].[Documents]: found objects with ids: 65552, 0"

I have sent an error report. Ironically I can't copy/paste the error report to put here.

I have re-loaded my Git repository on disk; no change. Doesn't seem to happen for other databases.

Any thoughts about what more I can provide or do?

Thank you,

John

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Thanks for your post.

    In most cases, a duplicate definition occurs within the files in your repository rather than the database itself. There's a few causes, the most common either being a user has manually altered the files in some way or it's a bug.

    To find the offending file, it's usually possible to check out a copy of your repo to a temporary folder on your machine using the tool supplied with your source control system (i.e. Tortoise if you use SVN etc).

    Once checked out, you can run a command to locate all instances of the object in the error message ([dbo].[Documents]) - running this command in the root of the checkout folder:
    findstr /S /C:"[dbo].[Documents]" *.*
    

    Hopefully that will yield more than one file which contains the creation SQL for the FK in question (or the definition will be duplicated in one file, although we tend to see that more with triggers) - once you find the issue, you'll need to correct it in the repository copy of the file, and finally unlink and relink the database from source control to refresh our working copies. Hopefully that should sort it out.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Indeed, I have two objects - a table, and a table type, with the same name. While not a best practice, should this cause the system to bomb out? It didn't use to until recently.
  • This issue was resolved by version 3.7.5.312.
Sign In or Register to comment.