This is the second part of the Oracle 12C installation. In the last blog, we configured our Linux machine so that we can install our Oracle database without any hindrance. Now we will be installing the database so follow the steps to get it done.
We have unzipped the Oracle Database software and when we go to the database directory, it will show us some files and other directories. Right now we have to use the runInstaller file.
You can see in the image that I am using the Putty software and when I run that runInstaller file, Oracle database 12C GUI appears on the screen. This GUI came through Xming. After some time, the Oracle Database Installer window will open up.
The first step is the Configure Security Updates. No need to do anything here, just uncheck the box as shown in the image and click Next. A dialogue box will appear which can be neglected so just click on Yes and proceed.
Next, we have to choose our Installation Option. It is good practice to first install the database and then create and configure it so that if there is any problem with the install, it will show here itself.
Select Install database software only and then click Next.
In the Database Installation Options, choose the first one that is, Single Instance Database Installation, and click on Next.
In Database Edition step, select Enterprise Edition (7.5GB) and click Next.
Next in the Installation Location step, we have to specify the path for the Oracle Base and Database software so that the software will deploy the related files to their respective location.
During the Linux Machine configuration, we have created a directory /u01/app/oracle/product/188.8.131.52/db1 which is going to be used now. If you have created the directory with some other name then use that instead of using the one shown in the screenshot.
In the Create Inventory step, we have to provide the Inventory Directory and oraInventory Group Name. See the image below.
Next step, Operating System Groups – change it from dba to oinstall and click Next.
In the Prerequisite Checks, the software check all the provided values and configuration.
If you have followed the installation steps properly, your Prerequisite Checks will successfully complete and the Summary page will appear.
Now click on Install and let the installation finish. It will take some time so go and have a cup of coffee and some snacks.
If you get any pop-up screen telling you to run some script then open a new terminal on Putty by logging through the root user and paste the script and press enter.
After completion of the installation steps, click on Finish and restart the Linux Machine. Re-login with the oracle user and first start the listener.
To create and configure the database, we have to write dbca (Database Configuration Assistant) in the terminal and press enter. The Xming will act again and open up the GUI for dbca as shown in the image.
Next comes the steps to create the database.
1. The first step is to Select Database Operation. Choose to Create a database and click Next.
2. In the Creation Mode, select the Advanced Configuration option and click Next.
3. Deployment Type – Make sure that the Database type is selected as Oracle Single Instance database and the template should be General Purpose or Transaction Processing and click on Next.
4. Database Identification should be as shown in the image.
Global database name – orcl.net
SID – orcl
Note - Uncheck the Create as Container database. This will trouble in OBIEE 12C installation.
5. In the Storage Option, make sure the first option, that is, Use template file for database storage attributes is selected and hit Next.
6. Fast Recovery Option – Leave all options unchecked as shown in the image and click on Next.
7. Network Configuration – Leave as it is and move to the next step.
8. Data Vault Option – This should also be left unchecked.
9. Configuration Options – In this step, choose the Sample Schema tab and check the box for Add sample schemas to the database.
In the Memory tab, select the first option – Use Automatic Shared Memory Management.
10. Management Options – Make sure the Configure Enterprise Manager (EM) database express is checked.
As soon as we hit Next, a new dialogue box will emerge so just click Yes.
11. User Credentials – I use the same password for all accounts so just select that and enter the password.
A new box will appear so click Yes in that. It just asks whether we want to continue with the same password or create something according to Oracle standards.
12. In the Creation Option, let the first option be selected which is Create database.
13. Summary – Gives the summary of the Global Settings and the Initialization Parameters.
14. Progress Page – This will take some time to set up and once done then our database is created.
15. After all the steps finish, then close the dbca installation wizard and our database creation is finished.
Now we will check the database by opening it.
sqlplus / as sysdba
This will open up our SQL database. Use startup to start it.
Now we will check the status of orcl.
select name, open_mode from v$database;
You can see that the ORCL is Open and is in Read and Write mode.
I have mentioned above that we do not have to create the pluggable database so no need to do the steps related to that.
Now we will check what is the status of our pluggable database.
select name, open_mode from v$pdbs;
In the image above, you can see that PDBORCL is also open and is in the Read and Write mode. If the pluggable database (PDBORCL) is in the MOUNTED state then we have to bring it into the READ WRITE state. Use the below commands.
alter session set container=pdborcl;
Here, pdborcl is the name of my pluggable database. You have to write the name of your pluggable database name. The next command is to open the database.
alter pluggable database open;
Now, when we will check our pluggable database, it will be in the READ WRITE state.
select name, open_mode from v$pdbs;
Oracle provides a default HR schema with the database and if you want then you can unlock it. To do so, use the below commands.
alter user hr identified by hr account unlock;
Congratulation!! you have successfully installed the Oracle database version 12C and also unlocked the HR schema.
NOTE: As you have installed the database in your local machine with the Linux environment and it is obvious that you will shut down your machine. So whenever you start your Linux environment, start your listener, then the database, and check your pluggable database whether it is mounted or not. If not then do it with the above commands.