Comments
3 comments
-
Hi,
To include missing/different/identical in the XML command file, you can use<Include>Missing</include>
I take it the second request is to redirect output from SQLDATACOMPARE.exe to a file formatted by date. I believe you can create a batch file using the DATE command...REM assuming your dateformat is dd/mm/YYYY! @For /F "tokens=1,2,3 delims=/ " %%A in ('Date /t') do @( Set Day=%%A Set Month=%%B Set Year=%%C ) sqldatacompare.exe /argfile:x.xml >> %Day%.%Month%.%Year%.txt
-
So I use
<include>Table:\[TableName\]</include>
AND
<Include>Missing</include>
<Include>Different</include> -
Yes.
Add comment
Please sign in to leave a comment.
/Include:Missing /Include:Different /Include:Identical
The reason I use include:identical is I also have the output directed to a log file with a date stamp using command line options.
I am trying to convert this batchfile to use an XML argument file
I am having two problems.
#1: I cannot see how to do /Include:Missing /Include:Differrent
in the XML file
#2: I cannot get a date stamp in my output file, I tried using
/Arfile: [XML filename].XML >> [OutputFileName] but SQLDATACOMPARE did not like that.
Basically I need the XML Equivalent of
set LOG_TIMESTAMP=%date:~4,2%-%date:~7,2%-%date:~10,4%_%time:~0,2%%time:~3,2%
sqldatacompare /s1:Server1 /s2:Server2 /db1:DataBase1 /db2:Database2 /u1:userid1 /p1:password1 /u2:userid2 /p2:password2 /include:table:\[TableName\] /Include:Missing /Include:Different /Include:Identical /Out:c:\OutPutFileName_%LOG_TIMESTAMP%TXT
Does anyone have any suggestions?