How can we help you today? How can we help you today?

Multiple snapshot create error

I am trying to create a procedure that will create snapshots nightly as part of a job using XML instead of a batch file. I would like to run this as one file, not have to loop through it. I can get the xml file created like this:

<?xml version="1.0"?>
<commandline>
<server1>PHOEBE</server1>
<database1>EFBin2005_SLC</database1>
<username1>username</username1>
<password1>password</password1>
<makesnapshot>PHOEBE_EFBin2005_SLC_2007-04-30 16:56:19.617.snp</makesnapshot>
</commandline>
<commandline>
<server1>PHOEBE</server1>
<database1>EFFileBin2006Test</database1>
<username1>username</username1>
<password1>password</password1>
<makesnapshot>PHOEBE_EFFileBin2006Test_2007-04-30 16:56:19.617.snp</makesnapshot>
</commandline>
<commandline>
<server1>PHOEBE</server1>
<database1>EFFileBin2006Test_SLC</database1>
<username1>username</username1>
<password1>password</password1>
<makesnapshot>PHOEBE_EFFileBin2006Test_SLC_2007-04-30 16:56:19.617.snp</makesnapshot>
</commandline>


This code works for one snapshot but not multiple snapshots. The error message is there are multiple root elements of the XML document. Is there a simple modification I need to make to the XML file to get this to work?
cpoul
0

Comments

1 comment

  • Eddie D
    Hi

    I do not think there is a easy fix for what you are trying to achieve.

    You use the XML file to specify the command line arguments to save typing out a long and complex command line argument. Also the XML file as the added benefit of being easier to read.

    To take snapshots of multiple databases in a similar manner to your method you would require multiple xml agrument files.

    Therefore your batch file may look something like this

    SQLCompare /argfile:XMLfilename1.xml

    SQLCompare /argfile:XMLfilename2.xml

    SQLCompare /argfile:XMLfilename3.xml

    and so.

    Eddie Davis
    Red Gate Software Ltd
    Technical Support Engineer
    Eddie D
    0

Add comment

Please sign in to leave a comment.