cancel
Showing results for 
Search instead for 
Did you mean: 

Exitstatus of dbsrv12 with the -ad option

Former Member
0 Kudos

Hi,

I'm scripting a validation script on linux and can't find any spec on exitstatus of dbsrv12 when it is started with the -ad option to apply transaction log files.

And I'm finding the route to validate a backup a bit cumbersome. First make a copy of the last full backup, and all the incremental transaction log files.

Then apply all transactions log files.

Make another copy, so that you could apply new transaction logs to the one you have.

Validate the copy.

Anyone who have a validation script for linux. Or windows, and I'll translate it to unix.

Best regards

Ove Halseth

Accepted Solutions (1)

Accepted Solutions (1)

JasonHinsperger
Advisor
Advisor
0 Kudos

The exit codes for the server process are defined here:

SQL Anywhere Exit Codes

I agree that the validation process is cumbersome and needs some work.  We are working on making it simpler in a future release.

hth,

--Jason

Answers (1)

Answers (1)

jeff_albion
Employee
Employee
0 Kudos

Hi Ove,


And I'm finding the route to validate a backup a bit cumbersome. First make a copy of the last full backup, and all the incremental transaction log files. Then apply all transactions log files.

Just a quick note that you do not neccessarily have to do this specific procedure today to validate the database and transaction log files:

  1. The database backup can be validated without applying the incremental transaction log files. The incremental transaction log files can be validated separately by using the Log Translation Utility (dbtran) - if the log files translate successfully through the utility, they are valid. As Jason mentions in the link above, the exit code of dbtran will reflect the success of the translation.
  2. You can directly validate the original backup in read-only mode (without a second copy) if you ensure that there are no open transactions on the database to be recovered when you create the backup via the BACKUP statement or the Backup Utility (dbbackup). You can do this with one of the following syntax options:
    BACKUP DATABASE DIRECTORY 'c:\\backup'
    WAIT BEFORE START
    WITH CHECKPOINT LOG NO COPY
    BACKUP DATABASE DIRECTORY 'c:\\backup'
    WAIT BEFORE START
    WITH CHECKPOINT LOG RECOVER
    dbbackup -wb -k nocopy ...
    dbbackup -wb -k recover ...

    You can then directly start the backup database in read-only mode and validate it:
    dbsrv12 -n validate_engine c:\backup\mydatabase.db -r

    Be aware of the differences in backup behaviour though by choosing this syntax - notably the "WAIT BEFORE START" clause will force the backup to wait until all open transactions have been closed.

Regards,

Jeff Albion

SAP Active Global Support