Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3.2 Creating a Standby Database for ASM-based Storage

4. GracefulSwitchover

...

Code Block
[oracle@kiwi701 oracle]$ ./dbvctl -d TEST01 --csd
*** Dbvisit Standby license will expire in 4 days. Please contact Dbvisit Standby
    (www.dbvisit.com) to obtain license.

>>> Running pre-checks please wait... done
What would you like to do:
   1 - Create standby database (and optionally save settings in template)
   2 - Help
   3 - Terminate processing
   Please enter your choice [1]: 1

-------------------------------------------------------------------------------

=>Do you want to use TRANSPORTABLE MEDIA to transfer the database backup to the
standby server? Transportable media is an external device such as a USB drive
that is first plugged into the primary server and then manually transferred to
the standby site and plugged into the standby server to continue the process.
It can be used for large databases or slow networks.
Specifying No means the network will be used to transfer the database backup.
[N]:
Your input: N

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------

=>Do you want to use SHARED SPACE to backup the database? Shared space is a
location accessible on both SOURCE and DESTINATION. Backup will not need to be
transfered from SOURCE to DESTINATION. [N]:
Your input: N

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------

=>Do you want to perform backup, transfer and restore operations in parallel
when possible? [Y]:
Your input: Y

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------

=>Do you want to ship archive logs from the primary database while creating the
standby database? [Y]:
Your input: Y

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------
A temporary location must be specified on kiwi701 where the database will be
backed up to first.
This location must be big enough to hold RMAN backup of the whole database
(3.16GB).

=>Specify the location on this server: [/usr/tmp]:
Your input: /usr/tmp

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------
A temporary location must be specified on kiwi702 where the database backup
will be copied to before moving to specified locations.

=>Specify location on remote server: [/usr/tmp]:
Your input: /usr/tmp

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------

=>Do you want to register a newly created standby database with Oracle Restart?
[Y]:
Your input: Y

Is this correct? <Yes/No> [Yes]:

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
SID            NAME                                    VALUE

*              audit_file_dest                         /u01/app/oracle/admin/TEST01/adump
*              compatible                              18.0.0
*              db_block_size                           8192
*              db_create_file_dest                     +DATA
*              db_name                                 TEST01
*              db_recovery_file_dest                   +FRA
*              db_recovery_file_dest_size              21474836480
*              db_unique_name                          TEST01
*              diagnostic_dest                         /u01/app/oracle
*              dispatchers                             (PROTOCOL=TCP) (SERVICE=TEST01XDB)
*              enable_pluggable_database               true
*              instance_mode                           READ-WRITE
*              nls_language                            AMERICAN
*              nls_territory                           AMERICA
*              open_cursors                            300
*              pga_aggregate_target                    268435456
*              processes                               320
*              remote_login_passwordfile               EXCLUSIVE
*              sga_target                              805306368
*              spfile                                  +DATA
*              undo_tablespace                         UNDOTBS1

-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]:

Validating oracle database parameters... please wait
=>SUCCEEDED

-------------------------------------------------------------------------------

=>Create standby database template for TEST01 using provided answers? [Y]:
Your input: Y

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------

=>Continue with creating a standby database? (If No processing will terminate,
the saved template will be available for future use) [Y]:
Your input: 1

Is this correct? <Yes/No> [Yes]:

>>> We will now run a pre-flight check before standby database creation. An attempt will be
    made to create a standby (s)pfile using Oracle standby database parameters, followed by
    trying to start the standby instance. If this step fails, then please double-check the
    following items before re-running dbvctl again:

    1) Review the standby database parameters you have supplied and provide valid values
    unless a template is used.
    2) Recreate the template to provide valid values for standby database parameters if a
    template is used.

>>> Running pre-flight check for standby creation, please wait... done

>>> Creating standby control file... done

======================================================
WARNING: FORCE_LOGGING is disabled in the primary database!
======================================================


>>> Total database size for TEST01 is 3.16GB

>>> Started logship process (pid 80634)

>>> Backing up primary database...

    Backing up datafile 1... done
    Backing up datafile 3... done
    Backing up datafile 4... done
    Backing up datafile 5... done
    Backing up datafile 6... done
    Backing up datafile 7... done
    Backing up datafile 8... done
    Backing up datafile 9... done
    Backing up datafile 10... done
    Backing up datafile 11... done
    Backing up datafile 12... done

>>> Transferring backup from kiwi701 to kiwi702...

    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_1_0g1qmg8u_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_3_0i1qmga5_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_4_0k1qmgb1_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_5_0m1qmgb5_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_6_0o1qmgbn_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_7_0q1qmgck_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_8_0s1qmgco_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_9_0u1qmgcu_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_10_101qmgdg_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_11_121qmgec_1_1.RMAN... done
    Transferring /usr/tmp/DBV_TEST01_CSD_DBF_12_141qmgeg_1_1.RMAN... done

>>> Starting standby database TEST01 on kiwi702 mount... done

>>> Restoring datafiles on kiwi702...

    Restoring datafile 1... done
    Restoring datafile 3... done
    Restoring datafile 4... done
    Restoring datafile 5... done
    Restoring datafile 6... done
    Restoring datafile 7... done
    Restoring datafile 8... done
    Restoring datafile 9... done
    Restoring datafile 10... done
    Restoring datafile 11... done
    Restoring datafile 12... done

>>> Renaming standby redo logs and tempfiles on kiwi702... done

