Random error: A duplicate object name has been found
vincentj
Posts: 47
We have a script that runs a comparison report between SVN and our production databases to make sure they stay in sync. However, it fails over 40% of the time with this error:
We am not using any case sensitive options or collations. In fact, usually I can just re-run the report and it works the second time. It would be great if it at least told me what object was causing the comparison to fail, but I have no idea what causes this.
I reported a similar issue about a year ago but never found a solution, though I don't know for sure if these are related.
Any ideas?
A duplicate object name has been found. This may occur if the SQL Server that you are registering is case sensitive but the case sensitive option is not set.
We am not using any case sensitive options or collations. In fact, usually I can just re-run the report and it works the second time. It would be great if it at least told me what object was causing the comparison to fail, but I have no idea what causes this.
I reported a similar issue about a year ago but never found a solution, though I don't know for sure if these are related.
Any ideas?
Comments
I'm afraid I can't think of any obvious reason why this message would happen and then not happen when you run the script again immediately afterwards.
You mentioned you're comparing to SVN - can you tell me a little more about how your script does this?
Asides from case sensitivity problems (which, if your DB isn't case sensitive, should be irrelevant) there are other possible causes such as two files in your scripts that contain a definition for the same object.
The other thing to try is to add the /logLevel:<logLevel> switch to your commandline script, and set it to "v" - this should create a more verbose log file that may contain further clues.
The logfile will be located in the usual location (c:\users\<username>\appdata\local\red gate\logs\sql compare 10)
Redgate Software
Thanks for the tip about the log file. The report ran fine the past few days but we had another failure this morning. The log file doesn't seem to contain any information to help me identify which object is viewed as a duplicate. I looked at the extensive list of files that were processed and there are no duplicates there. Here is a snippet from the log file, maybe it's useful to somone at Redgate?
When it happens again, can you immediately run the GUI and see if it reports the same problem? If it does (hopefully!) then you should see a link on the error message saying something like "Serious Error? Send an error report". If you do this (adding your email address where prompted) we should be able to then find it in our bug-tracker and it should give more 'under-the-hood' information including object names.
Redgate Software