Tuesday, July 25, 2017

Uninstall Oracle Enterprise Manager 13c Cloud Control

3:58 AM Posted by Dilli Raj Maharjan , No comments

Uninstall Oracle Enterprise Manager 13c Cloud control.  

Change directory to OMS_HOME/sysman and copy install directory to staging location. I used staging directory as /ssd.

Execute EMDeinstall.pl from the staging location. Use following command to begin uninstall.
$OMS_HOME/perl/bin/perl <STG_DIR>/EMDeinstall.pl -mwHome $OMS_HOME -stageLOC <STG_DIR>
/ssd/oracle/Middleware/perl/bin/perl /ssd/install/EMDeinstall.pl -mwHome /ssd/oracle/Middleware -stageLoc /ssd/install

Please provide sys password, sysman password, admin server password to begin deinstall.

Deinstall on progress #####.

Deinstall on progress ##########.  Deinstallation process may take more than 30 mins. So please keep patience. 

 Oracle Enterprise Manager deinstall completed.

Friday, June 30, 2017

Create MySQL Instance on MySQL Cloud Service

6:15 AM Posted by Dilli Raj Maharjan , No comments

Open Browser and Type URL: https://cloud.oracle.com. Once the page is opened click on Sign In.

 Once Click on Sign In. Following is the landing page. Select the Data Center.

Select appropriate Data Center and click on My Service.

Type the Identity Domain and Click on Go.

Type the username and password and Click on Sign In.

Once you login to Oracle Public Cloud Click on Create Instance on the dashboard.

The Create Instance window will be displayed. Click on MySQL Cloud Service.

Welcome screen will be appeared. You have option to Watch MySQL instance related videos by Clicking Watch Video or Click on Go to Console button for console.

Since I have not created any MySQL instances, there is no MySQL Instance. On Console Window, Click on Create Service to Create MySQL Instance Service.

Choose Appropriate Service Name, Description, Region and Metering Frequency and Click on Next.

On Detail configuration page, provide details as the Compute Shape, SSH Key, Size, root Credentials.

If we choose to configure MySQL Enterprise Monitor option to Yes, then Following details need to be provided: Manager User, Password, Agent user, Agent Password.  In my case I have disabled this option.

Similarly Backup destination can be defined as Both Cloud and Disk Storage. For Cloud we need to provide the container ID and its credential. I have disabled this option too.

Confirmation Page will be appeared before the database creation. Click on Create to start MySQL Instance creation.

Instance Creation on progress

Click on Instance name to view the Service Details.

Once MySQL service is created, we can login to the instance as user opc using ssh.

Once Instance is created we need to create Access Rules so that MySQL Database service can be used publicly. Click on the Menu icon and Click on Access Rules.

On Access Rules page, Click on Action menu on the right of the rule. In following snapshot, Rule ora_p2admin_mysql is disabled, that means MySQL Database hosted on this instance cannot be accessed from public network.

Since the rule is disabled, we cannot connect MySQL database instance from public network. I try to connect from my ec2 instance but failed.

Once you click on the menu of the rule, Click on Enable to enable the rule.

Enable Access Rule pop up window will be displayed for confirmation. Click on Enable to enable the Access rule.

Now we can notice the Access rule has been enabled. 

We can connect MySQL instance from the public network, create table and insert data.

If we need to connect MySQL database locally we need to install MySQL Client. Use yum install mysql to install MySQL client.

Friday, May 5, 2017

Oracle Cloud: Creating a Database Deployment

4:51 AM Posted by Dilli Raj Maharjan 2 comments

You must have subscription or free Trial account to proceed.
Open URL http://cloud.oracle.com

Click on Sign In

Select your data center location. The datacenter location is mentioned on the email send by the Oracle. Format of email will be as mentioned below.

Click on My Services Once you select data center.

Enter your Identity domain and Click on Go.

Enter Username and Password and Click on Sign In

Click on Create Instance link of Dashboard

Click on Database.

Click on Create Service.

Enter Service Name and Description. You can select Service Level as: Oracle Database Cloud Service or Oracle Database Cloud Service - Virtual Image
With Oracle Database Cloud Service, Oracle database software and Oracle database is automatically installed and ready to use. It comes with the cloud tools to backup, patching and others.
On Oracle Database Cloud Service using the Virtual Image service level, Oracle Database is not automatically installed, nor is a database created. We have to install database manually after the deployment is created.

Choose Metering Frequency, Select Hourly if you are using Trial it will save credits for later use.

Choose appropriate Software Release: We have 3 Release of Oracle Database Softwares.
  • Oracle Database 11g Release 2
  • Oracle Database 12c Release 1
  • Oracle Database 12c Release 2

Choose appropriate Software Edition. We have four Software Edition.

Standard Edition: Very basic features, Only single PDB in case of Oracle 12c

Enterprise Edition: Includes performance, availability, scalability, and security required for mission-critical applications such as high-volume online transaction processing (OLTP) applications, query-intensive data warehouses, and demanding Internet applications.

Enterprise Edition - High Performance: provides all the features of Enterprise Edition, plus many of the available Oracle Database options and management packs.

Enterprise Edition - Extreme Performance: provides all the features of Enterprise Edition, plus all of the Oracle Database options and management packs appropriate for use in Oracle Database Cloud Service.

Select the appropriate Database Type. In my case I have selected Single Instance. 
If you select Standard Edition of Oracle you can select Single Instance database only

With Enterprise Edition and Enterprise Edition- High Performance you get Single Instance with Data Guard Standby option too.

If you select Enterprise Edition - Extreme Edition then You will get RAC options with all the options available on Enterprise Edition. 

Once all the appropriate options are selected Click on Next to continue.

This is the landing page once you click on Next. Provide appropriate DB Name, PDB Name and Administration Password. Click on Edit to add SSH Public Key

Click on Update button to select the appropriate location of the key file. If you do not have key file then use ssh-keygen command to generate SSH key. Following images shows how to create ssh-key on OSX using ssh-keygen -t rsa command. 

$ssh-keygen -t rsa

Verify with ls command the key file exists.

Select the appropriate Backup Destination. We have 3 options:
1. Both Cloud Storage and Local Storage: Backup will be stored on Cloud storage container and local storage too. The default retention policy used is to store 30 days backup on cloud and 7 days latest backup on local storage.
2. Cloud Storage Only: Backup will be stored on Cloud storage container only.
3. None: Backup will not stored else where.

You may Click on Advance setting to view the Listener, Timezone, Character set and GoldenGate option.

Once all the required options are selected. Click on Next to view the confirmation page.

Review the selected option for the last time. If you are fine with the selected options Click on Create to continue Database Instance Creation.

 Database Instance creation on progress.


Once instance creation is completed, The Status label is removed and is ready to access. Click on the service name to view details of the Database Instance.

Note IP address and now you can login to the server via putty or ssh

By default 2 OS users are created. 

User opc(an acronym of oracle public cloud) is created with the sudo privileges. The user is intended to perform administrative task with in the Virtual image: OS and the backup and recovery related task. Using opc we can perform any task that requires root-privileges.

User oracle(owner of Oracle Database Software) is created generally for administrative task of Oracle. Using oracle we can authenticate as the sysdba user and create tablesapace, users and perform database admin tasks.