We're here to help!

Dbvisit Standby Basic Command Line Interface (CLI) Commands

Follow

Read our docs This article covers Dbvisit standby Version 8 and version 9 Basic CLI commands

  • Primary = dbv1
  • Standby = dbv2
  • DB and DDC name = DEV 

1. Sending Logs

dbvctl -d <DDC>

[oracle@dbv1 standby]$ ./dbvctl -d DEV
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 616)
dbvctl started on dbv1: Wed Mar 11 10:47:51 2020
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)... done
Thread: 1 Archive log gap: 0. Transfer log gap: 0

Note FORCE_LOGGING is disabled in the primary database.

>>> Sending heartbeat message... skipped
>>> Performing a log switch... done
>>> Transferring Log file(s) from DEV on dbv1 to dbv2:

thread 1 sequence 11 (o1_mf_1_11_h6j2rcwg_.arc)... done

=============================================================
dbvctl ended on dbv1: Wed Mar 11 10:48:00 2020
=============================================================

 

2. Applying  Logs

dbvctl -d <DDC>

[oracle@dbv2 standby]$ ./dbvctl -d DEV
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 1123)
dbvctl started on dbv2: Wed Mar 11 10:48:08 2020
=============================================================

>>> Applying Log file(s) from dbv1 to DEV on dbv2:

thread 1 sequence 11 (1_11_1012922601.arc)... done
Last applied log(s):
thread 1 sequence 11

Next SCN required for recovery 1091004 generated at 2020-03-11:10:47:55 +13:00.
Next required log thread 1 sequence 12

=============================================================
dbvctl ended on dbv2: Wed Mar 11 10:48:10 2020
=============================================================

 

3. Check Log gap report

dbvctl -d <DDC> -i

[oracle@dbv1 standby]$./dbvctl -d DEV -i
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 653)
dbvctl started on dbv1: Wed Mar 11 10:48:18 2020
=============================================================

Dbvisit Standby log gap report for DEV at 202003111048:
-------------------------------------------------------------
Description | SCN | Timestamp
-------------------------------------------------------------
Source 1091017 2020-03-11:10:48:19 +13:00
Destination 1091004 2020-03-11:10:47:55 +13:00

Standby database time lag (DAYS-HH:MI:SS): +00:00:24

Report for Thread 1
-------------------
SOURCE
Current Sequence 12
Last Archived Sequence 11
Last Transferred Sequence 11
Last Transferred Timestamp 2020-03-11 10:48:00

DESTINATION
Recovery Sequence 12

Transfer Log Gap 0
Apply Log Gap 0
=============================================================
dbvctl ended on dbv1: Wed Mar 11 10:48:21 2020
=============================================================

 

4. To Display the current license information run the next command:

dbvctl -d <ddc> -l

[oracle@dbv1 standby]$ ./dbvctl -d DEV -l
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 694)
dbvctl started on dbv1: Wed Mar 11 10:50:39 2020
=============================================================

>>> Dbvisit Standby License
License Key : 4jo70-qwp4l-7gplh-g1cji-9viz1-00unv-84r6l
customer_number : 0
dbname :
expiry_date : 2020-04-02
os :
sequence : 1
software_features : 10000000
status : VALID
version : 9

=============================================================
dbvctl ended on dbv1: Wed Mar 11 10:50:39 2020
=============================================================

 

5. Creating A Support Package

dbvctl -d <ddc> -f support_package -a pid=PID

[oracle@dbv1 standby]$ ./dbvctl -d DEV -f support_package -a pid=2169
Support package /usr/dbvisit/standby/support/2169_DEV_201908282118.tar.gz created.

6. Start and Stop daemon

dbvctl -d DEV -D start

[oracle@dbv1 standby]$ ./dbvctl -d DEV -D start
Starting Dbvisit Daemon...
Started successfully.
dbvctl -d DEV -D stop

[oracle@dbv1 standby]$ ./dbvctl -d DEV -D stop
Stopping Dbvisit Daemon...
Successfully stopped.

 

7. Resend single archive log 

dbvctl -d DEV -r sequence# -t thread#

[oracle@dbv1 standby]$ ./dbvctl -d DEV -r 12 -t 1
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 804)
dbvctl started on dbv1: Wed Mar 11 10:57:41 2020
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)... done
Thread: 1 Archive log gap: 1. Transfer log gap: 0

Note FORCE_LOGGING is disabled in the primary database.

>>> Transferring Log file(s) from DEV on dbv1 to dbv2:

thread 1 sequence 12 (o1_mf_1_12_h6j339op_.arc)... done

=============================================================
dbvctl ended on dbv1: Wed Mar 11 10:57:46 2020
=============================================================

 

8. Resend all the archive logs and update repository

dbvctl -d DEV -R

[oracle@dbv1 standby]$ ./dbvctl -d DEV -R
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 849)
dbvctl started on dbv1: Wed Mar 11 10:59:22 2020
=============================================================

