Skip navigation

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