22
Deploying Oracle Names Jeff D’Abate Sr. Database Administrator Enterprise Application Services November 19, 2004

Deploying Oracle Names

Embed Size (px)

DESCRIPTION

Deploying Oracle Names. Jeff D’Abate Sr. Database Administrator Enterprise Application Services November 19, 2004. Topic to be covered:. What is Oracle Names ? Future of Oracle Names. Design Plan for an Oracle Names implementation. Components of Oracle Names. - PowerPoint PPT Presentation

Citation preview

Page 1: Deploying Oracle Names

Deploying Oracle Names

Jeff D’AbateSr. Database AdministratorEnterprise Application Services

November 19, 2004

Page 2: Deploying Oracle Names

Topic to be covered:

• What is Oracle Names ?

• Future of Oracle Names.

• Design Plan for an Oracle Names implementation.

• Components of Oracle Names.

• Installation and Verification of Oracle Names.

• Operational Aspects of Oracle Names.

• Miscellaneous Notes

Page 3: Deploying Oracle Names

What is Oracle Names ?

Oracle Names is a distributed naming service developed for Oracle environments to help simplify the setup and administration of global, client/server computing networks.

Oracle Names uses proprietary software to store the names and addresses of all database services (connection descriptors) on a network. These may, or may not be maintained within an Oracle database.

Clients wishing to connect to a database server direct their connect requests to an Oracle Names server. Oracle Names servers resolve the name to a network address and return that information to the client.

Page 4: Deploying Oracle Names

What is the future of Oracle Names ?

• “In future releases, Oracle Names will not be supported as a centralized naming method.” (There is no Oracle Names in 10g)

• “Because no new enhancements are being added to Oracle Names, consider using directory naming instead or migrating an existing Oracle Names configuration to directory naming” (such as Oracle Internet Directory).

• “Oracle Database 10g does not support the use of Oracle Names. Neither Oracle Database 10g clients nor Oracle Databases can use Oracle Names, including by LDAP proxy, to resolve naming. Oracle8i and Oracle9i clients can still use Oracle Names to resolve naming for a 10g database.”

Page 5: Deploying Oracle Names

Design Plan for an Oracle Names implementation.

For our implementation we chose the following:

• A single database to maintain all database connection descriptors for naming resolution.

• All database connection descriptors will be maintained at the “root” level.

• The use of “checkpoint” files (without replication), for redundancy should the database not be available.

• Four Names Servers running on each of our main database servers.

• All clients will connect to the “primary” Names Server.

Page 6: Deploying Oracle Names

What are the Components of Oracle Names ?

DBONSNames Server

Region Database

Oracle Name Server #1:onames_dbsvr1

Port: 1575

onames_dbsvr1_ckpcch.ora onames_dbsvr1_ckpcfg.ora onames_dbsvr1_ckpdom.ora onames_dbsvr1_ckptop.ora

Oracle Name Server #2:onames_dbsvr2

Port: 1575

onames_dbsvr2_ckpcch.ora onames_dbsvr2_ckpcfg.ora onames_dbsvr2_ckpdom.ora onames_dbsvr2_ckptop.ora

User User User

OracleDatabase

Oracle Name Server #3:onames_dbsvr3

Port: 1575

onames_dbsvr3_ckpcch.ora onames_dbsvr3_ckpcfg.ora onames_dbsvr3_ckpdom.ora onames_dbsvr3_ckptop.ora

Oracle Name Server #4:onames_dbsvr4

Port: 1575

onames_dbsvr4_ckpcch.ora onames_dbsvr4_ckpcfg.ora onames_dbsvr4_ckpdom.ora onames_dbsvr4_ckptop.ora

OracleDatabase

OracleDatabase

OracleDatabase

OracleDatabase

OracleDatabase

OracleDatabase

OracleDatabase

App Server App ServerApp ServerApp Server

Page 7: Deploying Oracle Names

What are the components of Oracle Names ?

• Client configuration files:• names.ora• sqlnet.ora

• Server configuration and log files:• names.ora• sqlnet.ora• checkpoint files• log file

Page 8: Deploying Oracle Names

Components of Oracle Names

Required files on the client-side:

sqlnet.ora: #===============================================================# SQLNET.ORA Network Configuration File# # It uses the Oracle Names Server on DBSVR1 as its# primary. It will use the Oracle Names Server on # DBSVR2,3,4 if the Names Server on DBSVR1 is not# available.## 03/30/2004 J. D'Abate#===============================================================

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.PREFERRED_SERVERS= List of ALL Name Servers used for Naming Resolution. (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr1)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr2)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr3)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr4)(PORT=1575)))

NAMES.DIRECTORY_PATH= (ONAMES) Names Server ONLY for Naming Resolution.#NAMES.DIRECTORY_PATH= (ONAMES,TNSNAMES) Names Server, then TNSNAMES for Naming

Resolution.

Page 9: Deploying Oracle Names