Note FORCE_LOGGING is disabled in the primary database.

>>> Resynch option given. Dbvisit Standby configuration will be copied to dbv2...
>>> Transferring Log file(s) from DEV on dbv1 to dbv2:

thread 1 sequence 12 (o1_mf_1_12_h6j339op_.arc)... done

=============================================================
dbvctl ended on dbv1: Wed Mar 11 10:59:27 2020
=============================================================
 

9. Recreating A Corrupt Standby Control File

dbvctl -f create_standby_ctl -d <ddc>

[oracle@dbv1 standby]$ ./dbvctl -f create_standby_ctl -d DEV
=>Replace current standby control files on dbv2 with new standby control file?
<Yes/No> [No]: Yes

>>> Create standby control file... done

>>> Copy standby control file to dbv2... done

>>> Recreate standby control file... done

>>> Standby controlfile(s) on dbv2 recreated. To complete please run dbvctl on the primary, then on the standby.
 
10. Refreshing Corrupted Corrupted Datafiles
dbvctl -f refresh_datafile -d <ddc> -a file_id=<file_id>

[oracle@dbv1 standby]$ ./dbvctl -f refresh_datafile -d DEV -a file_id=3

>>> Back up datafile 3... done

>>> Transfer backup of datafile 3 to standby server... done

>>> Catalog backup... done

>>> Restore datafile 3... done

>>> Datafile 3 refresh complete
From: /u01/app/oracle/oradata/DEV/undotbs01.dbf on dbv1
To: /u01/app/oracle/oradata/DEV/undotbs01.dbf on dbv2
 

11. Finding The Location Of The Oracle Alert Log

dbvctl -f alertlog_name -d <ddc>

[oracle@dbv1 standby]$ ./dbvctl -f alertlog_name -d DEV
/u01/app/oracle/diag/rdbms/dev/DEV/trace/alert_DEV.log

 

 12. Starting & Stopping Databases

dbvctl -d <DDC> -o start|stop|restart

[oracle@dbv2 standby]$ ./dbvctl -d DEV -o start
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 1765)
dbvctl started on dbv2: Wed Mar 11 11:02:41 2020
=============================================================

Starting instance DEV...
Standby Database DEV started on dbv2.

=============================================================
dbvctl ended on dbv2: Wed Mar 11 11:02:47 2020
=============================================================

 

13. Open The Standby Database in Read-Only Mode for Reporting Purposes

dbvctl -d <ddc> -o open|read

[oracle@dbv2 standby]$ ./dbvctl -d DEV -o open
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 1851)
dbvctl started on dbv2: Wed Mar 11 11:04:47 2020
=============================================================

>>> Running pre-checks please wait... done
Open Standby instance DEV in READ ONLY mode...
Standby instance DEV on dbv2 opened in READ ONLY mode.
Log files cannot be applied to Database while in READ ONLY mode.
Database tempfile(s) may need to be added to this database.

=============================================================
dbvctl ended on dbv2: Wed Mar 11 11:04:48 2020
=============================================================

 

14. Copy Changes Made To The DDC Parameter on the Primary to the Standby

dbvctl -d <ddc> -c

[oracle@dbv1 standby]$ ./dbvctl -d DEV -c
=============================================================
Dbvisit Standby Database Technology (9.0.10_0_g064b53e) (pid 998)
dbvctl started on dbv1: Wed Mar 11 11:07:28 2020
=============================================================

>>> Dbvisit Standby configuration copied to dbv2...

=============================================================
dbvctl ended on dbv1: Wed Mar 11 11:07:29 2020
=============================================================

 

15. Pre-checks Before Performing a Graceful Switchover

dbvctl -f  switchover_precheck -d <ddc>

[oracle@dbv1 standby]$ ./dbvctl -f  switchover_precheck -d DEV

Running pre-checks       ... done

Upon completion of Graceful Switchover (GS) the new primary database will have tempfiles and redologs as follows:

REDOLOGS
Group 1: /u01/app/oracle/oradata/DEV/redo01.log
Group 2: /u01/app/oracle/oradata/DEV/redo02.log
Group 3: /u01/app/oracle/oradata/DEV/redo03.log

TEMPFILES
Id 1: /u01/app/oracle/oradata/DEV/temp01.db

 

15. Get oracle init parameter value

dbvctl -f get_init_param -d <ddc> -a name=<param name>

[oracle@dbv1 /usr/dbvisit/standby]$ ./dbvctl -f get_init_param -d DEV -a name=db_create_file_dest
/u01/app/oracle/oradata

 

16.  To test the email configuration set up run the send email command

dbvctl -f send_mail -d <DDC>

[oracle@dbv1 /usr/dbvisit/standby]$ ./dbvctl -f send_mail -d DEV
No attachment provided. Sending a scheduler message...
>>> Sending heartbeat message... done

Have more questions? Submit a request

Comments