Error: A duplicate object name has been found

magomago Posts: 36
Dears :
I got the error messsage:
Error: 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.

Here is my xml configuration. Could you please let me know if I have wrong setting. Tks.


<?xml version="1.0" ?>
<commandline>
<verbose />
..
<casesensitive />
<ignoreidentical />
<synchronize />
<force />
</commandline>

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Mago,

    It could also conceivably happen if you remap owners and there are two objects with the same name but one has the reampped owner and the original owner that you're mapping from. That causes Data Compare to see two of the same object name.
  • Hi, Brain:

    Thanks for your reply.
    Do you mean we have two same object name, but the two object have different owner ? The possible factor is that we use a common table name : User.

    In fact, I'm not sure why there is no such error in 4.X, but happens in 5.X to sync same databases. When we use sql backup 4.X, we have no error message. After upgrading to 5.X, it always told me that error.

    Please adviced. Thanks.

    Regards,
    Mago
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Mago,

    Maybe if you could post the entire argfile, that would tell us some more.
  • Hi, Brian:

    I listed my xml file as the following.
    I didn't add <casesensitive /> in sql data compare 4.0, and it runs smoothly.
    But upgrade to 5.0, it always shows error as I said.
    We try to add <casesensitive /> in our xml, but it still didn't work.

    [code]
    <?xml version="1.0" ?>
    <commandline>
    <verbose />
    <database1>TSR</database1>
    <server1>server1</server1>
    <username1>sa</username1>
    <password1>xxx</password1>
    <database2>VIP</database2>
    <server2>server2</server2>
    <username2>sa</username2>
    <password2>xxx</password2>
    <include objecttype="Table" matches="\[Block\]" />
    <include objecttype="Table" matches="\[EbugComment\]" />
    <include objecttype="Table" matches="\[EbugData\]" />
    <include objecttype="Table" matches="\[EbugForm\]" />
    <include objecttype="Table" matches="\[EbugStatus\]" />
    <include objecttype="Table" matches="\[EbugUpload\]" />
    <include objecttype="Table" matches="\[Field\]" />
    <include objecttype="Table" matches="\[Item\]" />
    <include objecttype="Table" matches="\[OEM\]" />
    <include objecttype="Table" matches="\[Product\]" />
    <include objecttype="Table" matches="\[Role\]" />
    <include objecttype="Table" matches="\[Template\]" />
    <include objecttype="Table" matches="\[VIPFilterField\]" />
    <include objecttype="Table" matches="\[VIPFunction\]" />
    <include objecttype="Table" matches="\[VIPUser\]" />
    <include objecttype="Table" matches="\[VIPUserFunction\]" />
    <include objecttype="Table" matches="\[VIPUserTemplate\]" />
    <include objecttype="Table" matches="\[VIP_Module_Configuration\]" />
    <include objecttype="Table" matches="\[VIP_Contact_Staff\]" />
    <casesensitive />
    <ignoreidentical />
    <synchronize />
    <force />
    </commandline>
    [code]
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    I've just found out today that the <include> and <exclude> XML tags have changed to the following format:

    <include>ObjectType:regex</include>
    for example
    <include>Table:\[Block\]</include>

    Although the format has changed, it's supposed to be backwards-compatible, but I believe there may still be a compatibility problem, so maybe it would be a good idea to adjust your argfile to the new include/exclude format.
  • Hi, Brian:

    You are right. The compatibility problem is not resolved even I change new XML format. Our server is installed as "Chinese_Taiwan_Stroke_Bin"(case-sensitive), the default is "Chinese_Taiwan_Stroke_CI_AI". I guess it may be the problem. Could you please confirm if it works uder the sql collation ? Thanks a lot.


    Mago
  • Hi Mago,
    Please could you confirm if you can compare the databases with SQL Compare 5.X. (ie do you get "A duplicate object name has been found" error when running SQL Compare.) Thank you.
    regards
    David Connell
  • Dear David:


    I try sql compare and get the same error in sql compare application. But when I check the option : case sensitive, I could do sql compare. (The resuilt is fail because there are too many dependancy issues)

    But I'm not sure why sql data compare relates sql compare. I know the table schema which I do sql data compare are all the same.

    If any information I could provide, please feel free to tell me.


    Regards,
    Mago
  • Dear Mago,
    Is it possible to have a copy of your database. If so please email it to me at [email protected]
    Thank you.
    David
  • Hi Mago,
    Thank you for your data...

    I think that the confusion has occurred with the
    <casesensitive />
    This means that the regular expressions that are being used are case sensitive, not that the database/mappings are being treated as case sensitive.
    As the default options is not case sensitive if you specify the additional line
    <options>none</options> in your XML file this will then work correctly.
    You may wish to specify some of the options.
    However I would recomend that you set up a SQL Data Compare project and then use the project in the command line, because you will then be able to do cool things like map up some of your other tables with custom comparison keys. etc.
    Hope that helps.
    Best regards
    David
This discussion has been closed.