Options

out of order delta file

I'm using SCO32.exe, version 3.1.5.1321.  CLI.

A user renamed a table.   The table had constraints on it.  He did not rename the constraints.

The ensuing delta had the create (new) table command before the drop (old) table command.  When i applied the delta, i got errors saying the constraint already existed.  I flipped the order manually (placing the drop first) which succeeded, but am trying to limit human intervention.

Have you guys discussed this?  if so, please me point me to the conversation.   else, any thoughts?

Tagged:

Answers

  • Options
    Alex BAlex B Posts: 1,133 Diamond 4
    Hi @cax20,

    Can you try this on the latest version of Schema Compare for Oracle and see if you get the same results?  The latest version is 4.0.10 (download here).

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Options
    cax20cax20 Posts: 2 New member
    I will.  but it will take a while, as i have to go through an approval cycle for all foss/cots upgrades.

    Are you suggesting this because you know of changes to newer versions that would help with my problem?   i.e. should i be optimistic?
  • Options
    Hi @cax20,

    I've just finished going over this and it seems you will need to use the /resolve:<issue>:<resolution> switch to resolve the conflict, even in the latest version.

    The command I ran first was just to create the deployment script file rather than deploy it:
    "C:\Program Files\Red Gate\Schema Compare for Oracle 4\SCO.exe" /source:scott/tiger@TNS{schema} /target:scott/tiger@TNS{schema} /scriptfile:"E:\Path\to\script.sql"

     and it provided the content of the conflict:
    Finding issues with deployment

    Issue:       ConstraintNameAlreadyInTarget: schema.the_constraint
    Resolutions: UseSystemName,Ignore
    Resolution:  UseSystemName
                 Use an automatically generated name

    Issue:       IndexNameAlreadyInTarget: schema.the_constraint
    Resolutions: UseSystemName,Ignore
    Resolution:  UseSystemName
                 Use an automatically generated name

    So the command would become
    ConstraintNameAlreadyInTarget:UseSystemName"C:\Program Files\Red Gate\Schema Compare for Oracle 4\SCO.exe" /source:scott/tiger@TNS{schema} /target:scott/tiger@TNS{schema} /scriptfile:"E:\Path\to\script.sql" /resolve:
    This will cause a system generated constraint name to be used and the deployment (or created deployment script) will be run successfully.

    Otherwise you will need to manually edit the script to reorder the command.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.