What are the challenges you face when working across database platforms? Take the survey

Advice on XML argfile tags

dakaratekiddakaratekid Posts: 12
edited January 9, 2007 2:01PM in SQL Compare Previous Versions

I am using the sqltools command line sqlcompare.exe. I am able to generate both snapshots, and a comparison file. When I pass it an xml argfile, most of my options are being ignored for both makesnapshot and for the report attributes. Specifically, identical information is reported, replication triggers are included, and many of my exclusions are included. Furthermore, the report is an 11 meg file, and it is nearly impossible for me to parse through it to debug, because it brings my workstation to a crawl. Also, the pipe "|" is used in my exclusions representing a logical 'or'. Is there a logical 'and' designator? The ampersand just throws errors.

Can anybody spot some obvious problems for me?

<?xml version="1.0"?>

<?xml version="1.0"?>



  • Options
    arghh...looks like I posted this in the wrong forum. Mods, can you move this to the SQLToolkits forum?

  • Options
    Eddie DEddie D Posts: 1,789 Rose Gold 5
    Hi Thank you for your post into the Forum.

    Looking at your Arg File for making a snapshot, you have included a number of options that do not need to be there. For creating a snapshot file all you need is the following syntax in your arg file:

    <?xml version="1.0"?>

    As for your second arg file to perform a comparison between two snapshots. The <includeIdentical>False</includeIdentical> option is ONLY for the report. Therefore the report file you have generated in the arg file should not contain identical objects. The <out> file will still shown what is identical, the out file is the replacement for the Results Summary view in the GUI, the GUI still displays the identical objects.

    When using the <exclude> or <include> options and you specify the object you use to include or exclude is written as a regular expression. Therefore you must use the escape character '\' to escape fullstops and square brackets for example /include:table:\[dbo\]\.\[tablename\]. So including this into an arg file example syntax could be as follows:

    <?xml version="1.0"?>

    When running your command line task and call your arg file, you may want to add the /verbose switch. This option records the actions of the options into the <out> file. For example sqlcompare /argfile:'path to file.xml' /verbose.

    I hope the above helps you set up your arg file.

    Best Regards
    Red Gate Software
    Technical Support
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Options
    Thanks Eddie,

    Can you comment on my specific use of regular expressions from the OP? Specifically, the logical 'or' (|) seems out of place on an exclude. Is there a logical ‘and’ operator? The ‘&’ causes errors. I’m pretty well versed in regular expressions, but do I specifically have to schema/owner qualify my excludes with \[dbo\]\. ?? I understand the '.' has special meaning, i.e any character. Is it sufficient to write them as I have them? Could I instead write them as:
        &lt;exclude&gt;StoredProcedure:.+sp_MS.+| .+Deprecated_.+|.+sync_obj.+|.+sys.+| .+MS.+&lt;/exclude&gt;

    Thanks again.
Sign In or Register to comment.