Hi, I have two "nice to haves" with regard to the log in Data Compare Pro:
1. When appending the log, is it possible to have it generate a timestamp with each new entry?
2. Is it possible to specify the directory where the logs are stored, I've tried but the "address" seems to get truncated during the running of the script.
EACC_NZ
0

Comments

4 comments

  • Brian Donahue
    Hello,

    Sorry for my confusion, but which log are you referring to?
    Brian Donahue
    0
  • EACC_NZ
    Sorry about the delay - I've been chasing my tail with some other projects of late.

    The logs I refer to are the ones created by Command Line when it runs the Data Compare Scripts. Currently I have three projects running in one batch file (which is scheduled every hour), and the results being appended to a .txt file. With the results being appended without any date/time stamp, it becomes difficult to ascertain exactly when problems have started to occur.

    I hope this makes sense!

    Cheers
    EACC_NZ
    0
  • Brian Donahue
    You can use the date and time commands in your script file to append the dates and times into your script, for example:
    REM Save this test as datasync.bat
    @ECHO OFF
    FOR /F "tokens=1-3 delims=/ " %%i IN ('DATE /T') DO SET thedate=%%i-%%j-%%k
    FOR /F %%i IN ('TIME /T') DO SET thetime=%%i
    ECHO Database Comparison on %thedate% at %thetime% >> DataCompare-%thedate%.txt
    "c:\program files\red gate\sql bundle 5\sqldatacompare" /db1:widgetdev /db2:widgetlive >> DataCompare-%thedate%.txt
    
    Brian Donahue
    0
  • EACC_NZ
    :lol:
    EACC_NZ
    0

Add comment

Please sign in to leave a comment.