Naming Method Configuration

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

4

Naming Method Configuration

Copyright © Oracle Corporation, 2002. All rights reserved.


Objectives

After completing this lesson, you should be able to do


the following:
• Describe the difference between host naming and
local service name resolution
• Use Oracle Net Configuration Assistant to
configure:
– Host Naming method
– Local naming method
– Net service names
• Perform simple connection troubleshooting

4-2 Copyright © Oracle Corporation, 2002. All rights reserved.


Overview of Naming Methods

• Naming methods are used by a client application


to resolve a connect identifier to a connect
descriptor when attempting to connect to a
database service.
• Oracle Net provides five naming methods:
– Host naming
– Local naming
– Directory naming
– Oracle Names
– External naming

4-3 Copyright © Oracle Corporation, 2002. All rights reserved.


Host Naming

Clients can connect to a server using a host name


under the following conditions:
• Connecting to an Oracle database service using
Oracle Net Services Client software
• Client and server are connecting using TCP/IP
protocol
• Host names are resolved through an IP address
translation mechanism such as DNS or a local
/etc/hosts file
• No advanced features such as Oracle Connection
Manager or security options are used

4-4 Copyright © Oracle Corporation, 2002. All rights reserved.


Host Naming: Client Side

Client Server

TCP/IP


names.directory_path = (HOSTNAME)
sqlnet.ora

listener.ora

4-5 Copyright © Oracle Corporation, 2002. All rights reserved.


Host Naming: Server Side

Client Server

TCP/IP
1521

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = stc-sun02.us.oracle.com)
(ORACLE_HOME = /u03/ora9i/rel12)
(SID_NAME = TEST)

sqlnet.ora listener.ora

4-6 Copyright © Oracle Corporation, 2002. All rights reserved.


Host Naming: Example

• listener.ora file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = stc-sun02.us.oracle.com)
(ORACLE_HOME = /home1/user461/oracle)
(SID_NAME = TEST)
• Connecting from the client:
sqlplus system/[email protected]

4-7 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring Host Naming
Using Net Manager

4-8 Copyright © Oracle Corporation, 2002. All rights reserved.


Local Naming

Client Server

sqlnet.ora

tnsnames.ora listener.ora

4-9 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-10 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-11 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-12 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-13 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-14 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the tnsnames.ora File
Using Net Manager

4-15 Copyright © Oracle Corporation, 2002. All rights reserved.


Configuring the Local Naming Method
Using Net Manager

4-16 Copyright © Oracle Corporation, 2002. All rights reserved.


Generated Files:
tnsnames.ora

# TNSNAMES.ORA Network Configuration


# File:D:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
U461 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)(HOST = ed-pdsun1)(PORT = 8461))
)
(CONNECT_DATA =
(SERVICE_NAME = U461)
)
)

4-17 Copyright © Oracle Corporation, 2002. All rights reserved.


Generated Files:
sqlnet.ora

# SQLNET.ORA Network Configuration File:


D:\oracle\ora92\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES)

4-19 Copyright © Oracle Corporation, 2002. All rights reserved.


Troubleshooting the Client Side

The following error codes are related to problems on


the client side:

ORA-12154 “TNS:could not resolve service name”


ORA-12198 “TNS:could not find path to destination”
ORA-12203 “TNS:unable to connect to destination”
ORA-12533 “TNS:illegal ADDRESS parameters”
ORA-12541 “TNS:no listener”

4-20 Copyright © Oracle Corporation, 2002. All rights reserved.


Summary

In this lesson, you should have learned how to:


• Describe the difference between host naming and
local service name resolution
• Use Oracle Net Manager to configure:
– Host naming method
– Local naming method
– Net service names
• Perform simple connection troubleshooting

4-22 Copyright © Oracle Corporation, 2002. All rights reserved.


Practice 4 Overview

This practice covers the following topics:


• Local Naming configuration
• Configuration of net service names
• Testing the configuration

4-23 Copyright © Oracle Corporation, 2002. All rights reserved.

You might also like