>>> Completing standby database creation... done

>>> Standby database created.

>>> Performing checkpoint and archiving logs... done

>>> Synchronising standby... done

PID:80077
TRACE:80077_dbvctl_csd_TEST01_202304280011.trc

4. GracefulSwitchover

Code Block
[oracle@dbvel81 oracle]$ ./dbvctl -d TEST01 -o switchover
=============================================================
Dbvisit Standby Database Technology (11.3.0) (pid 50249)
dbvctl started on dbvel81: Wed Apr 12 19:03:53 2023
=============================================================

>>> Starting Switchover between dbvel81 and dbvel82

Running pre-checks       ... done

=>Enter Custom User Script to run after Switchover is complete on dbvel81
(leave blank for no script): []: /home/oracle/scripts/switchover.sh

=>Enter Custom User Script to run after Switchover is complete on dbvel82
(leave blank for no script): []: /home/oracle/scripts/switchover.sh

=>Do you want to proceed with Graceful Switchover? [no]: yes
Your input: 1

Is this correct? <Yes/No> [Yes]:
Pre processing           ... done
Processing primary       ... done
Processing standby       ... done
Converting standby       ... done
Converting primary       ... done
Completing               ... done
Synchronizing            ... done
Post processing          ... done

>>> Graceful switchover completed.
    Primary Database Server: dbvel82
    Standby Database Server: dbvel81

>>> Dbvisit Standby can be run as per normal:
    dbvctl -d TEST01

As part of the Switchover process, the primary and standby controlfiles have been exchanged.Unless you are using RMAN catalog database, you may need to cross-check all backups and review RMAN settings using the SHOW ALL command on the new Primary/Standby databases. Confirm the path set for the SNAPSHOT CONTROLFILE NAME TO setting is valid on both sides.
PID:50249
TRACE:50249_dbvctl_switchover_TEST01_202304121903.trc

=============================================================
dbvctl ended on dbvel81: Wed Apr 12 19:07:09 2023
=============================================================

ASM → ASM

Code Block
[oracle@kiwi701 oracle]$ ./dbvctl -d TEST01 -o switchover
=============================================================
Dbvisit Standby Database Technology (11.3.0) (pid 5024983016)
dbvctl started on dbvel81kiwi701: WedFri Apr 1228 1900:0321:5328 2023
=============================================================

>>> Starting Switchover between dbvel81kiwi701 and dbvel82kiwi702

Running pre-checks       ... done

=>Enter Custom User Script to run after Switchover is complete on dbvel81kiwi701
(leave blank for no script): []: /home/oracle/scripts/switchover.sh

=>Enter Custom User Script to run after Switchover is complete on dbvel82kiwi702
(leave blank for no script): []:
/home/oracle/scripts/switchover.sh

=>Do you want to proceed with Graceful Switchover? [no]: yes
Your input: 1

Is this correct? <Yes/No> [Yes]:
Pre processing           ... done
Processing primary       ... done
Processing standby       ... done
Converting standby       ... done
Converting primary       ... done
Completing               ... done
Synchronizing            ... done
Post processing          ... done

>>> Graceful switchover completed.
    Primary Database Server: dbvel82kiwi702
    Standby Database Server: dbvel81kiwi701

>>> Dbvisit Standby can be run as per normal:
    dbvctl -d TEST01

As part of the Switchover process, the primary and standby controlfiles have been exchanged.Unless you are using RMAN catalog database, you may need to cross-check all backups and review RMAN settings using the SHOW ALL command on the new Primary/Standby databases. Confirm the path set for the SNAPSHOT CONTROLFILE NAME TO setting is valid on both sides.
PID:5024983016
TRACE:5024983016_dbvctl_switchover_TEST01_202304121903202304280021.trc

=============================================================
dbvctl ended on dbvel81kiwi701: WedFri Apr 1228 1900:0728:0930 2023
=============================================================

...

Code Block
[oracle@dbvel82 oracle]$ ./dbvctl -d TEST01 -o reinstate
=============================================================
Dbvisit Standby Database Technology (11.3.0) (pid 42544)
dbvctl started on dbvel82: Wed Apr 12 19:39:15 2023
=============================================================


>>> Running pre-checks please wait...
>>> Validating backup of the standby database... done
done

-------------------------------------------------------------------------------
Standby Backup summary
-------------------------------------------------------------------------------
tag                           DBV_TEST01_41621
location                      /usr/tmp
type                          backupset
db_unique_name                TEST01
server                        dbvel82
resetlogs_id                  1090236030
resetlogs_time                2021-12-02:11:20:30
created_on                    2023-04-12 19:34:26
created_on_utc                2023-04-12 23:34:26
status                        VALID

Files:
DBV_TEST01_41621_0v1pee68_31_1_1.bkp
DBV_TEST01_41621_101pee7v_32_1_1.bkp
DBV_TEST01_41621_111pee8o_33_1_1.bkp
DBV_TEST01_41621_CONTROL.CTL

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
>>> Reinstating standby will result in permanent removal of all current database files.

=>Proceed with reinstating? [no]: yes
Your input: 1

Is this correct? <Yes/No> [Yes]:

>>> Shutting down the database... done

>>> Removing database files... done

>>> Restoring standby control file... done

>>> Starting standby database... done

>>> Restoring standby database... done
Standby database reinstated.

=============================================================
dbvctl ended on dbvel82: Wed Apr 12 19:42:01 2023
=============================================================

...