Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview
Considerations for Oracle VMs
Quickstarts
Create an Oracle DB
Tutorials
Configure Oracle ASM
Configure Oracle DataGuard
Configure Oracle GoldenGate
Concepts
Architect an Oracle DB
Backup strategy for Oracle DB
Oracle Disaster Recovery options
Resources
Azure Roadmap
Oracle solutions and their deployment on Microsoft
Azure
11/30/2017 • 9 min to read • Edit Online
This article covers information required to successfully deploy various Oracle solutions on Microsoft Azure. These
solutions are based on Virtual Machine images published by Oracle in the Azure Marketplace. To get a list of
currently available images, run the following command:
These images are considered "Bring Your Own License" and as such you will only be charged for compute, storage,
and networking costs incurred by running a VM. It is assumed you are properly licensed to use Oracle software and
that you have a current support agreement in place with Oracle. Oracle has guaranteed license mobility from on-
premises to Azure. See the published Oracle and Microsoft note for details on license mobility.
Individuals can also choose to base their solutions on a custom image they create from scratch in Azure or upload a
custom image from their on premises environment.
This is because for any remote T3 access, WebLogic Server expects the load balancer port and the WebLogic
managed server port to be the same. In the preceding case, the client is accessing port 7006 (the load
balancer port) and the managed server is listening on 7008 (the private port). This restriction is applicable
only for T3 access, not HTTP.
To avoid this issue, use one of the following workarounds:
Use the same private and public port numbers for load balanced endpoints dedicated to T3 access.
Include the following JVM parameter when starting WebLogic Server:
-Dweblogic.rjvm.enableprotocolswitch=true
Next steps
You now have an overview of current Oracle Solutions on Microsoft Azure. Your next step is to deploy your first
Oracle Database on Azure.
Try the Create an Oracle Database on Azure tutorial to get started.
Create an Oracle Database in an Azure VM
7/19/2017 • 6 min to read • Edit Online
This guide details using the Azure CLI to deploy an Azure virtual machine from the Oracle marketplace gallery
image in order to create an Oracle 12c database. Once the server is deployed, you will connect via SSH in order to
configure the Oracle database.
If you don't have an Azure subscription, create a free account before you begin.
Click the Cloud Shell button on the menu in the upper right
of the Azure portal.
If you choose to install and use the CLI locally, this quickstart requires that you are running the Azure CLI version
2.0.4 or later. Run az --version to find the version. If you need to install or upgrade, see Install Azure CLI 2.0.
After you create the VM, Azure CLI displays information similar to the following example. Note the value for
publicIpAddress . You use this address to access the VM.
{
"fqdns": "",
"id":
"/subscriptions/{snip}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "westus",
"macAddress": "00-0D-3A-36-2F-56",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "13.64.104.241",
"resourceGroup": "myResourceGroup"
}
Connect to the VM
To create an SSH session with the VM, use the following command. Replace the IP address with the
publicIpAddress value for your VM.
ssh <publicIpAddress>
$ sudo su - oracle
$ lsnrctl start
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 23-MAR-2017 15:32:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/myVM/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myVM.twltkue3xvsujaz1bvlrhfuiwf.dx.internal.cloudapp.net)
(PORT=1521)))
The listener supports no services
The command completed successfully
dbca -silent \
-createDatabase \
-templateName General_Purpose.dbc \
-gdbname cdb1 \
-sid cdb1 \
-responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword OraPasswd1 \
-systemPassword OraPasswd1 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName pdb1 \
-pdbAdminPassword OraPasswd1 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-storageType FS \
-ignorePreReqs
You also can add ORACLE_HOME and ORACLE_SID variables to the .bashrc file. This would save the environment
variables for future sign-ins. Confirm the following statements have been added to the ~/.bashrc file using editor
of your choice.
# Add ORACLE_HOME.
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
# Add ORACLE_SID.
export ORACLE_SID=cdb1
sqlplus / as sysdba
exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);
3. Open the container PDB1 if not already opened, but first check the status:
4. If the OPEN_MODE for PDB1 is not READ WRITE, then run the followings commands to open PDB1:
You need to type quit to end the sqlplus session and type exit to logout of the oracle user.
sudo su -
2. Using your favorite editor, edit the file /etc/oratab and change the default N to Y :
cdb1:/u01/app/oracle/product/12.1.0/dbhome_1:Y
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the Oracle sign-in
# will not prompt the user for any values.
# Remove "&" if you don't want startup as a background process.
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" &
touch /var/lock/subsys/dbora
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the Oracle sign-in
# will not prompt the user for any values.
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" &
rm -f /var/lock/subsys/dbora
;;
esac
ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
reboot
2. To open the endpoint that you use to access Oracle EM Express remotely, create a Network Security Group
rule with az network nsg rule create as follows:
3. If needed, obtain the public IP address of your VM again with az network public-ip show as follows:
4. Connect EM Express from your browser. Make sure your browser is compatible with EM Express (Flash
install is required):
You can log in by using the SYS account, and check the as sysdba checkbox. Use the password OraPasswd1 that
you set during installation.
Clean up resources
Once you have finished exploring your first Oracle database on Azure and the VM is no longer needed, you can use
the az group delete command to remove the resource group, VM, and all related resources.
az group delete --name myResourceGroup
Next steps
Learn about other Oracle solutions on Azure.
Try the Installing and Configuring Oracle Automated Storage Management tutorial.
Set up Oracle ASM on an Azure Linux virtual
machine
7/31/2017 • 14 min to read • Edit Online
Azure virtual machines provide a fully configurable and flexible computing environment. This tutorial covers basic
Azure virtual machine deployment combined with the installation and configuration of Oracle Automated Storage
Management (ASM). You learn how to:
Create and connect to an Oracle Database VM
Install and configure Oracle Automated Storage Management
Install and configure Oracle Grid infrastructure
Initialize an Oracle ASM installation
Create an Oracle DB managed by ASM
Click the Cloud Shell button on the menu in the upper right
of the Azure portal.
If you choose to install and use the CLI locally, this tutorial requires that you are running the Azure CLI version 2.0.4
or later. Run az --version to find the version. If you need to install or upgrade, see Install Azure CLI 2.0.
Create a VM
To create a virtual machine based on the Oracle Database image and configure it to use Oracle ASM, use the az vm
create command.
The following example creates a VM named myVM that is a Standard_DS2_v2 size with four attached data disks of
50 GB each. If they do not already exist in the default key location, it also creates SSH keys. To use a specific set of
keys, use the --ssh-key-value option.
After you create the VM, Azure CLI displays information similar to the following example. Note the value for
publicIpAddress . You use this address to access the VM.
{
"fqdns": "",
"id": "/subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "eastus",
"macAddress": "00-0D-3A-36-2F-56",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "13.64.104.241",
"resourceGroup": "myResourceGroup"
}
Connect to the VM
To create an SSH session with the VM and configure additional settings, use the following command. Replace the
IP address with the publicIpAddress value for your VM.
ssh <publicIpAddress>
sudo su -
4. ASM requires specific users and roles in order to function correctly. The following commands create the pre-
requisite user accounts and groups:
id grid
The output of this command should list the following users and groups:
uid=3000(grid) gid=54321(oinstall)
groups=54321(oinstall),54322(dba),54345(asmadmin),54346(asmdba),54347(asmoper)
mkdir /u01/app/grid
chown grid:oinstall /u01/app/grid
/usr/sbin/oracleasm configure -i
The output of this command should look similar to the following, stopping with prompts to be answered.
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
cat /proc/partitions
The output of this command should look similar to the following listing of available disks
8 16 14680064 sdb
8 17 14678976 sdb1
8 0 52428800 sda
8 1 512000 sda1
8 2 51915776 sda2
8 48 52428800 sdd
8 64 52428800 sde
8 80 52428800 sdf
8 32 52428800 sdc
11 0 1152 sr0
3. Format disk /dev/sdc by running the following command and answering the prompts with:
n for new partition
p for primary partition
1 to select the first partition
press enter for the default first cylinder
press enter for the default last cylinder
press w to write the changes to the partition table
fdisk /dev/sdc
Using the answers provided above, the output for the fdisk command should look like the following:
Device contains not a valid DOS partition table, or Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf865c6ca.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
4. Repeat the preceding fdisk command for /dev/sdd , /dev/sde , and /dev/sdf .
5. Check the disk configuration:
cat /proc/partitions
8 16 14680064 sdb
8 17 14678976 sdb1
8 32 52428800 sdc
8 33 52428096 sdc1
8 48 52428800 sdd
8 49 52428096 sdd1
8 64 52428800 sde
8 65 52428096 sde1
8 80 52428800 sdf
8 81 52428096 sdf1
8 0 52428800 sda
8 1 512000 sda1
8 2 51915776 sda2
11 0 1048575 sr0
6. Check the Oracle ASM service status and start the Oracle ASM service:
The output of the command should list off the following Oracle ASM disks:
ASMSP
DATA
DATA1
FRA
9. Change the passwords for the root, oracle, and grid users. Make note of these new passwords as you are
using them later during the installation.
passwd oracle
passwd grid
passwd root
3. SSH back into your Oracle VM in Azure in order to move the .zip files into the /opt folder. Then, change the
owner of the files:
ssh <publicIPAddress>
sudo mv ./*.zip /opt
cd /opt
sudo chown grid:oinstall linuxamd64_12102_grid_1of2.zip
sudo chown grid:oinstall linuxamd64_12102_grid_2of2.zip
4. Unzip the files. (Install the Linux unzip tool if it's not already installed.)
5. Change permission:
6. Update configured swap space. Oracle Grid components need at least 6.8 GB of swap space to install Grid.
The default swap file size for Oracle Linux images in Azure is only 2048MB. You need to increase
ResourceDisk.SwapSizeMB in the /etc/waagent.conf file and restart the WALinuxAgent service in order for
the updated settings to take effect. Because it is a read-only file, you need to change file permissions to
enable write access.
Search for ResourceDisk.SwapSizeMB and change the value to 8192. You will need to press insert to enter
insert mode, type in the value of 8192 and then press esc to return to command mode. To write the
changes and quit the file, type :wq and press enter .
NOTE
We highly recommend that you always use WALinuxAgent to configure swap space so that it's always created on
the local ephemeral disk (temporary disk) for best performance. For more information on, see How to add a swap file
in Linux Azure virtual machines.
sudo su - grid
mkdir .ssh
cd .ssh
5. Create a file named authorized_keys . Paste the contents of the key in this file, and then save the file.
NOTE
The key must contain the string ssh-rsa . Also, the contents of the key must be a single line of text.
6. On your client system, start PuTTY. In the Category pane, go to Connection > SSH > Auth. In the Private
key file for authentication box, browse to the key that you generated earlier.
7. In the Category pane, go to Connection > SSH > X11. Select the Enable X11 forwarding check box.
8. In the Category pane, go to Session. Enter your Oracle ASM VM <publicIPaddress> in the host name
dialog box, fill in a new Saved Session name and then click on Save . Once saved, click on open to connect
to your Oracle ASM virtual machine. The first time you connect you are warned the remote system is not
cached in your registry. Click on yes to add it and continue.
Install Oracle Grid Infrastructure
To install Oracle Grid Infrastructure, complete the following steps:
1. Sign in as grid. (You should be able to sign in without being prompted for a password.)
NOTE
If you are running Windows, make sure you have started Xming before you begin the installation.
cd /opt/grid
./runInstaller
Oracle Grid Infrastructure 12c Release 1 Installer opens. (It might take a few minutes for the installer to
start.)
2. On the Select Installation Option page, select Install and Configure Oracle Grid Infrastructure for a
Standalone Server.
3. On the Select Product Languages page, ensure English or the language that you want is selected. Click
next .
11. On the Perform Prerequisite Checks page, the current setup will fail with errors. This is an expected
behavior. Select Fix & Check Again .
12. In the Fixup Script dialog box, click OK .
13. On the Summary page, review your selected settings, and then click Install .
14. A warning dialog box appears informing you configuration scripts need to be run as a privileged user. Click
Yes to continue.
cd /u01/app/grid/product/12.1.0/grid/bin
./asmca
4. In the Configure ASM: Disk Groups dialog box, click the Create button, and then click
Show Advanced Options .
su - oracle
cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
./dbca
5. The Database has been created. On the Finish page, you have the option to unlock additional accounts to
use this database and change the passwords. If you wish to do so, select Password Management -
otherwise click on close .
Delete the VM
You have successfully configured Oracle Automated Storage Management on the Oracle DB image from the Azure
Marketplace. When you no longer need this VM, you can use the following command to remove the resource
group, VM, and all related resources:
Next steps
Tutorial: Configure Oracle DataGuard
Tutorial: Configure Oracle GoldenGate
Review Architect an Oracle DB
Implement Oracle Data Guard on an Azure Linux
virtual machine
7/10/2017 • 9 min to read • Edit Online
Azure CLI is used to create and manage Azure resources from the command line or in scripts. This article describes
how to use Azure CLI to deploy an Oracle Database 12c database from the Azure Marketplace image. This article
then shows you, step by step, how to install and configure Data Guard on an Azure virtual machine (VM).
Before you start, make sure that Azure CLI is installed. For more information, see the Azure CLI installation guide.
az login
az vm availability-set create \
--resource-group myResourceGroup \
--name myAvailabilitySet \
--platform-fault-domain-count 2 \
--platform-update-domain-count 2
az vm create \
--resource-group myResourceGroup \
--name myVM1 \
--availability-set myAvailabilitySet \
--image Oracle:Oracle-Database-Ee:12.1.0.2:latest \
--size Standard_DS1_v2 \
--admin-username azureuser \
--generate-ssh-keys \
After you create the VM, Azure CLI shows information similar to the following example. Note the value of
publicIpAddress . You use this address to access the VM.
{
"fqdns": "",
"id": "/subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "westus",
"macAddress": "00-0D-3A-36-2F-56",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "13.64.104.241",
"resourceGroup": "myResourceGroup"
}
az vm create \
--resource-group myResourceGroup \
--name myVM2 \
--availability-set myAvailabilitySet \
--image Oracle:Oracle-Database-Ee:12.1.0.2:latest \
--size Standard_DS1_v2 \
--admin-username azureuser \
--generate-ssh-keys \
$ ssh azureuser@<publicIpAddress>
$ sudo su - oracle
Optionally, you can add ORACLE_HOME and ORACLE_SID to the /home/oracle/.bashrc file, so that these settings
are saved for future logins:
$ sqlplus / as sysdba
SQL> SELECT log_mode FROM v$database;
LOG_MODE
------------
NOARCHIVELOG
Enable force logging, and make sure at least one log file is present:
Turn on Flashback (which makes recovery a lot easier) and set STANDBY_FILE_MANAGEMENT to auto. Exit
SQL*Plus after that.
cdb1_stby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myVM2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = cdb1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myVM1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = cdb1_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1)
(SID_NAME = cdb1)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
$ sqlplus / as sysdba
SQL> ALTER SYSTEM SET dg_broker_start=true;
SQL> EXIT;
$ lsnrctl stop
$ lsnrctl start
$ ssh azureuser@<publicIpAddress>
Log in as Oracle:
$ sudo su - oracle
cdb1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myVM1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = cdb1)
)
)
cdb1_stby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myVM2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = cdb1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myVM2)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = cdb1_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1)
(SID_NAME = cdb1)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
$ lsnrctl stop
$ lsnrctl start
Create folders:
mkdir -p /u01/app/oracle/oradata/cdb1/pdbseed
mkdir -p /u01/app/oracle/oradata/cdb1/pdb1
mkdir -p /u01/app/oracle/fast_recovery_area/cdb1
mkdir -p /u01/app/oracle/admin/cdb1/adump
$ export ORACLE_SID=cdb1
$ sqlplus / as sysdba
You should see messages similar to the following when the command is completed. Exit RMAN.
RMAN> EXIT;
Optionally, you can add ORACLE_HOME and ORACLE_SID to the /home/oracle/.bashrc file, so that these settings
are saved for future logins:
$ dgmgrl sys/OraPasswd1@cdb1
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production
Configuration - my_dg_config
Configuration Status:
SUCCESS (status updated 26 seconds ago)
You've completed the Oracle Data Guard setup. The next section shows you how to test the connectivity and
switch over.
Connect the database from the client machine
Update or create the tnsnames.ora file on your client machine. This file is usually in
$ORACLE_HOME\network\admin.
Replace the IP addresses with your publicIpAddress values for myVM1 and myVM2:
cdb1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<myVM1 IP address>)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=cdb1)
)
)
cdb1_stby=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<myVM2 IP address>)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=cdb1_stby)
)
)
Start SQL*Plus:
$ sqlplus sys/OraPasswd1@cdb1
SQL*Plus: Release 12.2.0.1.0 Production on Wed May 10 14:18:31 2017
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
$ sqlplus sys/OraPasswd1@cdb1_stby
SQL*Plus: Release 12.2.0.1.0 Production on Wed May 10 14:18:31 2017
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
$ dgmgrl sys/OraPasswd1@cdb1_stby
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production
Once again, you should now be able to connect to the primary database.
Start SQL*Plus:
$ sqlplus sys/OraPasswd1@cdb1
SQL*Plus: Release 12.2.0.1.0 Production on Wed May 10 14:18:31 2017
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
You've finished the installation and configuration of Data Guard on Oracle Linux.
Next steps
Tutorial: Create highly available virtual machines
Explore VM deployment Azure CLI samples
Implement Oracle Golden Gate on an Azure Linux
VM
6/27/2017 • 12 min to read • Edit Online
The Azure CLI is used to create and manage Azure resources from the command line or in scripts. This guide
details how to use the Azure CLI to deploy an Oracle 12c database from the Azure Marketplace gallery image.
This document shows you step-by-step how to create, install, and configure Oracle Golden Gate on an Azure VM.
Before you start, make sure that the Azure CLI has been installed. For more information, see Azure CLI installation
guide.
Oracle release Oracle 12c Release 2 – (12.1.0.2) Oracle 12c Release 2 – (12.1.0.2)
Sign in to Azure
Sign in to your Azure subscription with the az login command. Then follow the on-screen directions.
az login
az vm availability-set create \
--resource-group myResourceGroup \
--name myAvailabilitySet \
--platform-fault-domain-count 2 \
--platform-update-domain-count 2
az vm create \
--resource-group myResourceGroup \
--name myVM1 \
--availability-set myAvailabilitySet \
--image Oracle:Oracle-Database-Ee:12.1.0.2:latest \
--size Standard_DS1_v2 \
--generate-ssh-keys \
After the VM has been created, the Azure CLI shows information similar to the following example. (Take note of the
publicIpAddress . This address is used to access the VM.)
{
"fqdns": "",
"id": "/subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"location": "westus",
"macAddress": "00-0D-3A-36-2F-56",
"powerState": "VM running",
"privateIpAddress": "10.0.0.4",
"publicIpAddress": "13.64.104.241",
"resourceGroup": "myResourceGroup"
}
az vm create \
--resource-group myResourceGroup \
--name myVM2 \
--availability-set myAvailabilitySet \
--image Oracle:Oracle-Database-Ee:12.1.0.2:latest \
--size Standard_DS1_v2 \
--generate-ssh-keys \
{
"access": "Allow",
"description": null,
"destinationAddressPrefix": "*",
"destinationPortRange": "1521",
"direction": "Inbound",
"etag": "W/\"bd77dcae-e5fd-4bd6-a632-26045b646414\"",
"id": "/subscriptions/<subscription-
id>/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myVmNSG/securityRules/all
ow-oracle",
"name": "allow-oracle",
"priority": 999,
"protocol": "Tcp",
"provisioningState": "Succeeded",
"resourceGroup": "myResourceGroup",
"sourceAddressPrefix": "*",
"sourcePortRange": "*"
}
ssh <publicIpAddress>
sudo su - oracle
Optionally, you can add ORACLE_HOME and ORACLE_SID to the .bashrc file, so that these settings are saved for
future sign-ins:
# add oracle home
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
# add oracle sid
export ORACLE_SID=gg1
# add Oracle library path
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
$ sudo su - oracle
$ lsnrctl start
sudo su - oracle
$ dbca -silent \
-createDatabase \
-templateName General_Purpose.dbc \
-gdbname cdb1 \
-sid cdb1 \
-responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword OraPasswd1 \
-systemPassword OraPasswd1 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName pdb1 \
-pdbAdminPassword OraPasswd1 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-storageType FS \
-ignorePreReqs
Optionally, you can added ORACLE_HOME and ORACLE_SID to the .bashrc file, so that these settings are saved for
future sign-ins.
$ sudo su - oracle
$ lsnrctl start
Configure Golden Gate
To configure Golden Gate, take the steps in this section.
Enable archive log mode on myVM1 (primary)
$ sqlplus / as sysdba
SQL> SELECT log_mode FROM v$database;
LOG_MODE
------------
NOARCHIVELOG
Enable force logging, and make sure at least one log file is present.
3. Move the .zip files to the /opt folder. Then change the owner of the files as follows:
$ sudo su -
# mv <folder>/*.zip /opt
4. Unzip the files (install the Linux unzip utility if it's not already installed):
5. Change permission:
# sudo su - oracle
$ mkdir .ssh (if not already created)
$ cd .ssh
5. Create a file named authorized_keys. Paste the contents of the key in this file, and then save the file.
NOTE
The key must contain the string ssh-rsa . Also, the contents of the key must be a single line of text.
6. Start PuTTY. In the Category pane, select Connection > SSH > Auth. In the Private key file for
authentication box, browse to the key that you generated earlier.
7. In the Category pane, select Connection > SSH > X11. Then select the Enable X11 forwarding box.
8. In the Category pane, go to Session. Enter the host information, and then select Open.
Install Golden Gate software
To install Oracle Golden Gate, complete the following steps:
1. Sign in as oracle. (You should be able to sign in without being prompted for a password.) Make sure that
Xming is running before you begin the installation.
$ cd /opt/fbo_ggs_Linux_x64_shiphome/Disk1
$ ./runInstaller
2. Select 'Oracle GoldenGate for Oracle Database 12c'. Then select Next to continue.
3. Change the software location. Then select the Start Manager box and enter the database location. Select
Next to continue.
6. You might be prompted to run a script as 'root'. If so, open a separate session, ssh to the VM, sudo to root,
and then run the script. Select OK continue.
7. When the installation has finished, select Close to complete the process.
Set up service on myVM1 (primary)
1. Create or update the tnsnames.ora file:
$ cd $ORACLE_HOME/network/admin
$ vi tnsnames.ora
cdb1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=cdb1)
)
)
pdb1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=pdb1)
)
)
$ sqlplus / as sysdba
SQL> CREATE USER C##GGADMIN identified by ggadmin;
SQL> EXEC dbms_goldengate_auth.grant_admin_privilege('C##GGADMIN',container=>'ALL');
SQL> GRANT DBA to C##GGADMIN container=all;
SQL> connect C##GGADMIN/ggadmin
SQL> ALTER SESSION SET CONTAINER=PDB1;
SQL> EXIT;
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ sqlplus system/OraPasswd1@pdb1
SQL> CREATE USER test identified by test DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
SQL> GRANT connect, resource, dba TO test;
SQL> ALTER USER test QUOTA 100M on USERS;
SQL> connect test/test@pdb1
SQL> @demo_ora_create
SQL> @demo_ora_insert
SQL> EXIT;
$ sudo su - oracle
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ ./ggsci
GGSCI> DBLOGIN USERID test@pdb1, PASSWORD test
Successfully logged into database pdb1
GGSCI> ADD SCHEMATRANDATA pdb1.test
2017-05-23 15:44:25 INFO OGG-01788 SCHEMATRANDATA has been added on schema test.
2017-05-23 15:44:25 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema
test.
5. Add the following to the EXTRACT parameter file (by using vi commands). Press Esc key, ':wq!' to save file.
EXTRACT EXTORA
USERID C##GGADMIN, PASSWORD ggadmin
RMTHOST 10.0.0.5, MGRPORT 7809
RMTTRAIL ./dirdat/rt
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE pdb1.test.TCUSTMER;
TABLE pdb1.test.TCUSTORD;
2017-05-23 15:58:34 INFO OGG-02003 Extract EXTORA successfully registered with database at SCN
1821260.
GGSCI> exit
$ ./ggsci
GGSCI> ADD EXTRACT EXTORA, INTEGRATED TRANLOG, BEGIN NOW
EXTRACT (Integrated) added.
MANAGER RUNNING
EXTRACT RUNNING EXTORA 00:00:11 00:00:04
In this step, you find the starting SCN, which will be used later, in a different section:
$ sqlplus / as sysdba
SQL> alter session set container = pdb1;
SQL> SELECT current_scn from v$database;
CURRENT_SCN
-----------
1857887
SQL> EXIT;
$ ./ggsci
GGSCI> EDIT PARAMS INITEXT
EXTRACT INITEXT
USERID C##GGADMIN, PASSWORD ggadmin
RMTHOST 10.0.0.5, MGRPORT 7809
RMTTASK REPLICAT, GROUP INITREP
TABLE pdb1.test.*, SQLPREDICATE 'AS OF SCN 1857887';
cdb1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=cdb1)
)
)
pdb1=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=pdb1)
)
)
$ sqlplus / as sysdba
SQL> alter session set container = pdb1;
SQL> create user repuser identified by rep_pass container=current;
SQL> grant dba to repuser;
SQL> exec dbms_goldengate_auth.grant_admin_privilege('REPUSER',container=>'PDB1');
SQL> connect repuser/rep_pass@pdb1
SQL> EXIT;
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ sqlplus system/OraPasswd1@pdb1
SQL> CREATE USER test identified by test DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
SQL> GRANT connect, resource, dba TO test;
SQL> ALTER USER test QUOTA 100M on USERS;
SQL> connect test/test@pdb1
SQL> @demo_ora_create
SQL> EXIT;
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ ./ggsci
GGSCI> EDIT PARAMS REPORA
REPLICAT INITREP
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/tcustmer.dsc, APPEND
USERID repuser@pdb1, PASSWORD rep_pass
MAP pdb1.test.*, TARGET pdb1.test.*;
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ ./ggsci
GGSCI> EDIT PARAMS MGR
PORT 7809
ACCESSRULE, PROG *, IPADDR *, ALLOW
$ cd /u01/app/oracle/product/12.1.0/oggcore_1
$ ./ggsci
GGSCI> START EXTRACT INITEXT
GGSCI> VIEW REPORT INITEXT
The replication has begun, and you can test it by inserting new records to TEST tables.
View job status and troubleshooting
View reports
To view reports on myVM1, run the following commands:
This completes the installation and configuration of Golden Gate on Oracle linux.
Next steps
Create highly available virtual machines tutorial
Explore VM deployment CLI samples
Design and implement an Oracle database in Azure
10/17/2017 • 8 min to read • Edit Online
Assumptions
You're planning to migrate an Oracle database from on-premises to Azure.
You have an understanding of the various metrics in Oracle AWR reports.
You have a baseline understanding of application performance and platform utilization.
Goals
Understand how to optimize your Oracle deployment in Azure.
Explore performance tuning options for an Oracle database in an Azure environment.
Resilience MTBF (mean time between failures) MTTR (mean time to recovery)
Requirements
Determine the database size and growth rate.
Determine the IOPS requirements, which you can estimate based on Oracle AWR reports or other network
monitoring tools.
Configuration options
There are four potential areas that you can tune to improve performance in an Azure environment:
Virtual machine size
Network throughput
Disk types and configurations
Disk cache settings
Generate an AWR report
If you have an existing an Oracle database and are planning to migrate to Azure, you have several options. You can
run the Oracle AWR report to get the metrics (IOPS, Mbps, GiBs, and so on). Then choose the VM based on the
metrics that you collected. Or you can contact your infrastructure team to get similar information.
You might consider running your AWR report during both regular and peak workloads, so you can compare. Based
on these reports, you can size the VMs based on either the average workload or the maximum workload.
Following is an example of how to generate an AWR report:
$ sqlplus / as sysdba
SQL> EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT;
SQL> @?/rdbms/admin/awrrpt.sql
Key metrics
Following are the metrics that you can obtain from the AWR report:
Total number of cores
CPU clock speed
Total memory in GB
CPU utilization
Peak data transfer rate
Rate of I/O changes (read/write)
Redo log rate (MBPs)
Network throughput
Network latency rate (low/high)
Database size in GB
Bytes received via SQL*Net from/to client
Virtual machine size
1. Estimate VM size based on CPU, memory, and I/O usage from the AWR report
One thing you might look at is the top five timed foreground events that indicate where the system bottlenecks
are.
For example, in the following diagram, the log file sync is at the top. It indicates the number of waits that are
required before the LGWR writes the log buffer to the redo log file. These results indicate that better performing
storage or disks are required. In addition, the diagram also shows the number of CPU (cores) and the amount of
memory.
The following diagram shows the total I/O of read and write. There were 59 GB read and 247.3 GB written during
the time of the report.
2. Choose a VM
Based on the information that you collected from the AWR report, the next step is to choose a VM of a similar size
that meets your requirements. You can find a list of available VMs in the article Memory optimized.
3. Fine-tune the VM sizing with a similar VM series based on the ACU
After you've chosen the VM, pay attention to the ACU for the VM. You might choose a different VM based on the
ACU value that better suits your requirements. For more information, see Azure compute unit.
Network throughput
The following diagram shows the relation between throughput and IOPS:
Based on your network bandwidth requirements, there are various gateway types for you to choose from. These
include basic, VpnGw, and Azure ExpressRoute. For more information, see the VPN gateway pricing page.
Recommendations
Network latency is higher compared to an on-premises deployment. Reducing network round trips can greatly
improve performance.
To reduce round-trips, consolidate applications that have high transactions or “chatty” apps on the same virtual
machine.
Disk types and configurations
Default OS disks: These disk types offer persistent data and caching. They are optimized for OS access at
startup, and aren't designed for either transactional or data warehouse (analytical) workloads.
Unmanaged disks: With these disk types, you manage the storage accounts that store the virtual hard disk
(VHD) files that correspond to your VM disks. VHD files are stored as page blobs in Azure storage accounts.
Managed disks: Azure manages the storage accounts that you use for your VM disks. You specify the disk
type (premium or standard) and the size of the disk that you need. Azure creates and manages the disk for
you.
Premium storage disks: These disk types are best suited for production workloads. Premium storage
supports VM disks that can be attached to specific size-series VMs, such as DS, DSv2, GS, and F series VMs.
The premium disk comes with different sizes, and you can choose between disks ranging from 32 GB to
4,096 GB. Each disk size has its own performance specifications. Depending on your application
requirements, you can attach one or more disks to your VM.
When you create a new managed disk from the portal, you can choose the Account type for the type of disk you
want to use. Keep in mind that not all available disks are shown in the drop-down menu. After you choose a
particular VM size, the menu shows only the available premium storage SKUs that are based on that VM size.
For more information, see High-performance Premium Storage and managed disks for VMs.
After you configure your storage on a VM, you might want to load test the disks before creating a database.
Knowing the I/O rate in terms of both latency and throughput can help you determine if the VMs support the
expected throughput with latency targets.
There are a number of tools for application load testing, such as Oracle Orion, Sysbench, and Fio.
Run the load test again after you've deployed an Oracle database. Start your regular and peak workloads, and the
results show you the baseline of your environment.
It might be more important to size the storage based on the IOPS rate rather than the storage size. For example, if
the required IOPS is 5,000, but you only need 200 GB, you might still get the P30 class premium disk even though
it comes with more than 200 GB of storage.
The IOPS rate can be obtained from the AWR report. It's determined by the redo log, physical reads, and writes
rate.
For example, the redo size is 12,200,000 bytes per second, which is equal to 11.63 MBPs. The IOPS is 12,200,000 /
2,358 = 5,174.
After you have a clear picture of the I/O requirements, you can choose a combination of drives that are best suited
to meet those requirements.
Recommendations
For data tablespace, spread the I/O workload across a number of disks by using managed storage or Oracle
ASM.
As the I/O block size increases for read-intensive and write-intensive operations, add more data disks.
Increase the block size for large sequential processes.
Use data compression to reduce I/O (for both data and indexes).
Separate redo logs, system, and temps, and undo TS on separate data disks.
Don't put any application files on default OS disks (/dev/sda). These disks aren't optimized for fast VM boot
times, and they might not provide good performance for your application.
Disk cache settings
There are three options for host caching:
Read-only: All requests are cached for future reads. All writes are persisted directly to Azure Blob storage.
Read-write: This is a “read-ahead” algorithm. The reads and writes are cached for future reads. Non-write-
through writes are persisted to the local cache first. For SQL Server, writes are persisted to Azure Storage
because it uses write-through. It also provides the lowest disk latency for light workloads.
None (disabled): By using this option, you can bypass the cache. All the data is transferred to disk and
persisted to Azure Storage. This method gives you the highest I/O rate for I/O intensive workloads. You also
need to take “transaction cost” into consideration.
Recommendations
To maximize the throughput, we recommend that you start with None for host caching. For Premium Storage,
keep in mind that you must disable the "barriers" when you mount the file system with the ReadOnly or None
options. Update the /etc/fstab file with the UUID to the disks.
For more information, see Premium Storage for Linux VMs.
For OS disks, use default Read/Write caching.
For SYSTEM, TEMP, and UNDO use None for caching.
For DATA, use None for caching. But if your database is read-only or read-intensive, use Read-only caching.
After your data disk setting is saved, you can't change the host cache setting unless you unmount the drive at the
OS level and then remount it after you've made the change.
Security
After you have set up and configured your Azure environment, the next step is to secure your network. Here are
some recommendations:
NSG policy: NSG can be defined by a subnet or NIC. It's simpler to control access at the subnet level both for
security and force routing for things like application firewalls.
Jumpbox: For more secure access, administrators should not directly connect to the application service or
database. A jumpbox is used as a media between the administrator machine and Azure resources.
The administrator machine should offer IP-restricted access to the jumpbox only. The jumpbox should have
access to the application and database.
Private network (subnets): We recommend that you have the application service and database on separate
subnets, so better control can be set by NSG policy.
Additional reading
Configure Oracle ASM
Configure Oracle Data Guard
Configure Oracle Golden Gate
Oracle backup and recovery
Next steps
Tutorial: Create highly available VMs
Explore VM deployment Azure CLI samples
Back up and recover an Oracle Database 12c
database on an Azure Linux virtual machine
7/6/2017 • 10 min to read • Edit Online
You can use Azure CLI to create and manage Azure resources at a command prompt, or use scripts. In this article,
we use Azure CLI scripts to deploy an Oracle Database 12c database from an Azure Marketplace gallery image.
Before you begin, make sure that Azure CLI is installed. For more information, see the Azure CLI installation guide.
ssh <publicIpAddress>
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 23-MAR-2017 15:32:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/myVM/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myVM.twltkue3xvsujaz1bvlrhfuiwf.dx.internal.cloudapp.net)
(PORT=1521)))
The listener supports no services
The command completed successfully
$ sqlplus / as sysdba
SQL> SELECT log_mode FROM v$database;
LOG_MODE
------------
NOARCHIVELOG
$ sqlplus / as sysdba
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size big integer 4560M
$ rman target /
RMAN> backup database plus archivelog;
{
"pluginName" : "ScriptRunner",
"preScriptLocation" : "",
"postScriptLocation" : "",
"preScriptParams" : ["", ""],
"postScriptParams" : ["", ""],
"preScriptNoOfRetries" : 0,
"postScriptNoOfRetries" : 0,
"timeoutInSeconds" : 30,
"continueBackupOnFailure" : true,
"fsFreezeEnabled" : true
}
$ sudo su -
# mkdir /etc/azure
# cd /etc/azure
v_date=`date +%Y%m%d%H%M`
ORA_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORA_OWNER=oracle
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" > /etc/azure/pre_script_$v_date.log
For /etc/azure/post_script.sh:
v_date=`date +%Y%m%d%H%M`
ORA_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORA_OWNER=oracle
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" > /etc/azure/post_script_$v_date.log
Here's an example of pre-snapshot and post-snapshot scripts for a "hot backup" (an online backup):
v_date=`date +%Y%m%d%H%M`
ORA_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORA_OWNER=oracle
su - $ORA_OWNER -c "sqlplus / as sysdba @/etc/azure/pre_script.sql" > /etc/azure/pre_script_$v_date.log
For /etc/azure/post_script.sh:
v_date=`date +%Y%m%d%H%M`
ORA_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORA_OWNER=oracle
su - $ORA_OWNER -c "sqlplus / as sysdba @/etc/azure/post_script.sql" >
/etc/azure/pre_script_$v_date.log
For /etc/azure/pre_script.sql, modify the contents of the file per your requirements:
For /etc/azure/post_script.sql, modify the contents of the file per your requirements:
alter tablespace SYSTEM end backup;
...
...
alter system archive log start;
# /etc/azure/pre_script.sh
# /etc/azure/post_script.sh
2. On the Recovery Services vaults blade, to add a new vault, click Add.
3. To continue, click myVault.
8. On the myVault - Backup items blade, under BACKUP ITEM COUNT, select the backup item count.
9. On the Backup Items (Azure Virtual Machine) blade, on the right side of the page, click the ellipsis (...)
button, and then click Backup now.
10. Click the Backup button. Wait for the backup process to finish. Then, go to Step 6: Remove the database
files.
To view the status of the backup job, click Jobs.
The status of the backup job appears in the following image:
11. For an application-consistent backup, address any errors in the log file. The log file is located at
/var/log/azure/Microsoft.Azure.RecoveryServices.VMSnapshotLinux/1.0.9114.0.
Step 6: Remove the database files
Later in this article, you'll learn how to test the recovery process. Before you can test the recovery process, you
have to remove the database files.
1. Remove the tablespace and backup files:
$ sudo su - oracle
$ cd /u01/app/oracle/oradata/cdb1
$ rm -f *.dbf
$ cd /u01/app/oracle/fast_recovery_area/CDB1/backupset
$ rm -rf *
$ sqlplus / as sysdba
SQL> shutdown abort
ORACLE instance shut down.
4. On the File Recovery (Preview) pane, click Download Script. Then, save the download (.sh) file to a
folder on the client computer.
5. Copy the .sh file to the VM.
The following example shows how you to use a secure copy (scp) command to move the file to the VM. You
also can copy the contents to the clipboard, and then paste the contents in a new file that is set up on the
VM.
IMPORTANT
In the following example, ensure that you update the IP address and folder values. The values must map to the
folder where the file is saved.
$ ssh <publicIpAddress>
$ sudo su -
# chown root:root /<folder>/Linux_myvm1_xx-xx-2017 xx-xx-xx PM.sh
# chmod 755 /<folder>/Linux_myvm1_xx-xx-2017 xx-xx-xx PM.sh
# /<folder>/Linux_myvm1_xx-xx-2017 xx-xx-xx PM.sh
The following example shows what you should see after you run the preceding script. When you're
prompted to continue, enter Y.
Microsoft Azure VM Backup - File Recovery
______________________________________________
The script requires 'open-iscsi' and 'lshw' to run.
Do you want us to install 'open-iscsi' and 'lshw' on this machine?
Please press 'Y' to continue with installation, 'N' to abort the operation. : Y
Installing 'open-iscsi'....
Installing 'lshw'....
Connection succeeded!
Please wait while we attach volumes of the recovery point to this machine...
************ Volumes of the recovery point and their mount paths on this machine ************
After recovery, to remove the disks and close the connection to the recovery point, please click
'Unmount Disks' in step 3 of the portal.
8. Use the following script to copy the missing files back to the folders:
# cd /root/myVM-2017XXXXXXX/Volume2/u01/app/oracle/fast_recovery_area/CDB1/backupset/2017_xx_xx
# cp *.bkp /u01/app/oracle/fast_recovery_area/CDB1/backupset/2017_xx_xx
# cd /u01/app/oracle/fast_recovery_area/CDB1/backupset/2017_xx_xx
# chown oracle:oinstall *.bkp
# cd /root/myVM-2017XXXXXXX/Volume2/u01/app/oracle/oradata/cdb1
# cp *.dbf /u01/app/oracle/oradata/cdb1
# cd /u01/app/oracle/oradata/cdb1
# chown oracle:oinstall *.dbf
# sudo su - oracle
$ rman target /
RMAN> startup mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
RMAN> SELECT * FROM scott.scott_table;
2. On the Overview blade, under Backup items, select the number of items.
3. On the Backup Items (Azure Virtual Machine) blade, select myvm1.
4. On the myvm1 blade, click the ellipsis (...) button, and then click Restore VM.
5. On the Select restore point blade, select the item that you want to restore, and then click OK.
2. On the Public IP addresses blade, click Add. On the Create public IP address blade, for Name, select the
public IP name. For Resource group, select Use existing. Then, click Create.
3. To associate the public IP address with the network interface for the VM, search for and select myVMip.
Then, click Associate.
4. For Resource type, select Network interface. Select the network interface that is used by the myVM
instance, and then click OK.
5. Search for and open the instance of myVM that is ported from the portal. The IP address that is associated
with the VM appears on the myVM Overview blade.
$ sudo su - oracle
$ sqlplus / as sysdba
SQL> startup
IMPORTANT
If the database startup command generates an error, to recover the database, see Step 6: Use RMAN to recover the
database.
# sudo su - oracle
$ rman target /
RMAN> startup mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
RMAN> SELECT * FROM scott.scott_table;
The backup and recovery of the Oracle Database 12c database on an Azure Linux VM is now finished.
Delete the VM
When you no longer need the VM, you can use the following command to remove the resource group, the VM,
and all related resources:
Next steps
Tutorial: Create highly available VMs
Explore VM deployment Azure CLI samples
Disaster recovery for an Oracle Database 12c
database in an Azure environment
12/7/2017 • 2 min to read • Edit Online
Assumptions
You have an understanding of Oracle Data Guard design and Azure environments.
Goals
Design the topology and configuration that meet your disaster recovery (DR) requirements.
Next steps
Tutorial: Create highly available VMs
Explore VM deployment Azure CLI samples