Create Virtual Cloud Network
To create a Virtual Cloud Network, press top right menu button, choose Networking option and press Virtual Cloud Networks link:
From the top menu press Start VCN Wizard button:
Choose “Create VCN with Internet Connectivity option and press Start VCN Wizard button:
Fill in the VCN Creation form:
Name of the VCN: <Name of the VCN>
Choose a Compartment to which the VCN belongs
Configure whole VCN subnet: 10.0.0.0/16
Choose Public subnet: 10.0.0.0/24
Choose Private subnet: 10.0.1.0/24
Press Next button
Review the information provided and confirm the VCN creation.
Create Database Systems
To create the database machines, press Top left menu, then Oracle Database and click on the Oracle Base Database Service.
Click Create DB System:
Fill in following things:
Compartment
Name of the Machine
Availability Domain
Shape of the Machine
Standard Oracle Database Edition
Define a method for access. Either create new keys, upload your own key, or paste the public key
Choose the VCN - Virtual Cloud Network
Select either public or private interface. If you are going to login from internet, choose the public one
Enter prefix of the machine network name
Press Next
In the Database Creation Menu:
Fill in the desired Database Name
Choose a password for sys user. Hint: #1mpoSSible_Pssw0rd
Disable database backups, if the machine is only for testing purposes
Press Create DB System
Create Standby Database Machine
Repeat the same steps as for Primary Machine.
Also please enter the same database name during standby database machine creation.
New DB unique name will be issued. Remember to note this down.
Create DNS Resolver (optional)
In order to easily resolve hostname of each machines, you can either edit /etc/hosts file or create an OCI DNS resolver on the VCN you created earlier. Let’s create a DNS resolver for our two machines.
Open the Virtual Cloud Network created before and press the DNS resolver button:
Press Manage Private Views button, choose the correct private view and press Save changes
Wait until the private view gets created and click it to see more details:
Press Create zone, choose any name you wish and press Create
Open your zone then:
Press Manage records button:
Then press the Add record button and then:
specify a hostname of primary machine
specify type of IPV4 address
put there your machine’s ip address
press Add record
Repeat the same step with your standby machine. You should have output similar to following one, press Publish changes button:
Confirm the changes:
You can now check, that the resolution of the new machines work:
[opc@machine2 ~]$ ping machine1.oci2oci.lab PING machine1.oci2oci.lab (10.0.0.202) 56(84) bytes of data. ^C --- machine1.oci2oci.lab ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2030ms [opc@machine2 ~]$ ping machine2.oci2oci.lab PING machine2.oci2oci.lab (10.0.0.123) 56(84) bytes of data. 64 bytes from machine2.sub06141618210.vcnoci2oci.oraclevcn.com (10.0.0.123): icmp_seq=1 ttl=64 time=0.016 ms 64 bytes from machine2.sub06141618210.vcnoci2oci.oraclevcn.com (10.0.0.123): icmp_seq=2 ttl=64 time=0.031 ms
The IP addresses are being resolved correctly, but the security lists are too restrict to let the ping go through the network.
Update Security Lists
In order to be able to connect from one machine to another, you need to open ports in security lists.
You will have to install netcat utility on both machines in order to properly test the network access:
sudo yum install nmap-ncat -y
To update security list please open your Virtual Cloud Network and choose Security Lists menu on the left. Then open the Default Security List for <Your VCN>
Press the Add Ingress Rule and fill in following:
Source CIDR, insert your chosen subnet
Destination port: 7890 - dbvagentmanager, 5533 - NATS (communication between Dbvisit processes), 4433 (Web Interface)
Any description: Eg. dbvagentmanager / NATS / Dbvisit GUI
Press Add Ingress Rule
End result should look like this:
In order to make network communication work, you need to delete following iptables rule on both machines:
sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited
Test Network Communication
To test network communication, you can open a port on one machine using nc command:
nc -l 5533
Then you can test the network connection from the other machine using either nc or telnet command:
[opc@machine2 ~]$ nc -zv machine1.oci2oci.lab 7890 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connected to 10.0.0.202:7890. Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.
Check, that you can connect from standby machine to primary on port 7890 and from primary to standby on ports: 7890, 5533
Drop Database on Standby Machine
The Database Service is created with database running, but you do not need the database to be running on the standby machine. Dbvisit will create a copy of the primary database there. To drop the database, you can follow this procedure:
rman target / RMAN> startup mount force dba; RMAN> drop database including backups noprompt;
Copy Primary Database Wallets
In order to successfully restore backups from primary database, that is encrypted, you need to copy the wallet from primary machine to standby machine. You can find out, where the wallet is using following query:
sqlplus / as sysdba SQL> show parameter wallet_root NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ wallet_root string /opt/oracle/dcs/commonstore/wa llets/TEST01_955_iad
The last part of the parameter is based on db_unique_name, which is different on both machines. You should also consider what will be the db_unique_name of the standby database. In following test, I will reuse the original db_unique_name of the standby database machine.
[oracle@machine1 ~]$ scp -rp /opt/oracle/dcs/commonstore/wallets/TEST01_955_iad/* oracle@machine2.oci2oci.lab:/opt/oracle/dcs/commonstore/wallets/TEST01_492_iad pdb_ocids.json 100% 311 257.8KB/s 00:00 cdb_ocids.json 100% 302 246.4KB/s 00:00 ewallet.p12 100% 5465 4.5MB/s 00:00 cwallet.sso 100% 5510 4.5MB/s 00:00 ewallet_2024061707512097.p12 100% 2553 2.5MB/s 00:00 ewallet.p12.lck 100% 0 0.0KB/s 00:00 cwallet.sso.lck 100% 0 0.0KB/s 00:00 ewallet_2024061707573735.p12 100% 3993 3.5MB/s 00:00
Download and Install Dbvisit Software
There is nothing special in installing Dbvisit Multiplatform in OCI environment.
First we need to create the DBVISIT_BASE directory on both machines:
[root@machine1 ~]# mkdir /usr/dbvisit [root@machine1 ~]# chown oracle:oinstall /usr/dbvisit
Then download the latest release of Dbvisit Multiplatform and start the installation of the agents on both machines. As machine names, provide the service names defined in custom DNS setup (machineX.oci2oci.lab):
[oracle@machine1 dbvisit]$ cd /usr/dbvisit/ [oracle@machine1 dbvisit]$ tar xzf standby-v11.7.1.tar.gz [oracle@machine1 dbvisit]$ ./install-agent-v11.7.1 +----------------------------------------------------------------------+ | ____ _ _ _ __ __ ____ | | / ___|| |_ __ _ _ __ __| | |__ _ _| \/ | _ \ | | \___ \| __/ _' | '_ \ / _' | '_ \| | | | |\/| | |_) | | | ___) | || (_| | | | | (_| | |_) | |_| | | | | __/ | | |____/ \__\__,_|_| |_|\__,_|_.__/ \__, |_| |_|_| | | Copyright 2024 |___/ By Dbvisit | +----------------------------------------------------------------------+ Welcome to Dbvisit StandbyMP setup version v11.7.1. ? Please carefully read the end-user license agreement at https://dbvisit.com/eula. Do you agree to the terms of this agreement? Yes ? Which directory should the software be installed into? /usr/dbvisit - - - You are now configuring the Dbvisit StandbyMP Agent - - - The Agent will listen on the following discovered addresses: - 127.0.0.1 - 10.0.0.202 - 192.168.16.18 ? Agent File Transfer Port: 7890 ? Fully Qualified Domain Name for this host: machine1.oci2oci.lab ? Fully Qualified Domain Name for the Control Center: machine2.oci2oci.lab ? Agent Communications Port: 5533 Each Dbvisit StandbyMP Agent and the Dbvisit StandbyMP Control Center must be configured with the same passphrase. This is how we know that they are all intended to be part of the same system. Please specify a strong passphrase - we suggest at least 12 characters, containing at least 2 numbers and 2 symbols. ? Passphrase: ***** ? Confirm Passphrase: ***** - - - Dbvisit StandbyMP Agent configuration finished - - - - - - Ready to perform installation - - - ? Do you wish to proceed with the setup using the supplied configuration options? Proceed with setup - - - Performing installation - - - Copying software files to '/usr/dbvisit'... Writing Agent configuration file '/usr/dbvisit/standbymp/conf/dbvagentmanager.ini'... - - - File creation complete - - - - - - Configuration Summary - - - Install Directory: /usr/dbvisit Fully Qualified Domain Name for this host: machine1.oci2oci.lab Fully Qualified Domain Name for the Control Center: machine2.oci2oci.lab Agent Communications Port: 5533 Agent File Transfer Port: 7890 - - - Installation Summary - - - The following actions have been performed: - Installed Dbvisit StandbyMP Agent software into: /usr/dbvisit/standbymp - Agent settings are available in the configuration file: /usr/dbvisit/standbymp/conf/dbvagentmanager.ini - Generated new security certificates in: /usr/dbvisit/standbymp/certificates - - - INSTALLATION SUCCESSFUL - - - To enable the installed Dbvisit StandbyMP components to run as system services, you will need to execute some commands as the "root" user in order to complete the setup. To install the system service(s), you can run, substituting the name of the user to run as if it is different from the current user: sudo /usr/dbvisit/standbymp/bin/dbvagentmanager service install --user oracle To start the system service(s), you can run: sudo /usr/dbvisit/standbymp/bin/dbvagentmanager service start [oracle@machine1 dbvisit]$ sudo /usr/dbvisit/standbymp/bin/dbvagentmanager service install --user oracle [oracle@machine1 dbvisit]$ sudo /usr/dbvisit/standbymp/bin/dbvagentmanager service start [oracle@machine1 dbvisit]$
The dbvagentmanager needs to be installed on the standby machine too.
Next we need to install Dbvcontrol (GUI) on the standby machine:
[oracle@machine2 ~]$ ./install-control-v11.7.1 +----------------------------------------------------------------------+ | ____ _ _ _ __ __ ____ | | / ___|| |_ __ _ _ __ __| | |__ _ _| \/ | _ \ | | \___ \| __/ _' | '_ \ / _' | '_ \| | | | |\/| | |_) | | | ___) | || (_| | | | | (_| | |_) | |_| | | | | __/ | | |____/ \__\__,_|_| |_|\__,_|_.__/ \__, |_| |_|_| | | Copyright 2024 |___/ By Dbvisit | +----------------------------------------------------------------------+ Welcome to Dbvisit StandbyMP setup version v11.7.1. ? Please carefully read the end-user license agreement at https://dbvisit.com/eula. Do you agree to the terms of this agreement? Yes ? Which directory should the software be installed into? /usr/dbvisit - - - You are now configuring the Dbvisit StandbyMP Control Center - - - The Control Center will listen on the following discovered addresses: - 127.0.0.1 - 10.0.0.123 - 192.168.16.18 ? Control Center Web Server Port: 4433 ? Agent Communications Port: 5533 Each Dbvisit StandbyMP Agent and the Dbvisit StandbyMP Control Center must be configured with the same passphrase. This is how we know that they are all intended to be part of the same system. Please specify a strong passphrase - we suggest at least 12 characters, containing at least 2 numbers and 2 symbols. ? Passphrase: ***** ? Confirm Passphrase: ***** - - - Dbvisit StandbyMP Control Center configuration finished - - - - - - Ready to perform installation - - - ? Do you wish to proceed with the setup using the supplied configuration options? Proceed with setup - - - Performing installation - - - Copying software files to '/usr/dbvisit'... Writing Control Center configuration file '/usr/dbvisit/standbymp/conf/dbvcontrol.ini'... - - - File creation complete - - - - - - Configuration Summary - - - Install Directory: /usr/dbvisit Control Center Web Server Port: 4433 Agent Communications Port: 5533 - - - Installation Summary - - - The following actions have been performed: - Installed Dbvisit StandbyMP Control Center software into: /usr/dbvisit/standbymp - Control Center settings are available in the configuration file: /usr/dbvisit/standbymp/conf/dbvcontrol.ini - Generated new security certificates in: /usr/dbvisit/standbymp/certificates - - - INSTALLATION SUCCESSFUL - - - To enable the installed Dbvisit StandbyMP components to run as system services, you will need to execute some commands as the "root" user in order to complete the setup. To install the system service(s), you can run, substituting the name of the user to run as if it is different from the current user: sudo /usr/dbvisit/standbymp/bin/dbvcontrol service install --user oracle To start the system service(s), you can run: sudo /usr/dbvisit/standbymp/bin/dbvcontrol service start [oracle@machine2 ~]$ sudo /usr/dbvisit/standbymp/bin/dbvcontrol service install --user oracle [oracle@machine2 ~]$ sudo /usr/dbvisit/standbymp/bin/dbvcontrol service start [oracle@machine2 ~]$
The password specified must match the password specified during the dbvagentmanager installation.
At this moment you should be able to access the GUI on port 4433. You need to open security list port to access the port directly or you can tunnel the port using ssh to connect to it:
Initial login and password are admin/admin. It is recommended to change it immediately once you log in.
Create Standby Database using Dbvisit Multiplatform
Dbvisit need a /etc/oratab entry for ASM instance in order to correctly detect the ASM instance running on the machines. Add similar entry to this one, with correct grid ORACLE_HOME to /etc/oratab:
# This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # TEST01:/u01/app/oracle/product/19.0.0.0/dbhome_1:N +ASM1:/u01/app/19.0.0.0/grid:N
To create the standby Database, press New Configuration menu on the left and Start with Oracle:
As a primary host choose your primary machine (machine1.oci2oci.lab)
From the list of databases on the primary machine, choose the one, that is going to be the source database for standby:
Choose your standby machine as a target of the replication: