Skip navigation

Ujjwal Rana

14 posts

A database link is an schema object where you can access objects on another database. Database link is created in one database which helps you to access table/objects from on another database.

 

STEPS FOR CREATING DATABASE LINK

 

First : Before creating database you must remember service name which is located at tnsnames.ora. Here inside tnsnames.ora . Here, ORCL is my service name which need to mentioned while creating database link. Now lets go through step TWO.

 

[grid@storage admin]$ more tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

ORCL =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )

 

[grid@storage admin]$

 

Second : Make Sure the user where you want to create database link has privilege to create database link. Suppose if you want to check the privilege for HR user then first login to hr user and then checked the PRIVILEGE FOR CREATE DATABASE LINK. Below output shows that HR user has privilege to create database link

 

HOW TO CHECK PRIVILEGE FOR  CREATE DATABASE LINK ?

SELECT * FROM SESSION_PRIVS;

 

What if you don't have privilege to create database link ?

 

Answer : If you don't have privilege to create database link then you can follow the following steps :-

 

sqlplus / as sysdba --->LOGIN AS SYSDBA

grant create database link to hr;

exit and connect to hr.

 

THIRD : Now before creating database link lets take an example of tables for SCOTT user. From the below screen shot you can see that SCOTT user have four tables BONUS, DEPT,EMP and SALGRADE. Now lets assume like  you want to access s all SCOTT USER tables from hr end. For this please follow steps FOUR.

 

 

 

 

 

 

FOUR : Login to HR use and trigger following query. At SQL 1 you edulink is the database link name that is used while connecting to scott user and ORCL is the service name taken from tnsnames.ora i.e. mentioned above at STEP FIRST. So once you create database link you can check/confirm whether you can access SCOTT table from HR user or not ? and for that i trigger query mentioned below at SQL 2. You can see SCOTT table named DEPT from HR user end which means database link is working. Same like wise you can check the other tables for SCOTT user from HR user end.

SQL 1> create database link edulink connect to scott identified by tiger using 'orcl';

 

Database link created.

 

SQL 2> select * from dept@edulink;

 

    DEPTNO DNAME          LOC

---------- -------------- -------------

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

 

 

FIFTH : If you want to check the list of database link under hr user then you can trigger following query :

 

select * from user_db_links;

 

Same likewise you can trigger following query from SYS user end

 

select * from dba_db_links where username='USERNAME';

Ujjwal Rana

Create DATABASE Oracle 11g

Posted by Ujjwal Rana Feb 27, 2017

1. Login to ORACLE user first.

oracle_user.JPG

2.  Following WELCOME SCREEN will appear, Click NEXT

welcome_screen.JPG

3. Select the operation that you want to perform, Select CREATE A DATABASE and Click NEXT

operation.JPG

4. Select Database Templates, Select GENERAL PURPOSE or TRANSACTION PROCESSING and Click NEXT

GENERAL.JPG

5. Under Database Identification, Type GLOBAL DATABASE NAME and SID accordingly and Click NEXT

global_db.JPG

6. Under MANAGEMENT OPTION, Simply Click NEXT

EM.JPG

7. Enter Database Credentials accordingly, You give individual password for each of the ADMINISTRATIVE users or You can give only one password for all the FOUR users. Click NEXT

pass.JPG

9. If you password standards does not meet then you might see the following message, Simply Click YES

yes.JPG

10. Under Database File Locations, Select STORAGE TYPE to AUTOMATIC STORAGE MANAGEMENT (ASM)

asm.JPG

11. Under Database File Locations, Select USE ORACLE-MANAGED FILES and then Click on BROWSE

managedone.JPG

12. After Clicking BROWSE from above, Following screen will appeared select DATA and Click OK

13. Again first of all make sure that you have selected the following one, after then Click NEXT
Storage Type : Automatic Storage Management (ASM)

Select o USE ORACLE-MANAGED FILE
Click browse and Select DATA

again.JPG

14. After Clicking NEXT, It will ask for the ASM PASSWORD. Give the Password accordingly and Click OK

asmnew.JPG

15. NOTE : IF YOU SEE Could not validate ASMSNMP password due to following error- "ora-01017" ERROR MESSAGE then follow the following STEPS.

[grid@storage ~]$  sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 6 12:52:18 2016

 

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

 

SQL> Alter user asmsnmp identified by asmnepal;

 

User altered.

 

SQL>

asmsnmp.JPG

ANOTHER WAY TO CHANGE ASMSNMP password is through ASMCD

[grid@storage ~]$ asmcmd

asmcmd> orapwusr --modify --password asmsnmp

asmcmd>Enter password: **********

16. Re-Type the password again and Click NEXT

asmnew.JPG

17. Under Recovery Configuration, Make sure to do the following steps and then Click NEXT

Click on  check box [] SPECFIFY FLASH RECOVERY AREA

Under Flash Recovery Areat : Click BROWSE and Select +FRA
Click on [ ] Enable Arciving

 

recovery.JPG

18. Under Database Content, Make sure you have click on [] SAMPLE SCHEMAS and Click NEXT

sample.JPG

19. Under Initialization Parameters, At CHARACTER SETS tabs Select USE UNICODE(AL32UTF8) and Click NEXT

unicode.JPG

20. Database Storage Screen will appear, Click NEXT

storage.JPG

21. Under CREATION OPTIONS, Make Sure you have selected [ ] CREATED DATABASE and [ ] GENERATE DATABASE CREATION SCRIPTS and then Click FINISH

creationoptions.JPG

21. Confirmation message will appear. Click OK

confirmation.JPG

22. You will see the DATABASE CREATION SCRIPT GENERATION display. Click OK

dbcreationscripts.JPG
23. And now the INSTALLATION process will begin. Wait for the INSTALLATION

dca.JPG

23. NOTE : During Installation if you get the message saying SET ORACLE_UNIQUE NAME TO orcl and RUN ENTERPRISE MANAGER then DO NOTHING. Simply click at OK only

 

24. After 100% Complete, You will see the following message :

dcaone.JPG

25. OUTPUT OF LISTENER STATUS AFTER DATABASE CREATION.

 

CREATING DBCA IS NOW COMPLETE

Listener is a separate process which runs on the database server and helps in receives incoming client connection requests and manages the traffic of these requests to the database server.  A listener  can be configured with one or more listening protocol addresses, host name services, and parameters that control its runtime behavior. The listener configuration is stored in a configuration file named listener.ora.

 

Because all of the configuration parameters have default values, it is possible to start and use a listener with no configuration. This default listener has a name of LISTENER, supports no services upon startup, and listens on the following TCP/IP protocol address:

 

(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))

 

Supported services, that is, the services to which the listener forwards client requests, can be configured in the listener.ora file or this information can be dynamically registered with the listener. This dynamic registration feature is called service registration and is used by Oracle9i or Oracle8i instances. The registration is performed by the PMON process--an instance background process--of each database instance that has the necessary configuration in the database initialization parameter file. Dynamic service registration does not require any configuration in the listener.ora file.

 

Steps to configure the listener to accept client connections.

 

1. First of all login to GRID user and Type netca

netca.JPG

2. ORACLE NET CONFIGURATION ASSISTAN : WELCOME screen will appear. Select LOCAL NET SERVICE NAME CONFIGURATION and Click OK

ONCAW.JPG

3. Since you are creating new LISTENER for first time. Click ADD

add.JPG

4. Type SERVICE NAME as orcl and Click NEXT

servicename.JPG

5. In order to communicate with the Database across the NETWOK. Select PROTOCOL as TCP in order to access the database and Click NEXT

tcp.JPG

6. Type HOST NAME and Select USE THE STANDARD PORT NUMBER OF 1521 and Click NEXT

hostname.JPG

7. Select NO DO NOT TEST option and Click NEXT

NO.JPG

8. NET SERVICE NAME should be the same as the service name you entered earlier. Click NEXT

NETSERVICE.JPG

9. Would you like to configure another net service name ? Select NO and Click NEXT

configure_another.JPG

10. You will see NET SERVICE CONFIGURATION COMPLETE.. Click NEXT

COMPLETE.JPG

12. Finally Click on FINISH.

finished.JPG

13. Now Check the listener status as followin

[grid@storage ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 07-JAN-2016 12:32:16

 

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                07-JAN-2016 11:46:33

Uptime                    0 days 0 hr. 45 min. 42 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/storage/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.227)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

  Instance "+ASM", status READY, has 1 handler(s) for this service...

The command completed successfully

[grid@storage ~]$

asmlast.JPG

 

BELOW IS AN OUTPUT OF  TNSNAMES.ORA AND LISTENER.ORA :-

 

[oracle@storage Desktop]$ cd $ORACLE_HOME/network/admin

[oracle@storage admin]$ pwd

/u01/app/oracle/product/11.2.0/db_1/network/admin

[oracle@storage admin]$ ls

samples  shrept.lst  tnsnames.ora

[oracle@storage admin]$ vi tnsnames.ora

 

[oracle@storage admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )

 

[oracle@storage admin]$

 

[grid@storage ~]$ cd $ORACLE_HOME/network/admin

[grid@storage admin]$ pwd

/u01/app/11.2.0/grid/network/admin

[grid@storage admin]$ ls

listener.ora  samples  shrept.lst

[grid@storage admin]$ vi listener.ora

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))    # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON        # line added by Agent

[grid@storage admin]$

Enterprise Manager Control (EMCTL) is a command line utility installed with EM to administer or control the core components of Enterprise Manager Cloud Control, particularly Oracle Management Service (OMS) and Oracle Management Agent (Management Agent). The utility is available by default with every Enterprise Manager installation. To access the Oracle Enterprise Manager Console from a client browser, the dbconsole process needs to be running on the server. The dbconsole process is automatically started after installation.

 

Before Starting DBCONSOLE, Make sure to check your location. If your COUNTRY LOCATION is listed under TZAgentlist then you can directly start emctl start dbconsole but if your country is not listed under TZAgentlist then you need to follow the following steps. Before starting check the TZAgentlist name from following. My current location is ASIA/NEPAL which is not listed under TZAgenlist. Here is the command to check the TZAgent name list :-

 

[oracle@storage log]$ cat /u01/app/oracle/product/11.2.0/db_1/sysman/admin/supportedtzs.lst | grep "Asia"

Asia/Beirut

Asia/Damascus

Asia/Gaza

Asia/Istanbul

Asia/Jerusalem

Asia/Nicosia

Asia/Tel_Aviv

Asia/Aden

Asia/Amman

Asia/Baghdad

Asia/Bahrain

Asia/Kuwait

Asia/Qatar

Asia/Riyadh

Asia/Tehran

Asia/Aqtau

Asia/Baku

Asia/Dubai

Asia/Muscat

Asia/Tbilisi

Asia/Yerevan

Asia/Kabul

Asia/Aqtobe

Asia/Bishkek

Asia/Karachi

Asia/Tashkent

Asia/Yekaterinburg

Asia/Calcutta

Asia/Almaty

Asia/Dacca

Asia/Novosibirsk

Asia/Omsk

Asia/Rangoon

Asia/Bangkok

Asia/Jakarta

Asia/Krasnoyarsk

Asia/Saigon

Asia/Chungking

Asia/Harbin

Asia/Hong_Kong

Asia/Irkutsk

Asia/Kashgar

Asia/Kuala_Lumpur

Asia/Kuching

Asia/Macao

Asia/Manila

Asia/Shanghai

Asia/Singapore

Asia/Taipei

Asia/Ujung_Pandang

Asia/Urumqi

Asia/Jayapura

Asia/Seoul

Asia/Tokyo

Asia/Yakutsk

Asia/Vladivostok

Asia/Magadan

Asia/Kamchatka

Asia/Anadyr

[oracle@storage log]$

From Above TZAgent namelist, there is no country named NEPAL. Therefore I have selected SINGAPORE. You can select any one from your choice for the location from above. And then follow the following command :-

 

Login to root ( su -)

system-config-date

Change the location

exit

 

Go to Oracle USER [oracle@storage Desktop]$

[oracle@storage Desktop]$ emctl resetTZ agent <enterkey> (This is for to update oracle database with new time zone information)

 

[oracle@storage Desktop]$ emctl unsecure dbconsole

 

[oracle@storage Desktop]$ emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

http://storage:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ........ started.

------------------------------------------------------------------

Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/storage_orcl/sysman/log

[oracle@storage Desktop]$

 

1. After then OPEN LINK http://storage:1158/em/console/aboutApplication in the browser. You will see the follow page for login :-

2. Give the usename as sys and password for sys and then select CONNECT AS SYSDBA and then Click LOGIN

 

3. YOU WILL NOW GET LOGIN AT HOME PAGE and THEN YOU WILL SEE THE FOLLOWING TABS :-

The following tab sections are shown:

  • performance
  • availability
  • server
  • schema
  • data movement
  • software and support

 

 

Additionally, you can stop the process and view its status.

 

To stop the dbconsole process:

 

[oracle@storage Desktop]$  emctl stop dbconsole

 

To view the status of the DBCONSOLE PROCESS :

 

[oracle@storage Desktop]$  emctl status dbconsole

INTRODUCTION

The Oracle Grid Infrastructure for a standalone server is the software from ORACLE which provides system support for Oracle database including volume management, file system, and automatic restart capabilities. Oracle Grid Infrastructure for a standalone server is the software that includes Oracle Restart and Oracle ASM therefore If you plan to use Oracle Restart or Oracle Automatic Storage Management (Oracle ASM), then you must install Oracle Grid Infrastructure before. Oracle Software combines the two infrastructure products into a single set of binaries that is installed as the Oracle Grid Infrastructure home.

 

Before you begin. You need to Download ORACLE GRID STANDALONE SERVER SOFTWARE . You can download the software from the following url. Oracle Grid Infrastructure Downloads

and then begin with below mentioned steps.

 

1, First of all make sure that you have login with grid user. For example, In my case I have downloaded the ORACLE GRID INFRASTRUCTURE inside external hard disk. Below is an output.

 

[grid@storage 11gr2grid]$ pwd

/media/MULTIBOOT/Oracle_11g/11gr2grid (This is where grid software is available)

 

