Oracle 11g Release 2 Install on RHEL 6.2(x86_64 bit) - part4

Part 4: Configure Oracle Network connections on Server.

This is the final part in our Oracle Installation series. In our three earlier posts we have seen how to install an Oracle Database. Here are the links to them:
Part 1 Prerequisites
Part 2 Install Software Files
Part 3 Install Oracle Database
In this post we will configure Oracle Net on the server so that clients can connect to the Oracle Database.

Oracle listener on the server is the component that listens for connections from clients. The listener is configured in a file called listener.ora under $ORACLE_HOME/network/admin folder in the server box.
We can configure Oracle network configuration with the following tools: Oracle Net Configuration Assistant(netca), Enterprise Manager(em console), and Oracle Net Manager(netmgr).
Here we will configure a listener with the netca GUI tool found under $ORACLE_HOME/bin directory.

Login as the Oracle user and type "netca" once in the $ORACLE_HOME/bin directory. Follow the screenshots below:
1. Welcome: "Listener Configuration" will be selected by default. Click Next.

2. Listener Configuration, Listener: Select "Add" and click Next.

3. Listener Configuration, Listener Name: Provide a listener name and click Next.

4. Listener Configuration, Select Protocols used to connect to DB Server: Select TCP and click Next.

5. Listener Configuration, TCP/IP Protocol: Use the standard port number 1521 or you can specify some other port. Click Next.

6. Listener Configuration, More Listeners: Select No and click Next.

7. Listener Configuration Done: Click Next.

You will be taken to the Welcome screen, where you can click Finish.
This concludes the listener configuration. You can view the listener.ora file created at $ORACLE_HOME/network/admin/listener.ora.
[oracle@jade admin]$ cat listener.ora
# listener.ora Network Configuration File: /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

    (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))

ADR_BASE_LISTENER = /opt/oracle/app
We can start, stop, check status of listener with the lsnrctl command.(Commands: lsnrctl start/stop/status)

Next we can Configure the Naming Methods for the Database server. Naming methods can be said as the way how clients can connect to Oracle Server. There are several ways clients connect to Oracle Server, we will select Local Naming and Easy Connect Naming. In Local Naming client uses a net service name from tnsnames.ora file stored on a client. In Easy Connect Naming clients use a connect string for a simple TCP/IP address, consisting of a host name and optional port and service name, like CONNECT username/password@host[:port][/service_name]

Configuring the Naming Methods will create the sqlnet.ora file in $ORACLE_HOME/network/admin directory. The sqlnet.ora file is profile configuration file residing on the server and client box and contains client side network configuration parameters.
We can use the netca tool to create this file on the server box.
1. Welcome: In the netca GUI Welcome screen select Naming Method configuration and click Next.

2. Naming Methods Configuration, Select Naming Methods: Select "Local Naming" and "Easy Connect Naming" and click Next.

3. Naming Methods Configuration Done. Click Next. This will take you to Welcome screen where you can click Finish to close the tool.

You can now view the sqlnet.ora file under $ORACLE_HOME/network/admin/sqlnet.ora.
[oracle@jade admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /opt/oracle/app/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.


ADR_BASE = /opt/oracle/app

Next if you would like the Server box to act as Oracle client and connect to other Oracle DB servers, you may configure the tnsnames.ora file using "Local Net Service Name configuration" in netca Welcome screen.

This completes our Oracle installation. Cheers!!!

No comments:

Post a Comment