Components of Oracle Names

Required files on the client-side:

names.ora: #==========================================================================# NAMES.ORA Network Configuration File.## This file sets the default Oracle Name Server and location, although# it will "failover" to the Oracle Name Server running on DBPROD2,3,4 if/when# the Names Server on dbsvr1 is unavailable.## 03/30/2004 J. D'Abate#==========================================================================

NAMES.SERVER_NAME = onames_dbsvr1 Default Name Server for this client.

NAMES.ADDRESSES= Location of ALL Name Servers. (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr1)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr2)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr3)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr4)(PORT=1575)))

Page 10: Deploying Oracle Names

Components of Oracle Names

Required files on the server-side:

sqlnet.ora: #============================================================================# SQLNET.ORA (DBSVR1)## 03/2004 J. D'Abate#============================================================================

NAMES.DIRECTORY_PATH= (ONAMES,TNSNAMES)

NAMES.PREFERRED_SERVERS= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr1)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr2)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr3)(PORT=1575)) (ADDRESS=(PROTOCOL=tcp)(HOST=dbsvr4)(PORT=1575)))

NAMESCTL.INTERNAL_ENCRYPT_PASSWORD=falseNAMESCTL.SERVER_PASSWORD=quicksandNAMESCTL.NOCONFIRM=on

Page 11: Deploying Oracle Names

Components of Oracle Names

Required files on the server-side:

names.ora: #============================================================================# NAMES.ORA (DBSVR1)### 03/2004 J. D'Abate#============================================================================NAMES.SERVER_NAME = onames_dbsvr1.case.eduNAMES.ADDRESSES = (ADDRESS = (PROTOCOL = TCP)(HOST = dbsvr1)(PORT = 1575))

NAMES.PASSWORD=quicksand Administrative password.NAMES.NO_MODIFY_REQUESTS=true Disallow DB updates via this Name Server.

#------------------------------------------------# Oracle Names Server File & Directory Section:#------------------------------------------------NAMES.LOG_DIRECTORY =/dbsvr1/oraadmin01/adminNAMES.LOG_FILE = onames_dbsvr1NAMES.CACHE_CHECKPOINT_FILE =/dbsvr1/oraadmin01/admin/onames_dbsvr1_ckpcch.oraNAMES.CONFIG_CHECKPOINT_FILE =/dbsvr1/oraadmin01/admin/onames_dbsvr1_ckpcfg.oraNAMES.DOMAIN_CHECKPOINT_FILE =/dbsvr1/oraadmin01/admin/onames_dbsvr1_ckpdom.oraNAMES.TOPOLOGY_CHECKPOINT_FILE=/dbsvr1/oraadmin01/admin/onames_dbsvr1_ckptop.ora

#---------------------------------------------# Oracle Names Server Trace Section:#---------------------------------------------NAMES.TRACE_DIRECTORY=/dbsvr1/oraadmin01/adminNAMES.TRACE_FILE=onames_dbsvr1.trcNAMES.TRACE_LEVEL=offNAMES.TRACE_UNIQUE=on

Page 12: Deploying Oracle Names

Components of Oracle Names

Required files on the server-side:

names.ora (continued): NAMES.RESET_STATS_INTERVAL = 0 Do not reset statistics.NAMES.LOG_STATS_INTERVAL=86400 Write statistics to log every 24 hours.NAMES.CACHE_CHECKPOINT_INTERVAL=600 Write CACHE to Checkpoint files every 10 minutes.NAMES.KEEP_DB_OPEN=true Maintain connection to DB.

NAMES.ADMIN_REGION = Connection info to the Names Database. (REGION = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbsvr1)(PORT = 1699)) (CONNECT_DATA = (SID = onames) (Server = Dedicated) ) ) (USERID = ons) (PASSWORD = quicksand) (NAME = LOCAL_REGION) (REFRESH = 600) Update CACHE from Database every 10 minutes. (RETRY = 60) (EXPIRE = 600) (VERSION = 134230016) )

Page 13: Deploying Oracle Names

Components of Oracle Names

Log file on the server-side:

onames_dbsvr1.log: 04-OCT-2004 07:40:19: NNO-00326: server statistic counter dump followsQuery requests received: 163887Messages received: 163887Corrupted messages received: 0Requests refused, processing disabled: 0Messages sent: 163884Responses sent: 163887Alias loops detected: 0Cache lookup requests: 164373Names created on lookup: 219Cache lookup failures: 6311Cache lookup exact matches: 157843Cache checkpoints: 575Cache checkpoint failures: 0Timeouts, name TTL expired: 105Forwarding failures: 0Timeouts, server not responding: 0Not forwarded, no servers found: 0Reforwarded requests expired: 0Authoritative answers when authority: 0Non-authoritative NACKs received: 0Objects received with no TTL: 0Responses received: 0Unmatched responses received: 0Requests received: 163887Requests forwarded: 0Foreign data items cached: 004-OCT-2004 07:40:19: NNO-00327: server statistic counter dump ends

Page 14: Deploying Oracle Names

Installation and Verification of Oracle Names

• Oracle Names is NOT installed with the default installation of Oracle Enterprise Server Edition. You must explicitly chose to install it from the Oracle Installer.

• To validate whether Names is currently installed on your server, check your $ORACLE_HOME/bin directory for the “names” executable (or names.exe on windows).

• The namesctl (Name Server Control Utility) is installed with the default Oracle client installation.

Page 15: Deploying Oracle Names

Operational Aspects of Oracle Names

Oracle Names Control Utility (namesctl:)The Oracle Names Control utility enables you to administer an Oracle

Names server.

Important namesctl commands:– start, stop, reload

– status

– list_objects, timed_query

– register, unregister

– dump_tnsnames, dump_ldap

See Oracle9i Net Services Administrator’s Guide, Chapter 5.

“Configuration and Administration Tools Overview”

Page 16: Deploying Oracle Names

Operational Aspects of Oracle Names

Oracle Net Manager (netmgr):

A tool that combines configuration abilities with component control toprovide an integrated environment for configuring and managing Oracle NetServices.

You can use Oracle Net Manager to configure the following networkcomponents:

Naming: Define connect identifiers and map them to connect descriptors to identify the networklocation and identification of a service. Oracle Net Manager supports configuration of

connectdescriptors in a local tnsnames.ora file, centralized LDAP-compliant directory server, or anOracle Names server.

Naming Methods:Configure the different ways in which connect identifiers are resolved into connectdescriptors.

Listeners:Create and configure listeners to receive client connections.

Page 17: Deploying Oracle Names

Operational Aspects of Oracle Names

Our simplified approach to Oracle Names “connection descriptor” management:

Instead of using the namesctl commands to register/unregister content in the

Name Server, we insert/delete directly into the Oracle Name Server database.

This allowed us to:

1. “Lockdown” the namesctl utility more securely, by disallowing updates to the Oracle Name Server database through the utility.

2. Centralize management of the content of the Name Server by inserting and deleting rows directly to the ONS.ONRS_REGION table.

You can still use the namesctl “register” connection descriptors into the Names

Server database, unless you have set NAMES.NO_MODIFY_REQUESTS=true.

Page 18: Deploying Oracle Names

Operational Aspects of Oracle Names

Steps to manually add a database connection descriptor:

Step 1: Insert the new connection descriptor into the ONS.ONRS_REGION table of your Name Server database:

insert into ONS.ONRS_REGIONvalues('(root)',‘DB123','(DATA_LIST=(FLAGS=0x1)(DATA=(TYPE=a.smd.)(DESCRIPTION

= (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dbsvr1)(PORT = 1523))) (CONNECT_DATA = (SID = db123) (SERVER = DEDICATED)))))');

Step 2: Restart all of your Name Servers (which will reload its CACHE from the ONS.ONRS_REGION table).

namesctl restart onames_dbsvr1.case.edunamesctl restart onames_dbsvr2.case.edunamesctl restart onames_dbsvr3.case.edunamesctl restart onames_dbsvr4.case.edu

Page 19: Deploying Oracle Names

Operational Aspects of Oracle Names

Steps to manually delete a database connection descriptor:

Step 1: Delete the connection descriptor from the ONS.ONRS_REGION table of your Name Server database:

delete from ONS.ONRS_REGION where name_p = ‘DB123';

Step 2: Restart all of your Name Servers (which will reload its CACHE from the ONS.ONRS_REGION table – less the deleted row).

namesctl restart onames_dbsvr1.case.edunamesctl restart onames_dbsvr2.case.edunamesctl restart onames_dbsvr3.case.edunamesctl restart onames_dbsvr4.case.edu

Page 20: Deploying Oracle Names

Operational Aspects of Oracle Names

To manually add or delete a database connection descriptor via namesctl:

Adding:NAMESCTL> REGISTER DB123 -t oracle_database –

d(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbsvr1)(PORT=1523)) (CONNECT_DATA=(SERVICE_NAME=db123)))

Deleting:NAMESCTL> UNREGISTER DB123 -t oracle_database -

d(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbsvr1)(PORT=1523)) (CONNECT_DATA=(SERVICE_NAME=db123)))

Remember: You can always use Oracle Net Manager to manage entries in your Oracle Names Environment.

Page 21: Deploying Oracle Names

Miscellaneous Notes:

• Beware: Some applications don’t play “nicely” with Oracle

Name Server, and will force you to use TNSNAMES.

• Metalink Note: 149108.1 (Good source of info)• Quickstart Guide:

“Setup and Configuration of Oracle Names 8i

Using a Region Database.”

Page 22: Deploying Oracle Names

If you have any questions, please feel free to contact me.

Jeff D’[email protected]

[email protected]

Thank You !