Log in to your Azure subscription, go to the Azure Marketplace, search for 'Oracle' and find the Marketplace Template named 'Oracle Database 12.1.0.2 Enterprise Edition' (shown below).
Note: This procedure uses a 'Password' for the authentication type rather than the SSH public key.
At the time of writing this document, I found the DS2_V2 VM size to be the best value for performance (this may change). (Note: Oracle 12c requires at least 2 cores to be in a supportable state) (Note: To find the DS2_V2 VM size configuration, you much click 'View All' link on upper right)
[Oracle 12c Hardware Requirements: http://docs.oracle.com/cd/E25178_01/install.1111/e22624/preinstall_req_hw.htm]
Fill out settings based on your existing network in your Azure subscription. If creating isolated VM, then create new Virtual Network and Subnet. Be sure to create an assigned Virtual IP Address for easy SSH access later. Note that Port 22 is already added for SSH access.
Review the summary of the settings, and then click 'OK' to kick off the deployment of this instance.
After the VM is deployed, click on the VM instance, and then navigate to Settings > Endpoints.
Add the ports 1521 (For Oracle DB Access) and 5500 (For Oracle Enterprise Manager) both on TCP Protocol.
(Note: The Oracle 12c Template provisions a Classic-style VM, so the Endpoint addition process is different than with a new Resource Manager-style VM).
Click on the VM Instance and in the 'Overview' tab, the Virtual IP Address is located under the 'Essentials' heading. Note down this IP address to use it next. You could also use the DNS Hostname alternatively.
There are many different tools to use to SSH into a Linux VM. A very popular one is Putty, which can be downloaded here. I like to use MobaXTerm, which can be found here. MobaXTerm has similarities to the tool 'Remote Desktop Connection Manager' in that you can create saved profiles of connections, save passwords and organize them in folders. For this walkthrough, I use MobaXTerm, but a tool such as Putty could just as easily be used.
After downloading MobaXTerm, go 'Sessions > New session' to create a new session and enter the Virtual IP Address obtained (or DNS Hostname). After you click 'OK' on the 'Session settings' dialog, the session activates and you can login into the VM.
When prompted the 'login as', provide the username you selected when you created the VM and hit enter. Then for the password, provide the password you selected when you create the VM.
Now that we are logged into the VM over SSH, the first thing we need to do is edit the Bash profile for both the user account you signed in as plus an account named 'oracle' that was created as part of the Oracle 12c VM provisioning process. We will use the 'oracle' account shortly.
Editing the Bash profile will automatically set some Oracle related environmental variables going forward.
Note that the Oracle 12c bits are installed during the VM provisioning process, but there are some post-install setup steps that need to be done to configure the database and provide access to the database.
$ cd /home/{username}
$ vi .bash_profile
(Note: vi is a text editor on UNIX and Linux, for a guide on how to use vi, see this link and here is another)
(Also note: we are setting the Oracle SID to 'orcl', we will use this later on in the next steps)
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORACLE_SID=orcl
export ORACLE_HOME
export ORACLE_SID
$ sudo -u oracle -i
{enter password}
$ cd /home/oracle
$ vi .bash_profile
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORACLE_SID=orcl
export ORACLE_HOME
export ORACLE_SID
This will ensure the Bash profile will take effect and set the environmental variables.
In this step we will create the database for this Oracle instance. This command below will create a main database plus one 'pluggable' database. Pluggable databases (multitenant architecture) are introduced in Oracle 12c and follow a similar architecture to SQL Server, where now, an Oracle server instance can contain multiple databases where previously there was only a one to one relationship between Oracle instance and Oracle database.
$ sudo -u oracle -i
{enter password}
(Note: the passwords below in yellow need to be added to whatever you prefer.)
$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -responseFile NO_VALUE -characterSet AL32UTF8 -sysPassword {password} -systemPassword {password} -createAsContainerDatabase true -numberOfPDBs 1 -pdbName pdb1 -pdbAdminPassword Password1 -databaseType MULTIPURPOSE -automaticMemoryManagement false -storageType FS -ignorePreReqs
$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -responseFile NO_VALUE -characterSet AL32UTF8 -sysPassword {password} -systemPassword {password} -createAsContainerDatabase false -databaseType MULTIPURPOSE -storageType FS -ignorePreReqs -sampleSchema true
This step above will run for a while to create the databases. When this step is complete, you should see something similar to the output below:
Copying database files
1% complete
2% complete
8% complete
13% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
33% complete
34% complete
38% complete
42% complete
43% complete
45% complete
Completing Database Creation
48% complete
51% complete
53% complete
62% complete
70% complete
72% complete
Creating Pluggable Databases
78% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
$ sudo -u oracle -i
{enter password}
(Note: the passwords below in yellow need to be added to whatever you prefer.)
$ lsnrctl start
You should see some output similar to the below:
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-OCT-2016 15:26:45
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting /u01/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/jjforacle5/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jjforacle5.jjforacle5.d7.internal.cloudapp.net)(PORT=1521 )))
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 10-OCT-2016 15:26:45
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/jjforacle5/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jjforacle5.jjforacle5.d7.internal.cloudapp.net)(PORT=1521)))
The listener supports no services
The command completed successfully
SQL*Plus (sqlplus command) is a command line program in Oracle to query the database, perform configuration changes, etc.
(Note: that the password for the 'sys' account was specified during the dbca database creation process)
$ sqlplus sys/{password} as sysdba
(Note: that the password for the 'sys' account was specified during the dbca database creation process)
SQL> select name, dbid from v$pdbs;
You should now see a result set of the portable databases just as an example query:
NAME DBID
------------------------------ ----------
PDB$SEED 4131105394
PDB1 3978492103
Now that we have the Database up and running, we can now access the database from a management tool such as Toad or SQL Developer. SQL Developer is a tool provided by Oracle and has similarities to SQL Server Management Studio. Toad is a 3rd Party Tool and also has similarities to SQL Server Management Studio.
You can download Toad here. You can download SQL Developer here.
For these steps below, I used Toad for Oracle (on Windows 10) version 12.10, 64bit.
I used SQL Developer version 4.1.5, Windows 64bit with JDK 8 included.
To add a connection in Toad to both the main container database (CDB) and the pluggable database (PDB) deployed on the Oracle, these steps are below:
Add connection to main container database (CDB):
Add connection to pluggable database (PDB):
To add a connection in Toad to the pluggable database (PDB) deployed on the Oracle, perform the following steps:
In this step, we will configure Oracle Enterprise Manager, a built-in web application to Oracle that provides a visual interface into the Oracle database and configurations:
<TBD>