IN  ORDER TO INSTALL GRID SINGLE STANDALONE SERVER, YOU NEED TO RUN ./runInstaller first.

grid_user.JPG

[grid@storage 11gr2grid]$ ls

doc  install  readme.html  response  rpm  runcluvfy.sh  runInstaller  sshsetup  stage  welcome.html

[grid@storage 11gr2grid]$ ./runInstaller

 

2. Run the installer with command.

runinstaller.JPG

3. Now the GUI screen will appear, select SKIP SOFTWARE UPDATES and Click Next.

download_grid_infrastructure.JPG

 

4. Select Install and Configure Grid Infrastructure for a Standalone Server. Click Next.

standalone_server.JPG

 

5. Select Language according to your needs and Click NEXT

english.JPG

 

6. On the Create ASM Disk Group screen
- Set Redundancy to External.

- Select the disks: ORCL:VOL1, ORCL:VOL2, and ORCL:VOL3 and then Click NEXT

ASM_DISK_GROUP.JPG

7.Now you need to Specify ASM Password page,

-Select 'Use same passwords for these accounts'

- Specify password

- Confirm the password

- Click Next

asm_password.JPG

8. If the Password Recomended Standards does not meet then following message can appear. Simply click on YES

yes.JPG

9. Under Privileged Operating System Groups page,Give each group to asmdba, asmoper, asmadmin and Click NEXT

privileged.JPG

10. Under Specify Installation Location page, the location of the database home should be following :-

 

    Give Software Location to /u01/app/grid/product/11.2.0/grid.

    Set the Oracle Base to /u01/app/grid

    Click Next

Note: the Grid infrastructure must have separate directory and should be installed in a separately from the database

location.JPG

 

11. Just incase , If you see the following message then simple click on YES

outside.JPG

12. Under Create Inventory, set Inventory Directory Location to /u01/app/oraInventory and click NEXT

inventory.JPG

13. Prerequisite Check will now start

PREREQU.JPG

14. After Prerequisite Check, You will see the following SCREEN. Click on FIX & CHECK AGAIN

fix.JPG

15. After clicking on FIX & CHECK AGAIN, if you see the following message then follow the steps mentioned for root accordingly and then Click on OK.

fixup.JPG

[grid@storage Desktop]$ su -

Password:

[root@storage ~]# /tmp/CVU_11.2.0.3.0_grid/runfixup.sh

Response file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.response

Enable file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.enable

Log file location: /tmp/CVU_11.2.0.3.0_grid/orarun.log

Setting Kernel Parameters...

kernel.shmmax = 982431744

kernel.shmmax = 1046370304

[root@storage ~]#

 

16. Once you click on OK above, FIX & CHECK AGAIN button get INACTIVE.

fixuptwo.JPG

17. After then Click on IGNORE ALL Checkbox and Click NEXT

ignoreall.JPG

18. After Clicking NEXT, It will ask you IF YOU REALLY WANT  TO CONTINUE (YES or NO). Click YES

continue.JPG

19. Finally It will show you the SUMMARY before installing it. Click on INSTALL

summary.JPG

20. Now Installing Product Setup will begin . Need to wait for Setup Completion

install_product.JPG

21. During Installation, You will see EXECUTE CONFIGURATION SCRIPTS message. Execute the configuration scripts by login inside ROOT user.

execute.JPG

First execute /u01/app/oraInventory/orainstRoot.sh

[root@storage ~]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

rootone.JPG

Second : Execute /u01/app/oraInventory/root.sh

[root@storage ~]# /u01/app/oraInventory/root.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@storage ~]# /u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/11.2.0/grid

 

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

LOCAL ADD MODE

Creating OCR keys for user 'grid', privgrp 'oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4664: Node storage successfully pinned.

Adding Clusterware entries to upstart

 

storage     2016/01/05 16:40:49     /u01/app/11.2.0/grid/cdata/storage/backup_20160105_164049.olr

Successfully configured Oracle Grid Infrastructure for a Standalone Server

 

roottwo.JPG

22. Now Click on OK . After then the Setup will again proceed.

execute.JPG

proceed.JPG

23. Finally The Installation of Oracle Grid Infrastructure for a Standalone Server get FINISHED. Click CLOSE

finish.JPG

 

NOTE : After You Click at CLOSE , You will see the following log location of the install session.

[grid@storage 11gr2grid]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 7254 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-01-05_03-23-40PM. Please wait ...[grid@storage 11gr2grid]$ You can find the log of this install session at:

/u01/app/oraInventory/logs/installActions2016-01-05_03-23-40PM.log

[grid@storage 11gr2grid]$

A. First of all make a decision whether you want to install RPM through ORACLE PUBLIC YUM or Locally. Decide any one before continuing :-

 


A. IF YOU WANT TO DOWNLOAD PACKAGE VIA INTERNET THEN FOLLOW THIS:-

 

1. ORACLE PUBLIC YUM ( INTERNET CONNECTION REQUIRED MIGHT TAKES TIMES FOR YUM INSTALL)

-- If you want to perfom YUM INSTALL ORACLE PUBLIC YUM then follow the below mentioned I, II and III steps only and follow

I. [root@storage yum.repos.d]# cd /etc/yum.repos.d
II. oraclenepal[root@storage yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo

III. [root@storage yum.repos.d]# vi public_yum_ol6.repo
MAKE all enable = 0 to 1 ( ie enable=1)

 

NOTE : AFTER FOLLOWING ABOVE STEPS I, II and III. FOLLOW DIRECTLY TO STEP 3 FROM MANUAL STEPS  AND MAKE SURE YOU HAVE A INTERNET CONNECTION FOR YUM INSTALL.

 

B. YUM INSTALL RPM LOCALLY (INTERNET NOT REQUIRED, LESS TIME CONSUMING). (RECOMENDED)

-- If you want to perform YUM INSTALL through locally then follow the below mentioned  MANUAL STEPS from 1.

 

Note : Oracle Installation can be performed through AUTOMATIC SETUP and MANUAL SETUP. We will follow MANUAL SETUP.

 

AUTOMATIC STEPS

 

For AUTOMATIC SETUP follow this steps :-

[root@storage yum.repos.d]# yum install oracle-rdbms-server-11gR2-preinstalled

 

MANUAL STEPS

For MANUAL SETUP, If you haven't run this command # yum install oracle-rdbms-server-11gR2-preinstall then follow the below mentioned steps :-

 

1. Installation Required RPMs

Insert OEL6.5  into the DVD-ROM

media.JPG

 

2. Create a Directory for RPM backup and Copy all the RPM inside /stage/Disk1

[root@storage OL6.5 x86_64 Disc 1 20131125]# mkdir -p /stage/Disk1

mkdir.JPG

[root@storage OL6.5 x86_64 Disc 1 20131125]# cp -r /media/OL6.5 x86_64 Disc 1 20131125/* /stage/Disk1

rpmcopy.JPG
[root@storage Packages]# cd /stage/Disk1/Packages

[root@storage Packages]# rpm -ivh createrepo-0.9.9-18.0.1.el6.noarch.rpm deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

rpmcreaterepo.JPG

[root@storage Packages]# createrepo /stage/Disk1/Packages

Spawning worker 0 with 3754 pkgs

Workers Finished

Gathering worker results

 

Saving Primary metadata

Saving file lists metadata

Saving other metadata

Generating sqlite DBs

Sqlite DBs complete

[root@storage Packages]#

create_repo.JPG

 

[root@storage Packages]# cd /etc/yum.repos.d

[root@storage yum.repos.d]# vi packages.repo

[server]

name=server's packages

baseurl=file:///stage/Disk1/Packages

enabled=1

gpgcheck=0

packagerepo.JPG

3. [root@storage yum.repos.d]# yum -y install compat-libcap1*i686* compat-libcap1*86_64* compat-libstdc++*x86_64* elfutils-devel*x86_64* elfutils-libelf-devel*x86_64* gcc-c++*x86_64*glibc*i686* glibc-devel*i686* libaio*i686* libaio-devel*x86_64* libattr*i686*libcap*i686* libgcc*i686* libstdc++-devel*x86_64* libtool-ltdl*i686* ncursesdevel*i686* ncurses-libs*i686* nss-softokn-freebl*i686* pdksh*x86_64*readline*686* glibc-devel*x86_64* java*

yuminstall.JPG

After YUM INSTALL completed, You will see the following output.

installed.JPG

4. Configure Kernel

[root@storage Desktop]# vi /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 982431744

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

configure_kernel.JPG

5. [root@storage Desktop]# sysctl -p

sysctl.JPG

6. Specify Resource Limitations

[root@storage Desktop]# vi /etc/pam.d/login

session required pam_limits.so

session.JPG

7. [root@storage Desktop]# vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

limit_conf.JPG

8. Specify Shell Limitations

[root@storage Desktop]# vi /etc/profile

if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then

if [ \$SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

umask 022

 

profile.JPG

9. Disable SELinux

[root@storage Desktop]# setenforce 0

[root@storage Desktop]# vi /etc/sysconfig/selinux

SELINUX=disabled

selinux.JPG

10. Disable Firewall

[root@storage Desktop]# iptables -F

[root@storage Desktop]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

[root@storage Desktop]# chkconfig iptables off

iptables.JPG

11. Creating OS groups and users.

[root@storage Desktop]# groupadd asmadmin

[root@storage Desktop]# groupadd asmdba

[root@storage Desktop]# groupadd asmoper

[root@storage Desktop]# groupadd oinstall

[root@storage Desktop]# groupadd dba

[root@storage Desktop]# groupadd oper

[root@storage Desktop]# useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid

[root@storage Desktop]# useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle

[root@storage Desktop]# passwd grid

[root@storage Desktop]# passwd oracle

groupadd.JPG

12. Creating necessary directories

[root@storage Desktop]# mkdir -p /u01/app/grid

[root@storage Desktop]# mkdir -p /u01/app/11.2.0/grid

[root@storage Desktop]# chown -R grid:oinstall /u01

[root@storage Desktop]# mkdir -p /u01/app/oracle

[root@storage Desktop]# chown oracle:oinstall /u01/app/oracle

[root@storage Desktop]# chmod -R 775 /u01

directories.JPG

13. Specify neccessary environment variables for oracle user

[oracle@storage ~]$ vi .bash_profile

ORACLE_SID=orcl; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

oracle_bashprofile.JPG

14.Specify neccessary environment variables for grid user

[root@storage Desktop]# su - grid

[grid@storage ~]$ vi .bash_profile

ORACLE_SID=+ASM; export ORACLE_SID

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/common/oracle/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022

grid_bash_profile.JPG

 

15. CONFIGURE HOSTNAME AND IP inside  /etc/hosts. You can give following IP and host name or you can give your own desire  name

 

[root@storage ~]#  vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.0.227 storage storage.castrading.com localhost localhost.localdomain localhost4 localhost4.localdomain4

[root@storage ~]#

 

16. CONFIGURE ETH0 as following and CONFIGURE IP

 

root@storage network-scripts]#  vi /etc/sysconfig/network-scripts/ifcfg-eth0

[root@storage network-scripts]#  vi ifcfg-eth0

DEVICE=eth0

HWADDR=00:0C:29:77:63:07

IPADDR=192.168.0.227

NETMASK=255.255.255.0

GATEWAY=192.168.0.2

DNS1=192.168.0.2

ONBOOT=yes

BOOTPROTO=static

[root@storage network-scripts]#

 

 

17. FOR SYSTEM DOMAIN NAME RESOLVER CONFIGURE resolv.conf

[root@storage network-scripts]# vi /etc/resolv.conf

# Generated by NetworkManager

search castrading.com

nameserver 192.168.0.2

[root@storage network-scripts]#

 

 

19. Setup Port Forwarding in VMware Workstation

This small walkthrough explains how to configure a port forwarding in VMware Workstation 9 / 10. The same procedure should also work for VMware Workstation 8, 7 and 6.

 

Why do you need port forwarding in VMware Workstation? The main purpose is to make virtual machines available on the network. You could simply use bridged networking, but sometimes NAT fits better to your requirements. If you want your virtual machine to be available no matter what network you are connected to or if you are limited in IP addresses you might have a valid use case for using NAT and for port forwarding.

 

1. Open Virtual Machine Settings (Rightclick -> Settings…) and set your virtual machines network connection to “NAT

 

2. Power on the Virtual Machine and write down the IP address (You could also use a static IP address)

3. Open Virtual Network Editor (Edit -> Virtual Network Editor…)

4. Select VMnet8 / NAT and press NAT Settings…

 

5. Click on NAT SETTING. Make sure of GATEWAY IP. Click on Add  and Type as following

 


6. Configure Port and IP address ( SAME step 5)

 

7. Press OK twice to close NAT Settings and Virtual Network Editor

Finish! You can now access SSH service to the network with your workstations IP address. This is just an example and the port forwarding will also work with any other TCP/UDP Port, as long as it is not in use by your host.

 

18.  STOP and START NETWORK SERVICE
[root@storage ~]# service network stop

[root@storage ~]# service network start

 

ping <hostname> ---> it should ping

 

Now We will begin for ASM Configuration

Preparing Disk for ASM using ASMLib

First Download ORACLE ENTERPRISE LINUX 6.5 at http://edelivery.oracle.com.  You need to SIGNUP in order to DOWNLOAD the package. After login follow the below mentioned steps:

 

1. Type Oracle Linux. Under FILTER PRODUCTS BY Click on and then click on PLATFORM

2. After Clicking on PLATFORM select bit accordingly (ia64, X85 32 bit, X86 64 bit) according to your needs and click on SELECT button

platform.PNG

3. Scroll Down and Click on Continue.

 

4. Click on Select Alternate Release and Select ORALC LINUX according to your needs. Lets Select ORACLE LINUX 7.2.0.0 and click on CONTINUE

 

version.jpg

5.Following Popup Page will open for License Agreement. Click on CHECK BOX for the agreement and then click on CONTINUE

license.JPG

 

6. After then following POPUP page will open. DOWNLOAD V41362-01.isoOracle Linux Release 6 Update 5 for x86_64 (64 Bit)        3.6 GB

edelivery.PNG

 

7. After Downloading ISO file. Configure VMWARE ( Hard Disk, Ram, Networks accordingly). Select ISO file (V41362-01_2.iso) under CD/DVD.

 

iso.PNG

8. Click on Power On this Virtual Machine

 

poweron.JPG

 

9. Select Install or Upgrade an existing system

oracle.JPG

10. Select SKIP

skip.JPG

 

11. If you see the message saying UNSUPPORTED HARDWARE. Simply Click on OK

unsupported.JPG

12. ORACLE LINUX page will appear. Click NEXT

ol.JPG

13. Under What language would you like to use during the installation process ? Select ENGLISH and Click on NEXT

english.JPG

14. Under Select the appropriate keyboard for the system. Select U.S. English and Click NEXT

keyboard.JPG

15. Under What type of devices will your installation involve ? Select BASIC STORAGE DEVICES and Click NEXT. After then a new POPUP window (STORAGE DEVICE WARNING) will appeared, Click on Yes, discard any data

device_types.JPG

 

storage_device.JPG

16.Name your HOSTNAME and then Click NEXT

hostname.JPG

16, Please select the nearest city in your time zone and then Click on NEXT

nearest_city.JPG

17. Enter the password for root user and Click on NEXT

root_password.JPG

18. Just Incase if you see WEAK PASSWORD. Click on USE ANYWAY

weakpasswod.JPG

19. Select Which type of Installation would you like ? I use CREATE CUSTOM LAYOUT but you can select other OPTION if you like and then Click on NEXT

types_of_installation.JPG

20. Now Allocate the Disk according to your needs. In my case, I have configured the device for my own purpose which is not mandatory to follow. Finally after creating Disk Size for the MOUNT POINT, Click NEXT : -

 

Note : For my own purpose I have given following volume

device_2.JPG

 

21.After Clicking NEXT,  If you get FORMAT WARNING then Click on FORMAT.

format_warning.JPG

22. After Clicking FORMAT, You will get the following POPUP message. Click on WRITE CHANGES TO DISK

write_changes.JPG

23. Click on NEXT

install_boot_loader.JPG

24. Select "Basic Server" for installation and click on "Customize now" option, then click the "Next" button.

packages.JPG

25. You will see the list of PACKAGE GROUP and under PACKAGE GROUP you can select the individual packages accordingly. After selection, Click on NEXT.

base_server.JPG

26. INSTALLATION will not start. Wait for INSTALLATION to complete.

installation_start.JPG

27. Your ORACLE LINUX Server will now get complete. Click on REBOOT button to complete the installation.

reboot.JPG

28. Welcome Screen Will appear. Click on FORWARD

forward.jpg

29. You need accept the LICENSE AGGREMENT. . Select o Yes I agree to the License Agreement and Click FORWARD

license_information.jpg

30. REGISTER your Software YES or NO accordingly. For my purpose, I prefer to select NO and then Click FORWARD

update_yes_or_no.jpg

31. Click at NO THANKS, I'LL CONNECT LATER BUTTON and Click on FORWARD

nothanks.JPG

32. Enter the System USERNAME , FULL NAME and PASSWORD if you like. As per my needs, I prefer not to create USERNAME for now. Click on FORWARD

create_users.JPG

33. If you click on FORWARD without providing USERNAME and PASSWORD then a new POP MESSAGE will appear saying ARE YOU SURE YOU WANT TO CONTINUE ? Click YES

are_you_sure.JPG

34. Select DATE and TIME according to your Country Location. Click FORWARD

date_time.JPG

35. KDUMP screen will appear. Accept the default setting and then Click on  FINISH button.

kdump.JPG

36. Your PC will restart and then GUI will appear. Enter the username as root and then Click on LOGIN button. Similarly Enter the PASSWORD as well and Click on LOGIN button.

username.JPG

password.JPG

37. After LOGIN if you see this message then Click on check box DO NOT SHOW ME THIS AGAIN and then click on CLOSE button.

do_not_show.JPG

 

INSTALLATION FOR ORACLE ENTERPRISE LINUX 6.5.0 IS NOW COMPLETE

 

38. After login with username and password, Open Terminal and DISABLE firewall

# service iptables stop

# chkconfig iptables off

iptables.JPG

39. DISABLE SELINUX

# setenforce 0

# vi /etc/sysconfig/selinux

SELINUX=disabled

 

1.First you need to login as ORACLE user and Go to the Oracle Software Directory

orauser.JPG

2. Run the installer

[oracle@storage 11gr2db]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 7251 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-01-05_07-53-45PM. Please wait ...[oracle@storage 11gr2db]$

run.JPG

3. CONFIGURATION SECURITY UPDATES screen will appear .You can give the Email ADDRESS and ORACLE SUPPORT password if you need otherwise you can SKIP it by simply Clicking at NEXT

configuration_security.JPG

4. If you click on NEXT by skipping the Email Address and Oracle Support Password then it will give you a message saying EMAIL ADDRESS NOT SPECIFIED. Click YES

email.JPG

5. SELECT INSTALLATION OPTION will appear. Select o INSTALLED DATABASE SOFTWARE ONLY and Click NEXT

installation.JPG

6. Under NODE SELECTION, Select o SINGLE INSTANCE DATABASE INSTALLATION and Click NEXT

single_instance.JPG

7. SELECT PRODUCT LANGUAGE screen will display, Select the language and Click NEXT

language.JPG

8. What Database Edition do you want to install ? SELECT DATABASE EDITION according to your requirement. I am selecting ENTERPRISE EDITION (4.29 GB) and Click NEXT

database_edition.JPG

9. Specify INSTALLATION LOCATION accordingly and Click NEXT

location.JPG

10. Select Privileged Operating System Groups. Specify the UNIX group names for the database administrators (OSDBA) group and optionally, the database operators (OSOPER) group, then click NEXT

group.JPG

11. Now It will PERFORM PREREQUISITE CHECKS in following way

preone.JPG

12. After Performing PREREQUISITE CHECKS following screen will appear. Select INGNORE ALL and Click NEXT

pre_requisite.JPG

prereqtwo.JPG

13. SUMMARY screen will appear. Click FINISH

summary.JPG

14. INSTALL PRODUCT will now begin.

instone.JPG

15. During INSTALLING PRODUCT, following  EXECUTE CONFIGURATION SCRIPTS will appear. Login to ROOT user and run the scripts accordingly and then Click OK

execute_configuration.JPG

[root@storage ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

Running Oracle 11g root.sh script...

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)  [n]:

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)  [n]:

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]:

 

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.

