Oracle Names Servers
Oracle Names server is like a telephone book; it provides an address but not directions to that address. An Oracle
Names server will provide a client connection request with an address to connect to, for instance, hostname, port number
and service or SID name. Oracle Names involves the use of an Oracle Names server. The Oracle Names server is used to store
service addresses and net service names. The Oracle Names server is used to keep a central store of service addresses much like a DNS
server does. An Oracle Names server can be used to store names and addresses of all database services across a network.
The Oracle Names server is used to return a network address when provided with a name by a client connection request. The
client process will then make a connection request to a database server with the network address provided by the Oracle
Oracle Names server network setup is intended for use on large globally distributed networks. With Oracle Names,
network addresses and database links are potentially available to all nodes throughout a very large network. Each node
in this network is accessed by use of a simple name where individual regions and Oracle Names servers act as routers
to direct traffic between source and target nodes, much like the internet. Network addresses and infrastructure
is transparent from the client process perspective. Oracle Names server environments also allow for centralised
administration of a network environment.
Very large networks can be divided up into adminsitrative regions. For instance, a global
company could divide up their networking environment into administrative regions based on continents
such as Europe, North America, Asia, etc. Oracle Names servers can be included within administrative
regions. However, Oracle Names servers can also be allowed to communicate across administrative
regions. Storage of Oracle Names servers within administrative regions can be stored in a database
applicable to that administrative region. When a database is not used multiple Oracle Names server
within a single administrative region update each other by way of replication. Obviously storage
of Oracle Names servers configurations is more efficiently stored in a centralised administrative
region database. Without the database Oracle Names servers will have to continually query each other
with respect to network node updates. Domains exist uniquely within an administrative region. Thus domains can be duplicated across administrative
regions. Domains are organised in hierarchical structures.
An Oracle Names server will store specific details about databases within their respective administrative
regions and sometimes outside of their administrative regions. In general these values are global database names,
other Oracle Names server names and addresses, global database links, Oracle Connection Managers, net
service names and aliases. Aliases can be net service alternate names, database service names and
global database links.
Domain models for Oracle Names server usage can either consist of a single domain or multiple domains.
When using multiple domains with Oracle Names servers all domains must be configured in a hierarchical
fashion with a root domain at the top of the hierarchy. The root domain has access to all other domains, allowing
different administrative regions to communicate with other administrative regions through the root domain;
each domain has its own configuration set up or database administrative region Oracle Names servers database store.
The root administrative region contains its own details plus network addresses in subset (delegated) hierarchical
administrative regions. Obviously the root administrative region will only contain Oracle Names server addresses
for its own Oracle Names servers plus direct administrative region subset Oracle Names server addresses.
Configuring Oracle Names Server
Oracle Names server environments can be implemented in one of two general configurations. Oracle Names server environments can
have their data continuously replicated across all Oracle Names servers or have all region location Oracle Names servers store their
data into a region specific database. If the database is ever unavailable cache'd data and cache'd configuration is used. Oracle Names server
environments can also be divided into adminsitrative regions containing multiple Oracle Names servers with multiple domains. Multiple
administrative regions must be contained within a single, centralised root administrative region.
All Oracle Names server configuration files are usually placed into $ORACLE_HOME/network/names. Cache information, data and
configuration, is stored in various files.
- $ORACLE_HOME/network/names/ckcfg.ora - configuration parameters backup copy.
- $ORACLE_HOME/network/names/ckpcch.ora - non-authoritative data retrieved and cached from remote regions. Note that the NAMESCTL utility command, START_CLIENT_CACHE can be executed to start the client cache daemon process. This process creates a client cache or Oracle Names server information which will allow clients to access remote region addresses from cache rather than having to look up address information every time a named connection is requested.
- $ORACLE_HOME/network/names/ckpreg.ora - authoritative data for the current region. When a database is used this file is a copy of the database tables and will be used if the database fails.
Always create more than one Oracle Names server on a network using an Oracle Names server solution. If one Oracle Names server
goes down another is available to take on all of the network load. A single Oracle Names server requires no configuration as a default.
Configure an Oracle Names server database, creating specific Oracle Names server tables, by executing a script called
$ORACLE_HOME/network/admin/names/namesini.sql under a newly created username / schema.
An Oracle Names server can be tested by executing the NAMESCTL utility PING accounts.xyz.com command. This command can
effectively ping multiple, space separated, Oracle Names server names.
Preferred Oracle Names Servers
In a network environment involving multiple Oracle Names servers certain Oracle Names can take
precedence over (be preferred over) other Oracle Names servers. This is allowed because sometimes
some Oracle Names server addresses in a network are faster response addresses than others, depending
on numerous factors. The NAMESCTL utility command REORDER_NS creates a list of Oracle
Names servers based on network availability where each Oracle Names server is ranked in order based on
response time and obviously, availability. Is an Oracle Names server, machine, regional database, etc.
up and running ? When setting preferred Oracle Names servers these preferred Oracle Names servers
will allow a manual override of the automated Discover process of Oracle Names servers. The easiest way
to set up preferred Oracle Names servers is by using the Net8 Assistant program or
Oracle Names Control Utility (NAMESCTL)
- DELEGATE_DOMAIN [domain] [names server] [(address=...)] - first subregion domain of the current adminsitrative region.
- DOMAIN_HINT [domain] [names server] [(address=...)] - hints applied to requests from remote regions directing those requests to other remote domains thus skirting Oracle Names servers in the current region and minimising on network traffic.
- DUMP_LDAP [source] [target] [options] [-f filename] - dumps region data and exports to LDIF file format.
- DUMP_TNSNAMES - dumps all names and addresses for a region into a tnsnames.ora file.
- FLUSH - clears all remote region information from the Oracle Names server's cache checkpoint file (ckpcch.ora).
- FLUSH_NAME [domain] - as with FLUSH but clears a specified region from the Oracle Names server's cache checkpoint file (ckpcch.ora).
- LIST_DELEGATED [domain | default=root domain] - shows all a region's delegated domains.
- LIST_DOMAINS - shows all a region's domains.
- LIST_OBJECTS [domain] - network objects for region.
- LOAD_TNSNAMES - load tnsnames.ora file contents into Oracle Names server.
- LOG_STATS - logs statistics to $ORACLE_HOME/network/names/names.log.
- PASSWORD [password] - allows for privileged operations. Should match encrypted password in NAMES.PASSWORD parameter of $ORACLE_HOME/network/names/names.ora file.
- PING [names server].
- QUERY - gets a network object from the Oracle Names server.
- REGISTER object [-t service_type] [-d (address ...)] [-h names server] [ -l listener] - network object Oracle Names server registration.
- RELOAD - Oracle Names server checks administrative region for any data changes and reloads everything if changes made.
- REORDER_NS - creates a file listing local Oracle Names servers and addresses in order of preferential use.
- REPEAT - performs other commands repeatedly to gather timing statisitcs.
- RESET_STATS - resets Oracle Names server statistics.
- RESTART - restarts Oracle Names server to initial configuration.
- SET command and SHOW command. SET will list available options.
- CACHE_CHECKPOINT_INTERVAL - timeout for remote region information storing cache to ckpcch.ora.
- DEFAULT_DOMAIN - overrides the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file.
- FORWARDING_AVAILABLE [ON | OFF] - OFF disables remote names and access to remote regions.
- LOG_FILE_NAME - $ORACLE_HOME/network/names/names.log.
- LOG_STATS_INTERVAL - statistics logging frequency to $ORACLE_HOME/network/names/names.log.
- NAMESCTL_TRACE_LEVEL [OFF | USER |ADMIN | SUPPORT].
- PASSWORD (SET only) - sets the password allowing for subsequent entry of privileged commands. Must match the NAMES.PASSWORD parameter in the $ORACLE_HOME/network/names/names.ora file.
- REQUESTS_ENABLED [ON | OFF] - OFF prevents Oracle Names server from responding to requests.
- RESET_STATS_INTERVAL - statistics reset timeout.
- SAVE_CONFIG_INTERVAL - NAMESCTL SET command changes written to $ORACLE_HOME/network/names/names.ora.
- SAVE_CONFIG_ON_STOP - NAMESCTL session end configuration storage to $ORACLE_HOME/network/names/names.ora.
- SERVER [name].
- STATUS (SHOW only).
- SYSTEM_QUERIES (SHOW only) - system queries next occurence.
- TRACE_FILE_NAME - $ORACLE_HOME/network/names/names.trc.
- TRACE_LEVEL = [OFF | USER | ADMIN | SUPPORT].
- SHUTDOWN | STOP - stops Oracle Names servers.
- START[UP] - starts the Oracle Names server and loads system and administrative region information.
- START_CLIENT_CACHE - starts the client cache daemon process.
- STATUS - displays Oracle Names server statistics.
- TIMED_QUERY - shows all information in the Oracle Names server.
- UNREGISTER - delete a network object from the Oracle Names server.
Oracle Names Server Parameters
Oracle Names server parameters are stored in the $ORACLE_HOME/network/admin/names.ora file.
- ADDRESSES - addresses on which Oracle Names server listening addresses.
- ADMIN_REGION - administrative region data source.
- AUTHORITY_REQUIRED = [TRUE | FALSE].
- AUTO_REFRESH_EXPIRE = n - Oracle Names server caches another region's database server address for a period of time.
- AUTO_REFRESH_ENTRY = n - Oracle Names server retries it's domain hint list Oracle Names servers.
- CACHE_CHECKPOINT_FILE - Oracle Names server writes a checkpoint of it's current cache to the file $ORACLE_HOME/network/names/ckpcch.ora.
- CACHE_CHECKPOINT_INTERVAL - time interval for checkpointing the Oracle Names server cache.
- CONFIG_CHECKPOINT_FILE - Oracle Names server configuration checkpointing to $ORACLE_HOME/network/names/configck.ora.
- CONNECT_TIMEOUT = n - Oracle Names server waits n seconds for completion of a client connection request.
- DEFAULT_FORWARDERS - other Oracle Names servers for forwarding to.
- DEFAULT_FORWARDERS_ONLY - forces forwarding to default forward Oracle Names servers only.
- DOMAIN_HINTS - names, address and domains of all Oracle Names servers in one or more remote regions.
- DOMAINS - domains in local region.
- FORWARDING_AVAILABLE = [ON | OFF] - when set to ON Oracle Names server forwards client requests to a remote Oracle Names server.
- FORWARDING_DESIRED = [TRUE | FALSE] - Oracle Names server sends remote Oracle Names server address lcoations to clients.
- KEEP_DB_OPEN = [TRUE | FALSE] - maintain TNS connection to region database between operations.
- LOG_[DIRECTORY | FILE] - $ORACLE_HOME/network/log/names.log.
- LOG_STATS_INTERVAL = n - time between log file statistical dumps.
- LOG_UNIQUE = [TRUE | FALSE] - unique log files will not overwrite previous log files but create new ones.
- MAX_OPEN_CONNECTIONS = n - connections for the Oracle Names server.
- MAX_REFORWARDS = n - times the Oracle Names server forwards an operation.
- MESSAGE_POOL_START_SIZE = n - server message pool allocation initially, for incoming and outgoing connections.
- NO_MODIFY_REQUESTS = [TRUE | FALSE] - refusal of operations modifying data in it's region.
- NO_REGION_DATABASE = [TRUE | FALSE] - Oracle Names server has no region database.
- PASSWORD - encrypted password for the Oracle Names server for privileged operations. For an unencrypted password set the NAMESCTL.INTERNAL_ENCRYPT_PASSWORD attribute in the sqlnet.ora file.
- REGION_CHECKPOINT_FILE - checkpoint file for region data in $ORACLE_HOME/network/names/ckpreg.ora.
- RESET_STATS_INTERVAL = n - number of seconds for statistics collection, 0 = none, minimum = 10 seconds.
- SAVE_CONFIG_ON_STOP = [TRUE | FALSE] - saves Oracle Names server configuration to the $ORACLE_HOME/network/names/names.ora when stopping the Oracle Names server.
- SERVER_NAME - unique Oracle Names server name.
- TRACE_[DIRECTORY|FILE] - Oracle Names server trace file in $ORACLE_HOME/network/trace/names.trc.
- TRACE_FUNC = [TRUE | FALSE] - control of tracing by function name.
- TRACE_LEVEL = [OFF | USER | ADMIN | SUPPORT].
- TRACE_UNIQUE = [ON | OFF] - unique trace file names, ie. not overwritten.