Dbvrep console output redirected to file is malformed

Problem Description

Dbvrep command ran against standard output looks following:

 

oracle@dbvlin818.dbvisit.co.nz:/u01/app/oracle/replicate28> ./start-console.sh list status Initializing......done DDC loaded from database (405 variables). Dbvisit Replicate version 2.8.02_rc1 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /u01/app/oracle/replicate28/replicate28-MINE.ddc loaded. Status not available in cache; connecting to all processes to get current status. MINE is running. Currently at plog 1758 and SCN 49450907 (11/01/2016 03:08:12). Could not connect to APPLY process. Process not started or connection refused. OK-0: Completed successfully.

 

When redirected to file, its output is malformed:

oracle@dbvlin818.dbvisit.co.nz:/u01/app/oracle/replicate28> ./start-console.sh list status > list_status.txt oracle@dbvlin818.dbvisit.co.nz:/u01/app/oracle/replicate28> cat list_status.txt Initializing......done DDC loaded from database (405 variables). Dbvisit Replicate version 2.8.02_rc1 Copyright (C) Dbvisit Software Limited. All rights reserved. DDC file /u01/app/oracle/replicate28/replicate28-MINE.ddc loaded. Status not available in cache; connecting to all processes to get current status. MINE is running. Currently at plog 1758 and SCN 49452381 (11/01/2016 03:13:09). Could not connect to APPLY process. Process not started or connection refused. OK-0: Completed successfully.

 

Solution

We are aware of this issue, and our developers are working on a fix. You can cheat the redirected output using following trick:

cat << EOF >/tmp/screenrc.$$ logfile $PWD/dbvout.txt EOF screen -c /tmp/screenrc.$$ -L ./start-console.sh --silent list status oracle@dbvlin818.dbvisit.co.nz:/u01/app/oracle/replicate28> cat dbvout.txt Status not available in cache; connecting to all processes to get current status. MINE is running. Currently at plog 1758 and SCN 49462112 (11/01/2016 03:45:36). Could not connect to APPLY process. Process not started or connection refused. OK-0: Completed successfully.

 

If you need to run these commands from crontab, you should run it through script command: