Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

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:

  1. Name of the VCN: <Name of the VCN>

  2. Choose a Compartment to which the VCN belongs

  3. Configure whole VCN subnet: 10.0.0.0/16

  4. Choose Public subnet: 10.0.0.0/24

  5. Choose Private subnet: 10.0.1.0/24

  6. Press Next button

image-20240614-161615.png

Review the information provided and confirm the VCN creation.

image-20240614-164855.png

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

image-20240617-070901.png

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:

image-20240618-124427.png

Press Manage Private Views button, choose the correct private view and press Save changes

image-20240618-124631.png

Wait until the private view gets created and click it to see more details:

image-20240618-125429.png

Press Create zone, choose any name you wish and press Create

image-20240618-125555.png

Open your zone then:

image-20240618-130022.png

Press Manage records button:

image-20240618-130105.png

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

image-20240618-130242.png

Repeat the same step with your standby machine. You should have output similar to following one, press Publish changes button:

image-20240618-130649.png

Confirm the changes:

image-20240618-130827.png

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>

image-20240618-142347.png

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

image-20240618-143819.png

End result should look like this:

image-20240618-143901.png

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.

  • Install Control Center on the compute instance machine

  • Install Dbvisit Agent on both database machines

Use following document how to install Dbvisit Multiplatform: https://dbvisit.atlassian.net/wiki/spaces/DSMP/pages/3242000447/Installing+Standby+Multiplatform#Installing-Standby-Multiplatform-on-Unix

Create Standby Database using Dbvisit Multiplatform

You can follow this guide, how to create Standby database on Oracle OCI to OCI: https://dbvisit.atlassian.net/wiki/x/JQAJ2w

  • No labels