[root@stor[root@storage ~]#

confscripts.JPG

16. Once you run above script /u01/app/oracle/product/11.2.0/db_1/root.sh, Click OK

execute_configuration.JPG

17. Once you click on OK, FINISH screen will appear. Click OK

finish.JPG

18. Once you click on CLOSE, You will see the following log for the install session.

[oracle@storage 11gr2db]$ ./runInstaller

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 7251 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 8191 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-01-05_07-53-45PM. Please wait ...[oracle@storage 11gr2db]$ You can find the log of this install session at:

/u01/app/oraInventory/logs/installActions2016-01-05_07-53-45PM.log

[oracle@storage 11gr2db]$

INSTALLER.JPG

Installing ORACLE DATABASE SOFTWARE is now COMPLETE

1. First of Login to Grid User

GU.JPG

2. Type asmca and hit enter

asmca.JPG

3. After then following screen will appear. Click on CREATE

screenone.JPG

4. Under CREATE DISK GROUP
Type Disk Group Name : FRA
Select Redundancy : NORMAL

Under DISK PATH Select ORCL VOL4, ORCL VOL5, ORCL VOL6 and Click OK

create_disk_group.JPG

5. After Clicking on OK, Creating DISK GROUP FRA screen will appeared and then finally you will see the screen saying Disk Group FRA created successfully. Click OK

message.JPG

dg.JPG

6. Following screen will appear. Click on EXIT

franew.JPG

7. Again Following windows will appear. Click YES

yes.JPG

 

Creating FRA DISK GROUP is now complete

While login to ENTERPRISE MANAGMENT CONSOLE,  I find following messages which says ACCESSIBILITY MODE ----> DISABLED. As a result, I was not able to login to ENTERPRISE MANAGER MAIN PAGE which is mentioned at the bottom mentioned at SIXTH .

First : In order to ENABLE/ACCESSIBLE the ACCESSIBILITY MODE, Login to oracle user and then You need to go to WEB-INF directory. The FULL LOCATION for WEB-INF directory is mentioned below.

 

[oracle@storage ~]$ echo $ORACLE_HOME

/u01/app/oracle/product/11.2.0/db_1

[oracle@storage ~]$  cd $ORACLE_HOME/j2ee/OC4J_EM/applications/em/em/WEB-INF

 

OR You can directly go to WEB-INF in following way i.e. whichever is convenient for you.

[oracle@storage WEB-INF]$  cd /u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/WEB-INF

[oracle@storage WEB-INF]$

 

SECOND : LOOK FOR uix-config.xml

[oracle@storage WEB-INF]$  ls

config  deployment  lib  orion-web.xml.template  publicPages.lst  tlds  uix-config.xml  uix-config.xml.template  web.xml

[oracle@storage WEB-INF]$

 

THIRD : Edit uix-config.xml , and then convert INACCESSIBLE TO ACCESSIBLE and Save & Exit

[oracle@storage WEB-INF]$  vi uix-config.xml

 

 

 

<!-- An alternate configuration that disables accessibility features  -->

  <default-configuration>

   <accessibility-mode>inaccessible</accessibility-mode>

   <supported-locales>

 

 

 

FOURTH: STOP AND START ENTERPRISE MANAGER again

 

[oracle@storage WEB-INF]$ emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

http://storage:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 11g Database Control ...

...  Stopped.

[oracle@storage WEB-INF]$ emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

http://storage:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ...... started.

------------------------------------------------------------------

Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/storage_orcl/sysman/log

[oracle@storage WEB-INF]$

 

FIFTH : LOGIN TO TO CONSOLE PAGE

http://storage:1158/em/console/aboutApplication

 

 

SIXTH : After loging, You will reached at the following page :-

 

As mentioned before that ORACLE DATABASE server consist of two components one is INSTANCE and another one is DATABASE.

Database consist of different file system and in this topics we will discuss about DATA FILE. So data file is are those file where you data’s get stored. For more clear, let’s say I am going to trigger INSERT query with some value on EXAMPLE table.

For example like this:

Insert into EXAMPLE ( 1, abc, def, 1024 )

So here 1, abc, def, 1024 are called DATA and where I am going to stored in a file called DATA FILE.

But the scenario many not be going like that there might be thousands of data file and inside that data file one data file may consist 2 GB of space. So, the question here is how you going to organize those number of DATA FILES and another question is how you going to organize those data inside the DATA FILE that what we will discussed in this topics.

Let me show you the list of data file first located in my pc. From the below screenshot you can see that there are different types of data files like EXAMPLE, SYSAUX,SYSTEM,UNDO, USERS  which we will discussed about this on next topic but in this topics how we going to discussed how this data files are going to managed. So here we going to learn how this data get organized.

So let’s start with simple example whenever you going to create table.  This is a DDL SQL statement. Say like I am going to create table named EXAMPLE.

CREATE TABLE EXAMPLE ( a number)

So here whenever you going to create a table example, oracle is going to create special storage unit and that storage unit is called SEGMENT. That means for any object that is going to consume some storage that means one SEGMENT storage must be created on that. So table EXAMPLE and this is table EXAMPLE segment.

 

 

Note: This segment will have an initial size which can be given at the time of create statement. In this case I haven’t gave any those parameter. If parameter in not given then ORACLE will going to take default parameter.

 

Let’s assume like 2 MB space will be allocate for data which is going to store at table EXAMPLE segment.

As I have mentioned above assuming 2 MB space is provided for SEGMENT. Again this segment contains multiple extents that means, you can assume like this 2 MB segment as two extent where 1 MB space is given on each extent. This means segment consist of extent. Note: There can be numerous extent but As per table EXAMPLE scenario it consist of TWO EXTENTS and inside extent the MEMORY ALLOCATION is contiguous but there is no information that each extent should not be / should be far away from each other.

 

 

 

Again inside extent it consist of number of BLOCKs.

 

Now let’s discuss how block is look like?

Firstly, It has space allocated inside the block which is called header or BLOCK HEADER. So header contains what kind of header inside it? Which mean if it is going to put table data, index data or plsql procedure.  So what types of data’s this block is going to stored? We put that in the header.

Secondly, If any activities going on right now inside the block. Let’s assume like this is table block and for that table let’s say i am triggering update. This means i am doing some sort of update activities / transaction.  So activities / transactions information.

Third, is Address which contains the location for where data is located?

TABLE DIRECTORY: There is some space allocated for table directory. For example if this is table block then it going to contains the name of the table whose data is going to store in this block

ROW DIRECTORY: Let’s assume in block C , we have some row like following. We have three rows. So what is the row address of the following three rows that is going to be stored under ROW DIRECTORY? Therefore ROW DIRECTORY contains the address of rows only.

1  abc def 1024

2  bbc bef 1025

3  abc def 1024

DATA BLOCK: Then we also have data block which contains the information about the data that going to be stored here.

Then I have some empty space those empty space is put for future updates or for updates task.

 

This three together the header, table directory and row directory is called BLOCK OVERHEAD. BLOCK OVERHEAD inside we store metadata about what things are going to store inside the block

 

Now if BLOCKS information is clear then lets got to above SEGMENT, EXTENT AND BLOCK figure again.

 

 

All the SEGMENT, EXTENT and BLOCKS, they are put together in a container and that container is called TABLESPACE. So tablespace is something which contains segments, extent and blocks.

 

 

Let’s take an another example

Assume like I have a table named T1, T2 then I have index named I1 and I2

So whenever I created table t1 I will give what is the tablespace that I am going to have for table named t1. Let’s assume like table space for t1 table is TA which means t1 is a part of TA

Let’s say T1 table segment named is S1

Similarly Table T2 is also part of TA tables pace, T2 table segment named is S2. Similarly index I1 segment and I2 segment. The segment is consist of number of extent and number of extents consists of number of blocks.

 

Then table space TA is associated with file called 1.dbf file. In my case file are like SYSAUX, USERDBF

 

 

 

  1. So from above figure what you are seeing is 1.dbf/user.dbf with .dbf format is physical file which is data file and the table space is actually a part of dbf. So below what we are seeing is LOGICAL STRUCTURE (tablespace à segment -à extent -à blocks) and PHSYCIAL STRUCTURE is a data file.

A parameter is key value pair. One of the parameter example is like db_block_size whose value is 8192 (8 kb)

 

so db_block_size is key

 

and 8192 is value

 

and another name example is db_name=orcl

 

 

A group of similar parameters are put together in file and that file is called Parameter file.

 

NOW LETS DISCUSS ABOUT PARAMETER FILE. The first parameter file is something related to network and that is

 

1. Tnsnames.ora=This is a network file so what tnsnames.ora suggest is that this file map the net

services name to connect discriptor. In simple word what is the alias name where we can connect to a database.

 

 

2. LISTENER.ORA=is the file which tell on which PORT LISTENER is going to run. By default LISTENER PORT IS 1521 but there

is feature where you can change the default parameter to 1523.

 

 

3. DATABASE PARAMETER FILE : ----> This is historically known as INIT.ORA. So init.ora / database parameter file

consist of parameter that required to start the database. In this lesson we going to concentrate mostly on this.

 

[oracle@storage dbs]$  cd /u01/app/oracle/product/11.2.0/db_1/dbs

[oracle@storage dbs]$ ls

hc_DBUA0.dat  hc_orcl.dat  init.ora  initorcl.ora  lkORCL  orapworcl  snapcf_orcl.f

[oracle@storage dbs]$

 

Here my init.ora name is initorcl.ora so what is ORCL. ORCL is oracle sid i.e. site identifier

 

WHAT IS SITE IDENTIFIER ? ORACLE_HOME IS WHERE U INSTALL ORACLE.

Site Identifier is a value. SITEIDENTIFIER + ORACLE HOME = UNIQUE KEY

 

SID + ORACLE HOME TOGETHER CREATES A UNIQUE KEY AND that UNIQUE KEY is attached to the SGA (SYSTEM GLOBAL AREA).

For whatever reason if you give wrong SID name then it give u an error saying ORACLE IS NOT AVAILABLE and the reason

for this is that whatever unique key you are generating that key is not able to attached to SGA. To startup database

you need INIT with SID i.e.INITORCL.ORA . In my case my SID name is ORCL so therefor i am seeing initorcl.ora

 

 

SO IF YOU LOOKING AT INITORCL.ORA YOU are going to seem some value like KEY VALUE PAIR.

 

CONTROL_FILES=''

DB_NAME=ORCL;

SESSION=20;

 

so essentially what this parameter suggest how the instance is configure ?

 

 

If you look at initorcl.ora file the you will see at least 10 to 15 parameter which are default parameter

but in real in order to start DATABASE you actually required three parameters.

 

1. CONTROL FILE

2. DB_BLOCK_SIZE

3. DATABASE NAME

 

ISO if you have above three parameters then all other parameters are either default or can be computed

based on above three parameters.

 

NOTE : UNDER YOU LOCAL SERVER YOU WILL SEE ONLY 10 TO 15 PARAMETER BUT IN YOUR PRODUCTION YOU MAY SEE LOTS OF VALUES WILL BE THERE.

 

DESC V$PARAMETER;

SELECT COUNT(*) FROM V$PARAMETER;

 

 

HOW TO CHECK PARAMETER ? LETS SAY YOU WANT TO CHECK SQL  TRACE PARAMETER.

 

SHOW PARAMETER SQL_TRACE; OUTPUT SHOWS SQL TRACE PARAMETER IS SET TO FALSE

 

SHOW PARAMETER SQL_TRACE; second option

 

NOW HOW TO MODIFY THE PARAMETER. There are two where you can modify parameter

 

first one going inside init.orra

second is use alter command

 

alter system set sql_trace= true scope=memory;

 

AGAIN CHECK THE VALUE OF SQL TRACE it will show true

 

SHOW PARAMETER SQL_TRACE;

 

LET'S UNDERSTAND THIS CLAUSE SCOPE=MEMORY

 

ONCE DB STARTED, THE DB STARTED WITH THE DEFAULT PARAMETER WHICH WAS SQL TRACE = FALSE

 

THEN WHEN I SAY SCOPE=MEMORY, THIS MEANS SQL TRACE VALUE WILL BE TRUE AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW BACK TO FALSE AGAIN.

 

 

 

DB STARTED ---FALSE

|

|

|

|----------TRUE

|

|

|

DB SHUTDOWN AND RESTART ----FALSE

 

 

THEN WHEN I SAY SCOPE=SPFILE, THIS MEANS SQL TRACE VALUE WILL BE FALSE AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW TRUE. SO HERE IN THIS CASE IN ORDER TO GET TRUE STATUS

YOU NEED TO SHUTDOWN AND RESTART DATABASE

 

 

 

DB STARTED ---FALSE

|

|

|

|----------FALSE

|

|

|

DB SHUTDOWN AND START ---TRUE

 

 

 

 

THEN WHEN I SAY SCOPE=BOTH, THIS MEANS SQL TRACE VALUE WILL BE TRUE RIGHT AWAY AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW TRUE. SO HERE IN THIS CASE IN ORDER TO GET TRUE STATUS

YOU DO NOT NEED TO SHUTDOWN OR RESTART THE DATABASE

 

 

DB STARTED ---TRUE

|

|

|

|----------TRUE

|

|

|

DB SHUTDOWN AND START ---TRUE

 

 

 

ANOTHER THING YOU CAN DO IS CREATE PFILE FROM SPFILE BY GIVING A COMMAND:

 

create PFILE from SPFILE;

 

 

ANOTHER THING IS WHAT IF DATABASE FILE GET CORRUPTED ?

 

As i have already told you that SPFILE is an binary file.

 

 

1. By using UNIX command STRINGS.

2. Alert log : WHEN DB get started all this NON DEFAULT PARAMETER VALUE are put in alert.log . You can take those value and create pfile say 2.ora

ASM (AUTOMATIC STORAGE MANAGEMENT)

ASM provides flexible boundaries of PARTITIONS where you can increase and decrease the DISK QUOTA size accordingly. If Data file and Backup File is in same location or in same disk then performance get decrease. Single Point of Failure may occurs since the data file and backup file is in same location therefore if the disk becomes failure then both of it will get failed. In order to get ride of such failure, ASM were introduce from Oracle 10G. ASM makes a disk group functions.

 

In summary ASM provides the following functionality:

- ASM helps to managed groups of disk which is known as  disk groups.

- ASM helps for disk redundancy within a disk group.

- ASM automatic near-optimal I/O balancing without any manual performance.

- ASM automatically enables management of database objects without specifying mount points and file names.

- ASM support the large volume files.

 

Administering ASM Disk Groups

Before you plan to use ASM, there are certain few points you should plan while using ASM

- Generally only two DISK GROUS (DATA and FRA) is created where DATA holds all the database related files   and the FLASH RECOVERY AREA (FRA)  holds a variety of backup and recovery-related files on your behalf.You must also determine a disk quota for the flash recovery area, the maximum space to be used for all files stored there. You must choose a location large enough to accomodate the required disk quota. When the disk space limit is approached, Oracle can delete nonessential files to make room for new files, subject to the limitations of the retention policy.

 

Flash Recovery Area (FRA) holds the following files:

- A copy of all datafiles

- Incremental backups, as used by your chosen backup strategy

- Online redo logs

- Archived redo logs not yet backed up to tape

- Control files

 

 

Now lets Create Partition from Fdisk, In my case I have created total 6 Partitions (10GB each)  where I am planning allocate 3 Partitions for DATA and 3 Partition for FRA. Below is the steps that we can follow with.

 

[root@storage Desktop]# fdisk /dev/sda

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 51761

Last cylinder, +cylinders or +size{K,M,G} (51761-65271, default 65271): +10G

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

/dev/sda12          51761       53066    10490445   83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 53067

Last cylinder, +cylinders or +size{K,M,G} (53067-65271, default 65271): +10G

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

/dev/sda12          51761       53066    10490445   83  Linux

/dev/sda13          53067       54372    10490413+  83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 54373

Last cylinder, +cylinders or +size{K,M,G} (54373-65271, default 65271): +10G

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

/dev/sda12          51761       53066    10490445   83  Linux

/dev/sda13          53067       54372    10490413+  83  Linux

/dev/sda14          54373       55678    10490413+  83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 55679

Last cylinder, +cylinders or +size{K,M,G} (55679-65271, default 65271): +10G

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

/dev/sda12          51761       53066    10490445   83  Linux

/dev/sda13          53067       54372    10490413+  83  Linux

/dev/sda14          54373       55678    10490413+  83  Linux

/dev/sda15          55679       56984    10490413+  83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 56985

Last cylinder, +cylinders or +size{K,M,G} (56985-65271, default 65271): +10G

 

Command (m for help): p

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes

255 heads, 63 sectors/track, 65270 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a968c

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          64      512000   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              64       13119   104857600   83  Linux

/dev/sda3           13119       26173   104857600   83  Linux

/dev/sda4           26173       65271   314059776    5  Extended

/dev/sda5           26173       39227   104857600   83  Linux

/dev/sda6           39227       44449    41943040   83  Linux

/dev/sda7           44449       46407    15728640   83  Linux

/dev/sda8           46407       48365    15728640   83  Linux

/dev/sda9           48366       49671    10485760   83  Linux

/dev/sda10          49671       50715     8388608   82  Linux swap / Solaris

/dev/sda11          50716       51760     8388608   83  Linux

/dev/sda12          51761       53066    10490445   83  Linux

/dev/sda13          53067       54372    10490413+  83  Linux

/dev/sda14          54373       55678    10490413+  83  Linux

/dev/sda15          55679       56984    10490413+  83  Linux

/dev/sda16          56985       58290    10490413+  83  Linux

 

Command (m for help): n

First cylinder (48365-65271, default 48365): 58291

Last cylinder, +cylinders or +size{K,M,G} (58291-65271, default 65271): +10G

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

 

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

[root@storage Desktop]#

 

Finally you can see that 6 PARTITIONS has been created. The below RED BORDER Circle contains those 6 CREATED PARTITIONS informations.

six_partitioin.JPG

Installing ASMLib

ASMLib Installation is required if you are planning to configure and access ASM DISKS then Also Make sure to check your kernel version using the following command as the root user.


[root@storage ~]# uname -r

3.8.13-118.2.2.el6uek.x86_64

[root@storage ~]#

 

For ASMLib Installation following packages were required. I have ORACLE ENTERPRISE LINUX 6.5 therefore I will be downloading following package

 

    oracleasm-support-2.0.1-1.i386.rpm

    oracleasmlib-2.0.1-1.i386.rpm

    oracleasm-2.6.9-34.ELsmp-2.0.1-1.i686.rpm

 

NOTE : I have downloaded ASMLib  software from the following url :

- oracleasm-support-2.0.1-1.i386.rpm ( already available inside PACKAGES folder)

- oracleasmlib-2.0.1-1.i386.rpm ( If you don't have then you can download from here wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el6.x86_64.rpm)

- oracleasm-2.6.9-34.ELsmp-2.0.1-1.i686.rpm ( If not availabe then you can get it from here wget http://oss.oracle.com/projects/oracleasm/dist/files/RPMS/rhel4/amd64/2.0.3/2.6.9-34.EL/oracleasm-2.6.9-34.ELsmp-2.0.3-1.x86_64.rpm)

 

[root@storage Packages]# cd /stage/Disk1/Packages

[root@storage Packages]# rpm -Uvh oracleasm-support-2.1.8-1.el6.x86_64.rpm oracleasmlib-2.0.12-1.el6.x86_64.rpm oracleasmlib-2.0.12-1.el6.x86_64.rpm

warning: package oracleasmlib = 2.0.12-1.el6 was already added, skipping oracleasmlib = 2.0.12-1.el6

Preparing...                ########################################### [100%]

   1:oracleasmlib           ########################################### [ 50%]

   2:oracleasm-support      ########################################### [100%]

[root@storage Packages]#

three_asm_rpm.JPG

 

3. After above three RPM is installed, Configure ASM KERNEL MODULE now

 

Configuring ASMLib

Since ASMLib software is already installed, following steps need to be implemented by the system administrator to make the ASM driver available. The ASM driver needs to be loaded, and the driver filesystem needs to be mounted. This is taken care of by the initialization script, /etc/init.d/oracleasm.

 

You need to run the /etc/init.d/oracleasm script with the 'configure' option. It will ask for the user and group that default to owning the ASM driver access point. If the database was running as the 'oracle' user and the 'dba' group, the output would look like this:

 

[root@storage Packages]# /etc/init.d/oracleasm configure

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.

 

Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver:                              [  OK  ]

Scanning the system for Oracle ASMLib disks:              [  OK  ]

[root@storage Packages]#

 

orclasm_configure.JPG

4. After KERNEL MODULE is loaded, Apply the earlier 6 Disk Created for ASM DISK

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL1 /dev/sda12

Marking disk "VOL1" as an ASM disk:                        [  OK  ]

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL2 /dev/sda13

Marking disk "VOL2" as an ASM disk:                        [  OK  ]

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL3 /dev/sda14

Marking disk "VOL3" as an ASM disk:                        [  OK  ]

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL4 /dev/sda15

Marking disk "VOL4" as an ASM disk:                        [  OK  ]

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL5 /dev/sda16

Marking disk "VOL5" as an ASM disk:                        [  OK  ]

[root@storage Packages]# /etc/init.d/oracleasm createdisk VOL6 /dev/sda17

Marking disk "VOL6" as an ASM disk:                        [  OK  ]

[root@storage Packages]#

create_disk.JPG

5.  Scan for the DISK

[root@storage Packages]# /etc/init.d/oracleasm scandisks

Scanning the system for Oracle ASMLib disks:               [  OK  ]

[root@storage Packages]#

scan_disk.JPG

 

6. List all the stamped disk

[root@storage Packages]# /etc/init.d/oracleasm listdisks

VOL1

VOL2

VOL3

VOL4

VOL5

VOL6

[root@storage Packages]#

listdisk.JPG

 

ASM DISK IS NOW READY TO USE