ORACLE DATABASE ADMINISTRATOR

 

 

Oracle Database Creation Using DBCA

Posted: 14 Jun 2013 11:31 AM PDT

We have many ways to create Oracle Database and we generally use following two ways. 1.Manually (Read It Here)  2.Using DBCA
My previous post shows how to create database manually .This post will show you how to create database through DBCA.
DBCA – This is a utility provided by Oracle to create database in GUI mode. Once you invoke dbca it will guide you step by step in a interactive mode to complete  database creation. You will also get option to configure dbcontrol along with database creation.
For invoking dbca you wil l have to set oracle home properly or you can directly run the utility from $ORACLE_HOME/bin . Make sure that before invoking dbca you have issued “xhost +” command from root prompt.
$ dbca

This is the welcome page – click next

Here you can choose general purpose database or can go for custom database which will provide you lot more option to choose . If you choose custom database then you can greatly customize your database . I will choose general purpose database.

Here you have option to decide on SID and database name. You can keep same or keep different values.

In this window you have choice to configure db console along with db creation . Db console will give you chance to manage database in GUI mode through the browser. If you don’t want to configure db console then uncheck the radio button . I chose to go with db console.

Choose to give different password for each user or give same password for all users.

If you give a weak password then this warning will be shown. Choose “yes” .

I will keep all the database files in single location on file system so i checked “use common location for all database files”. Here you can also choose ASM .

You can configure FRA and can enable archival . If you choose to any of the option or both then you have the option to set the path also.

Choose the path for archive log destination.

You can choose to install the sample schemas in your database .

Here you  can choose the desired value of memory size with which your instance will allocate size of SGA and PGA. This also gives you the option to go for automatic memory management which will relax you from manually sizing the memory components .

Set the maximum number of processes that will be allowed to run for Oracle instance.

Choose the character set and click next.

You can have a look on default parameters setting and can also edit there values.

Choose the connection mode on your database. Details are given with each option .

 

You can edit the locations , number and sizes of contolfiles, datafiles and redolog groups here.

Click on finish to start the database creation.

Here the window shows you the summary of your settings that will be used for database creation . Now the database creation will start.

After completion of DB creation you can see the result and can note the URL to access the dbconsole. Click exit to close the DBCA.

Leave a comment

Filed under Uncategorized

ORACLE DATABASE ADMINISTRATOR

Installation of Oracle 11g r2 database on RHEL 5.4

Posted: 12 Jun 2013 01:03 PM PDT

This post shows Installation of Oracle 11 g r2 database (11.2.0.1) on Red Hat Linux 5.4 . For this installation I have installed RHEL 5.4 selecting all the packages available . Still we need to install some extra RPMs which i will show in coming steps. Following are the mount points i have in my RHEL machine whose hostname is LINUX1.
[root@linux1 ~]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda3             3.8G  288M  3.4G   8% / /dev/sda12            4.8G  138M  4.4G   4% /tmp /dev/sda11            5.7G  203M  5.2G   4% /var /dev/sda10            5.7G  140M  5.3G   3% /data03 /dev/sda9             7.6G  146M  7.1G   2% /orabin /dev/sda8             9.5G  1.4G  7.7G  15% /opt /dev/sda7             9.5G  151M  8.9G   2% /data01 /dev/sda6             9.5G  151M  8.9G   2% /data02 /dev/sda5              12G  3.1G  7.8G  29% /usr /dev/sda1             965M   23M  893M   3% /boot tmpfs                1014M     0 1014M   0% /dev/shm /dev/hdc               57M   57M     0 100% /media/VBOXADDITIONS_4.2.12_84980
I will install Oracle RDBMS in  /orabin mount point under the path  /orabin/app/oracle/product/11.2.0 . This path is nothing but the ORACLE HOME. For ORACLE BASE the path will be  /orabin/app/oracle/product We will create OINSTALL group which will install the software and DBA which can create the database . Let us make the path in OS
[root@linux1 orabin]# mkdir -p /orabin/app/oracle/product/11.2.0 [root@linux1 orabin]# groupadd oinstall [root@linux1 orabin]# groupadd dba [root@linux1 orabin]# useradd -g oinstall -G dba -d /home/oracle -m oracle [root@linux1 orabin]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
[root@linux1 orabin]# chown -R oracle:oinstall /orabin [root@linux1 orabin]# chown -R oracle:dba /data01 /data02 /data03
Oracle RDBMS software has been kept in /opt hence set permission to /opt so that we can unzip the RDBMS binaries .
[root@linux1 orabin]# chmod -R 777 /opt
Lets move to location where RDBMS software has been kept.
[root@linux1 opt]# ls linux_11gR2_database_1of2.zip  linux_11gR2_database_2of2.zip  lost+found
Now unzip the two zip files as below.
[root@linux1 opt]# unzip linux_11gR2_database_1of2.zip [root@linux1 opt]# unzip linux_11gR2_database_2of2.zip
after you finish unzip of files you will get single directory as “database” . [oracle@linux1 opt]$ ls database  linux_11gR2_database_1of2.zip  linux_11gR2_database_2of2.zip  lost+found  OsRPMs
Now we will set the bash profile for our installation.
[root@linux1 opt]# su – oracle [oracle@linux1 ~]$ vi .bash_profile
export ORACLE_HOME=/orabin/app/oracle/product/11.2.0 export ORACLE_SID=orcl export PATH=$PATH:$HOME/bin export PATH=$ORACLE_HOME/bin:$PATH:.
After setting the bash profile we can start the installation of Oracle Database.
Upto 11g r1 we had to set kernel parameters required for oracle manually but now from 11g r2 this can be skipped and will be taken care while installation. OUI will give us runfixup.sh script which will fix kernel parameters for us. This script needs to be run from root user.
[oracle@linux1 database]$ ls doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html OUI is GUI based installar hence for Allowing normal user to invoke GUI, run following command as root user.
[root@linux1 ~]# xhost +
Now its time to invoke OUI i.e runInstallar
[oracle@linux1 database]$ ./runInstallar First window is the welcome page where either you can provide your valid mail ID or can leave blank by unchecking  the box.

Here all the per-requisites will be verified before starting the installation . Some per-requisites can be fixable and some , like missing RPMs , are not .  as you can see that some packages needs to bee installed before we can proceed .
 

Next window gives you the script which need to run as root user to fix kernel parameters. 

[root@linux1 ~]# /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh Response file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.response Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log Setting Kernel Parameters… kernel.sem = 250 32000 100 128 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

To fix the above failed packages you can download and install as below

[root@linux1 OsRPMs]# rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm sysstat-7.0.2-3.el5.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing…                ########################################### [100%]    1:unixODBC-devel         ########################################### [ 33%]    2:libaio-devel           ########################################### [ 67%]    3:sysstat                ########################################### [100%]

Run the above given scripts as root user .
[root@linux1 ~]# /orabin/app/oracle/oraInventory/orainstRoot.sh Changing permissions of /orabin/app/oracle/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world.
Changing groupname of /orabin/app/oracle/oraInventory to oinstall. The execution of the script is complete. [root@linux1 ~]# /orabin/app/oracle/product/11.2.0/root.sh Running Oracle 11g root.sh script…
The following environment variables are set as:     ORACLE_OWNER= oracle     ORACLE_HOME=  /orabin/app/oracle/product/11.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:    Copying dbhome to /usr/local/bin …    Copying oraenv to /usr/local/bin …    Copying coraenv to /usr/local/bin …
Creating /etc/oratab file… Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@linux1 ~]#

Click on close and  You are done.

Leave a comment

Filed under Uncategorized