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

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

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

Postby jsreynolds1 » Wed Aug 27, 2014 9:53 pm

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
jsreynolds1
 
Posts: 37
Joined: Fri Jun 14, 2013 8:03 pm

Postby Anu Deshpande » Mon Sep 01, 2014 10:17 am

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:

Code: Select all
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
Anu Deshpande
 
Posts: 812
Joined: Mon Apr 20, 2009 2:53 pm
Location: Cambridge

Postby jsreynolds1 » Tue Sep 02, 2014 5:32 pm

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.
jsreynolds1
 
Posts: 37
Joined: Fri Jun 14, 2013 8:03 pm

Postby jsreynolds1 » Thu Sep 18, 2014 4:41 pm

This issue was resolved by version 3.7.5.312.
jsreynolds1
 
Posts: 37
Joined: Fri Jun 14, 2013 8:03 pm


Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests