Skip Headers

Oracle9i Net Services Reference Guide
Release 2 (9.2)

Part Number A96581-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page Go to next page
View PDF

3
Oracle Names Control Utility

This chapter describes the commands and associated syntax of the Oracle Names Control utility.

This chapter contains these topics:

Oracle Names Control Utility Overview

The Oracle Names Control utility enables you to administer Oracle Names servers. You can use its commands to perform basic management functions on one or more Oracle Names servers. Additionally, you can view and change parameter settings.

The basic syntax of Oracle Names Control utility administrative commands is as follows:

namesctl command [onames_server]

where onames_server is the name of the Oracle Names server to be administered.

You can also issue Oracle Names Control utility commands at the NAMESCTL> program prompt. To obtain the prompt, enter namesctl with no arguments at the operating system command line. When you run namesctl, the program is started. You can then enter the necessary commands from the program prompt. The basic syntax of issuing commands from NAMESCTL> program prompt is as follows:

namesctl
NAMESCTL> command [onames_server] 

When you start the Oracle Names Control utility, it starts a session with an Oracle Names server. The session is started with the first Oracle Names server listed in the discovery file (.sdns.ora on UNIX operating systems and sdns.ora on Windows operating systems) or the sqlnet.ora file (by the NAMES.PREFERRED_SERVERS parameter). The SHOW SERVER commands display the Oracle Names server that the Oracle Names Control utility is currently managing. If you want to start a session with another Oracle Names server, then use the SET SERVER command.


Note:

The START command starts a session with the Oracle Names server that is started, even if the Oracle Names Control utility had a session with another Oracle Names server.



Note:

You can combine commands in a standard text file, and then run them as a sequence of commands. To execute in batch mode, use the format:

namesctl @file_name

You can use either REM or # to identify comments in the batch script; all other lines are considered commands. Any commands that would typically require confirmation do not require confirmation during batch execution.


The Oracle Names Control utility supports several types of administrative commands:

The Oracle Names Control utility also provides data operations command, such as QUERY and REGISTER.

SET and SHOW Commands of the Oracle Names Control Utility

You can use the SET command to change some parameter values for an Oracle Names server or the Oracle Names Control utility environment. Parameter values remain in effect until the Oracle Names server is shut down. If you want these settings to persist, use the SAVE_CONFIG, SET SAVE_CONFIG_ON_STOP, or SET SAVE_CONFIG_INTERVAL commands to save changes to the names.ora.

You can use the SHOW command to display the current value of a configuration setting.

Distributed Operations

The Oracle Names Control utility can perform operations on a local or a remote Oracle Names server. This is useful when a single administrator is managing all of the Oracle Names servers in a region, or wants to check the availability of a specific Oracle Names server.

To set up a computer to remotely administer an Oracle Names server, ensure that the Oracle Names Control utility (namesctl) executable is installed.

All commands except START can be issued when an Oracle Names server is administered remotely. The Oracle Names Control utility can only start the Oracle Names server on the same computer from where the utility is running.

When issuing commands, specify the name of the Oracle Names server as an argument. For example:

NAMESCTL> SHOW SYSTEM_QUERIES dolphin.us.acme.com

If the Oracle Names Control utility cannot locate the Oracle Names server, then a name lookup error appears:

NNL-00406: name "dolphin.us.acme.com" does not exist 

If you know the protocol address of the particular Oracle Names server, then enter it in place of the name of the Oracle Names server. For example:

 NAMESCTL> SHOW SYSTEM_QUERIES 
(ADDRESS=(PROTOCOL=tcp)(HOST=dolphin.us.acme.com)(PORT=1575))

When the name omitted, the Oracle Names server that the Oracle Names Control utility has a session with is assumed. If a session cannot be established with any Oracle Names server, then the following error appears:

NNL-00005: no server has been set. Use the "SET SERVER" command first

Use the SET SERVER command to establish a session with an Oracle Name server.

Once remote access is established, all commands except START can be issued.

See Also:

"Oracle Names Control Utility Overview" for further information about session establishment

Oracle Names Server Security

If the NAMES.PASSWORD parameter is set in the names.ora, then the Oracle Names Control utility requires a SET PASSWORD command for any sensitive operations, such as stopping an Oracle Names server.

If the NAMESCTL.SERVER_PASSWORD parameter is set in the sqlnet.ora file on the node running the Oracle Names Control utility, you are prompted to use the SET PASSWORD command each time a secure operation is performed.

If you are concerned with the security implications of explicitly putting an Oracle Names server password in the client sqlnet.ora file, you can omit the NAMESCTL.SERVER_PASSWORD parameter and always use the command:

NAMESCTL> SET PASSWORD

When passed over the network, the password is encrypted, regardless of how it was set in the names.ora file. However, if the NAMESCTL.INTERNAL_ENCRYPT_PASSWORD parameter is set to false in the sqlnet.ora file, then the password is not encrypted.

Confirmation Mode in the Oracle Names Control Utility

Some of the Oracle Names Control utility commands require confirmation before they are executed. When you issue the command, you are prompted:

confirm:[yes or no]

Enter yes to execute the command; enter no to cancel the command.

You can turn confirmation mode off by setting the parameter NAMESCTL.NOCONFIRM to true in the sqlnet.ora file.

Oracle Names Control Utility Commands

This section lists and describes the Oracle Names Control utility commands.


DELEGATE_DOMAIN

Purpose

Use the command DELEGATE_DOMAIN to define a domain as the start of a subregion for the current administrative region.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl DELEGATE_DOMAIN {domain}{onames_server}{(ADDRESS=...)}

From the Oracle Names Control utility:

NAMESCTL> DELEGATE_DOMAIN {domain}{onames_server}{(ADDRESS=...)}

Arguments

{domain}: Specify the domain name.

{onames_server}: Specify the Oracle Names server name.

{(ADDRESS=...)}: Specify the Oracle Names server protocol address.

See Also:

Chapter 5, "Protocol Address Configuration" for further information about defining protocol addresses

Usage Notes

This command provides a dynamic way to subdivide the namespace.

Unless a domain is delegated from a region, the Oracle Names servers in that region assume authority over all subdomains. In order to delegate a domain, you must first create a new region.

Once a domain is delegated, the Oracle Names servers in the current administrative region forward subsequent operations to the subregion where the domain is administered by Oracle Names servers.

Examples

NAMESCTL> DELEGATE_DOMAIN webwidgets.acme.com ns1.webwidgets.acme.com 
(ADDRESS=(PROTOCOL=tcp)(HOST=fred.webwidgets.acme.com)(PORT=1575))


DOMAIN_HINT

Purpose

Use the command DOMAIN_HINT to specify domain hints for requests for data from remote regions. A domain hint contains the name of a remote domain and at least one address of an Oracle Names server in that domain. A hint enables the Oracle Names server to forward the request to a specific address, reducing network traffic.

Without a domain hint, an Oracle Names server forwards a request to whatever remote Oracle Names servers it knows, which then forwards the request to the root Oracle Names server in its region. The root Oracle Names server forwards the request to the Oracle Names server which has information on the domain that the request refers to.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl DOMAIN_HINT {domain}{onames_server}{(ADDRESS=...)}

From the Oracle Names Control utility:

NAMESCTL> DOMAIN_HINT {domain}{onames_server}{(ADDRESS=...)}

Arguments

{domain}: Specify the domain name.

{onames_server}: Specify the Oracle Names server name.

{(ADDRESS=...)}: Specify the Oracle Names server protocol address.

See Also:

Chapter 5, "Protocol Address Configuration" for further information about defining protocol addresses

Usage Notes

Any region that is not the root region will need at least the root region defined using this command in order to find objects in any other region. You can provide additional hints as optimizations to provide local Oracle Names servers with direct access to certain other regions.

Examples

NAMESCTL> DOMAIN_HINT ACME.COM ns0.acme.com (ADDRESS=(PROTOCOL=tcp) 
(HOST=top.acme.com)(PORT=1575))


DUMP_ALIAS

Purpose

Use the command DUMP_ALIAS to query all the alias data in a domain or domain subtree and export the data to a LDAP-compliant directory service or into an LDAP Data Interchange Format (LDIF) file, which can later be loaded into a directory.


Notes:
  • Net service aliases are not supported using Microsoft Active Directory.
  • This command does not verify that the object the alias is referencing exists in the directory. If an alias is exported and the object is referencing is not exported, then the DUMP_ALIAS command exports the alias without verifying that the referenced database service or net service name exists.
  • The command should use the same destination as applied with the DUMP_LDAP command to the object the alias is referencing. If an alias and the object it is referencing are exported with different destinations, then the net service alias will not contain the correct name for the object it is referencing. This can occur in a case of tree rearrangement. See Oracle9i Net Services Administrator's Guide for further information.

Prerequisites

The directory must already have the Oracle schema and one or more Oracle Contexts.

Password Required If One Has Been Set

A password for the directory may be required.

Syntax

Exporting Data to an LDIF File

NAMESCTL> DUMP_ALIAS [source] [destination] [options] {-f [filename]}

Exporting Data To a Directory

NAMESCTL> DUMP_ALIAS [source] [destination] [options] {-h host} {-p port} {-D 
user_dn} {-w password}

Arguments

[source]: Specify the source Oracle Names domain and, optionally, the -R argument:

{domain}: Specify the domain name for aliases to be exported. The default domain is the root. The operation is forwarded to an Oracle Names server that is authoritative for that domain if the Oracle Names server which the client contacts is not authoritative.

[-R]: Specify to recursively descend the Oracle Names tree structure. Without -R, this command looks only at objects in the specified domain.

[destination]: Specify the distinguished name (DN) in the directory information tree (DIT) where to export net service aliases. A DN can be specified in one of following ways:

[options]: Arguments that specify how the export of the aliases is to occur:

-c: Specify that the export should continue on error.

-n: Specify to not perform an actual export. This argument enables you to perform a test run. The results display to the screen.

-m: Specify that existing entries in the DIT are to be modified.

-x: Specify to not include cn=OracleContext in each object's DN.

[-f filename]: Specify that the exported data dumped into an LDIF file, which can later be loaded into a directory. The default file name is onames.ldif. To use onames.ldif as the default name, specify -f as the last argument.

These arguments specify the location of the directory server:

[-h host]: Specify the host name of the directory server.

[-p port]: Specify the port number the directory is configured to listen on. The default TCP/IP port number is 389.

These arguments specify the authentication credentials of the directory server:

[-D user_dn]: Specify a directory administrator that has been given add and modify privileges. For example, cn=Mary is the DN for an administrator named Mary.

[-w password]: Specify the password for the directory administrator.

Usage Notes

See Also:

Oracle9i Net Services Administrator's Guide

Examples

Exporting Net Service Aliases to a LDIF File

NAMESCTL> DUMP_ALIAS acme.com (dn:dc=sales,dc=com) -R -f test.ldif 

Exporting Net Service Aliases Directly Into a Directory

NAMESCTL> DUMP_ALIAS acme.com (dn:dc=sales,dc=com) -R -h ldap-server -p 
389 -D cn=orcladmin -w welcome

DUMP_LDAP

Purpose

Use the command DUMP_LDAP to query all the addresses of database objects in a domain or region and export the data to a LDAP-compliant directory service or into an LDIF file, which can later be loaded into a directory.


Note:

Because database objects are exported as net service names, the username and password credentials for a global database link or link qualifier is not exported with the address information. In the same way you used global database links in Oracle Names, you can use a net service name from a directory to access an object in a database. However, the net service name will behave as a connected user database link.


See Also:

Prerequisites

The directory must already have an Oracle schema and one or more Oracle Contexts.

Password Required If One Has Been Set

A password for the directory may be required.

Syntax

Exporting Data to an LDIF File

NAMESCTL> DUMP_LDAP [source] [destination] [options] {-f [filename]}

Exporting Data To a Directory

NAMESCTL> DUMP_LDAP [source] [destination] [options] {-h host} {-p port} {-D 
user_dn} {-w password}

Arguments

[source]: Specify the source Oracle Names domain and, optionally, the -R argument:

{domain}: Specify the domain name for objects to be exported. The default domain is the root. The operation is forwarded to an Oracle Names server that is authoritative for that domain if the Oracle Names server which the client contacts is not authoritative.

[-R]: Specify to recursively descend the Oracle Names tree structure. Without -R, this command looks only at objects in the specified domain.

[destination]: Specify the DN in the DIT where to export objects. A DN can be specified in one of following ways:

[options]: Arguments that specify how the export of data is to occur:

-c: Specify that the export should continue on error.

-n: Specify to not perform an actual export. This argument enables you to perform a test run. The results display to the screen.

-m: Specify that existing entries in the DIT are to be modified.

-x: Specify to not include cn=OracleContext in each object's DN.

[-f filename]: Specify that the exported data be dumped into an LDIF file, which can later be loaded into a directory. The default file name is onames.ldif. To use onames.ldif as the default name, specify -f as the last argument.

These arguments specify the location of the directory server:

[-h host]: Specify the host name of the directory server.

[-p port]: Specify the port number the directory is configured to listen on. The default TCP/IP port number is 389.

These arguments specify the authentication credentials of the directory server:

[-D user_dn]: Specify a directory administrator that has been given add and modify privileges. For example, cn=mary is the DN for an administrator named Mary.

[-w password]: Specify the password for the directory administrator.

Usage Notes

See Also:

Oracle9i Net Services Administrator's Guide

Examples

Exporting Data to an LDIF File

NAMESCTL> DUMP_LDAP sj.us.sczi.com (dn:ou=sj,dc=us,dc=sczi,dc=com) -R -f 
test.ldif

Exporting Data Directly Into a Directory

NAMESCTL> DUMP_LDAP sj.us.sczi.com (dn:ou=sj,dc=us,dc=sczi,dc=com) -R -h 
ldap-server -p 389 -D cn=orcladmin -w welcome


DUMP_TNSNAMES

Purpose

Use the command DUMP_TNSNAMES to write the address information defined in the local region to a tnsnames.ora file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl DUMP_TNSNAMES

From the Oracle Names Control utility:

NAMESCTL> DUMP_TNSNAMES

Arguments

None

Usage Notes

DUMP_TNSNAMES writes the addresses defined in the local region into tnsnames.ora, that is, everything with an address-type record, A.SMD.

The command creates or partially overwrites the tnsnames.ora file. Any entries in the existing tnsnames.ora that are not defined in the Oracle Names servers will remain. Any definitions in tnsnames.ora that are also defined in the Oracle Names servers will be overwritten. Entries that are defined in the Oracle Names servers but not in the tnsnames.ora are added.

Example

NAMESCTL> DUMP_TNSNAMES


EXIT

Purpose

Use the command EXIT to exit from the Oracle Names Control utility.

Prerequisites

The Oracle Names Control utility must be loaded.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the Oracle Names Control utility:

NAMESCTL> EXIT

Arguments

None

Usage Notes

EXIT has no affect on any Oracle Names servers; it affects only the Oracle Names Control utility.

This command is identical to the QUIT command.

Example

namsctl> EXIT
NL-00851: NAMESCTL finished

FLUSH

Purpose

Use the command FLUSH to instruct the Oracle Names server to clear all remote region information from its local cache checkpoint file, which has a default of ckpcch.ora.

Prerequisites

This command is relevant with an environment with multiple regions where there is authoritative data.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl FLUSH [onames_server] [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> FLUSH [onames_server] [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then only the current Oracle Names server cache is flushed of the foreign names.

Usage Notes

FLUSH erases all remote data that has been cached. Typically, you should flush the foreign data cache for the following reasons:

Names are flushed from the current Oracle Names server. The current Oracle Names server is either the default preferred Oracle Names server or the one set by using the SET SERVER command.

Examples

NAMESCTL> FLUSH
Confirm [yes or no]: yes


FLUSH_NAME

Purpose

Use the command FLUSH_NAME to instruct the Oracle Names server to clear information for a specific region from its local cache checkpoint file, which has a default of ckpcch.ora.

Prerequisites

This parameter is useful for an environment with multiple regions. (In central administration, there is no authoritative data.)

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl flush_name {domain}

From the Oracle Names Control utility:

NAMESCTL> flush_name {domain}

Arguments

[domain]: Specify the domain name.

Usage Notes

FLUSH_NAME erases only data cached from outside the region of the Oracle Names server, that is, non-authoritative data. Data is typically flushed when a name is behaving unusually, suggesting the source copy may have changed.

Names are flushed from the current Oracle Names server. The current Oracle Names server is either the default preferred Oracle Names server or the one set by using the SET SERVER command.

Example

NAMESCTL> FLUSH_NAME mountain.acme.com


HELP

Purpose

Use the command HELP to provide a list of all the Oracle Names Control utility commands or provide syntax help for a particular Oracle Names Control utility command.

Prerequisites

None

Password Required If One Has Been Set:

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl HELP [command]

From the Oracle Names Control utility:

NAMESCTL> HELP [command]

Arguments

[command]: Specify a HELP command. Commands are shown in the following example output.

When you enter a command as an argument to HELP, the Oracle Names Control utility displays information about how to use the command. When you enter HELP without an argument, the Oracle Names Control utility displays a list of all the commands.

Example

NAMESCTL> HELP
The following operations are available:
An asterisk (*) denotes a modifier or extended command:
exit
flush
flush_name
log_stats
ping
query
quitreload
repeat*
reset_stats
restart 
save_config
set*
show
shutdown
start
startup
status
stop 
version

LIST_DELEGATED

Purpose

Use the command LIST_DELEGATED to list all the delegated domains for the root region or a specified domain.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl LIST_DELEGATED [domain]

From the Oracle Names Control utility

NAMESCTL> LIST_DELEGATED [domain]

Arguments

[domain]: Specify the domain name.

Usage Notes

Before exporting data from an Oracle Names server to a directory server, use this command to find out the current domain structure.

See Also:

Oracle9i Net Services Administrator's Guide

Example

NAMESCTL> LIST_DELEGATED
europe.acme.com
asia.acme.com
africa.acme.com

LIST_DOMAINS

Purpose

Use the command LIST_DOMAINS to list all the domains in the root region or subdomains for a specified domain.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system

namesctl LIST_DOMAIN [domain]

From the Oracle Names Control utility:

NAMESCTL> LIST_DOMAIN [domain]

Arguments

[domain]: Specify the domain name.

Usage Notes

Before exporting data from an Oracle Names server to a directory server, use this command to determine the current domain structure.

See Also:

Oracle9i Net Services Administrator's Guide

Example

NAMESCTL> LIST_DOMAINS
com
sczi.com
us.sczi.com
sj.us.sczi.com

LIST_OBJECTS

Purpose

Use the command LIST_OBJECTS to list all the network objects for the root region or a specified domain.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl LIST_OBJECT [-R] [domain]

From the Oracle Names Control utility:

NAMESCTL> LIST_OBJECT [-R] [domain]

Arguments

[-R]: Specify that all authoritative subdomains of the given domain be listed.

[domain]: Specify the domain name.

Usage Notes

Before exporting data from an Oracle Names server to a directory server, use this command to determine the objects stored in a domain.

See Also:

Oracle9i Net Services Administrator's Guide

Example

NAMESCTL> LIST_OBJECTS
partsdb.widgets.acme.com
toolsdb.widgets.acme.com
partsdb.components.widgets.acme.com
sparepartsdb.gadgets.widgets.acme.com

LOAD_TNSNAMES

Purpose

Use the command LOAD_TNSNAMES to load all connect descriptors defined in one or more tnsnames.ora files into an Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl LOAD_TNSNAMES {directory_path/tnsnames.ora} [...]

From the Oracle Names Control utility:

NAMESCTL> LOAD_TNSNAMES {directory_path/tnsnames.ora}[...] 

Arguments

{directory_path/tnsnames.ora}: Specify one or more tnsnames.ora files.

Usage Notes

This command would typically be used once when a site begins using Oracle Names after having used tnsnames.ora files. Run this command once for each region. The names defined during this operation will be defined permanently and will be propagated from one Oracle Names server to all the rest in the region.

Example

NAMESCTL> LOAD_TNSNAMES /oracle9i/network/admin/tnsnames.ora
   Name:                  koala.lab.npd.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  devdd.rdbms.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  envyd.lab.npd.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  stealth.npd.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  null.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  slime.lab.npd.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  felix.hp.us.acme.com 
   Response status:       normal, successful completion 
   Name:                  dtnet1.dec.acme.com 
   Response status:       normal, successful completion 
   Name:                  devds.rdbms.us.acme.com 
   Response status:       normal, successful completion 

LOG_STATS

Purpose

Use the command LOG_STATS to log the current set of statistics to the configured log file for that Oracle Names server. The log file has a default of names.log.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl LOG_STATS [onames_server] [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> LOG_STATS [onames_server] [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. When no names are supplied, then only the statistics for the current Oracle Names server are reset.

Usage Notes

Statistics may be logged if the STATUS command or other behavior indicates some data that you would like to capture in the log. This command does not affect the current log statistics interval.

Example

NAMESCTL> LOG_STATS
Statistics counters logged.

PASSWORD

Purpose

Use the command PASSWORD to set an encrypted password for privileged Oracle Names Control utility commands, such as STOP, RESTART, and RELOAD.

Prerequisites

The Oracle Names Control utility must be loaded.

Password Required If One Has Been Set

Not applicable

Syntax

From the Oracle Names Control utility:

NAMESCTL> PASSWORD [password]

Arguments

Text string matching the value encrypted in the NAMES.PASSWORD parameter in the names.ora file.

Usage Notes

This command does not change a password already established with the NAMES.PASSWORD parameter in the names.ora file. It simply sets an Oracle Names Control utility variable. Then, the value stored is sent from the Oracle Names Control utility with any command request to the Oracle Names server, and the value is compared to that on the Oracle Names server. If they match, then operations requiring passwords are allowed.

Only privileged operations are affected, that is, operations that alter the functioning of the Oracle Names server. Operations such as SHOW or STATUS are not considered privileged, and do not require a password.

The password can either be passed as an argument of the PASSWORD command, or, if no argument is given, you are prompted for the password. Note that the input is not displayed on the screen as it is entered.

When passed over the network, the password is always encrypted, regardless of how it is set.

Examples

NAMESCTL> PASSWORD open_sesame

NAMESCTL> PASSWORD
Enter name server password: names9i


PING

Purpose

Use the command PING to contact an Oracle Names server and display the request/response time.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl PING [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> PING [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then only the current Oracle Names server is pinged.

Usage Notes

Ping ensures that an Oracle Names server is functioning and shows typical response times from the location of the Oracle Names Control utility user to an Oracle Names server.

Example

NAMESCTL> PING nserver.com
Round trip time is 0.04 seconds

QUERY

Purpose

Use the command QUERY to retrieve the contents of a network object stored in the Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl QUERY object_name [record_type] [modifiers]

From the Oracle Names Control utility:

NAMESCTL> QUERY object_name [record_type] [modifiers]

Arguments

[record_type]: Specify one of the following record types:

[modifier]: Specify one of the following modifier types:

Usage Notes

QUERY can be used to verify that a defined piece of data can be found, and that the contents are correct.

If this command is used with just a name as a parameter, then Oracle Names server responds with the number of pieces of data with that name, and the time required to complete the operation.

If this command is used with the name and type supplied as arguments, the specific name is looked up and returned to the user.

The QUERY command can take multiple arguments. For example:

QUERY sales.com a.smd authority trace

This command operates on the current Oracle Names server, either the default, or as specified using the SET SERVER command.

Example

NAMESCTL> QUERY bones.dem.medicine a.smd
Total response time:0.04 seconds
Response status:normal, successful completion
Authoritative answer:yes
Number of answers:1
Canonical name:bones.dem.medicine
TTL: 1 day
Alias translations:
    from:bones.dem.medicine
    to: bones.dem.medicine
Answers:
    data type is "a.smd"
        Syntax is ADDR:...(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(Host=bones-pc)
(Port=1521))(CONNECT_DATA=(SERVICE_NAME=bones.dem.medicine)))

QUIT

Purpose

Use the command QUIT to quit the Oracle Names Control utility.

Prerequisites

The Oracle Names Control utility must be loaded.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the Oracle Names Control utility:

NAMESCTL> QUIT

Arguments

None

Usage Notes

QUIT has no affect on any Oracle Names servers; it affects only the Oracle Names Control utility.

This command is identical to the EXIT command.

Example

NAMESCTL> QUIT
NL-00851: NAMESCTL finished

REGISTER

Purpose

Use the command REGISTER to register a network object to an Oracle Names server.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system

namesctl REGISTER {object_name} [-t service_type]  
[-d[(DESCRIPTION=](ADDRESS=...)[(CONNECT_DATA=(SERVICE_NAME|SID=service_
name|SID))][)] [-h host] [-l listener_name]

From the Oracle Names Control utility:

NAMESCTL> REGISTER {object_name} [-t service_type]  
[-d[(DESCRIPTION=](ADDRESS=...)[(CONNECT_DATA=(SERVICE_NAME|SID=service_
name|SID))][)] [-h host] [-l listener_name]

Arguments

{object_name}: Specify the object name.

[-t service_type]: Specify the service type of the object:

[-d]: Specify the protocol address of the listener or Oracle Names server object, or complete connect descriptor of the database object, net service name, alias, or global database link.

See Also:

Chapter 5, "Protocol Address Configuration" for further information about protocol addresses and parameters

[-h host]: Specify the host name that the object resides on.

[-l listener_name]: Specify the name of the listener object.

The service type, address description, host, and listener name options are not necessary to make the registration process appear to work. However, they are necessary to make the registration useful. In other words, an object name registered without an address cannot be used.

See Also:

Chapter 5, "Protocol Address Configuration" for further information about protocol addresses and parameters


Note:

The protocol address cannot contain any spaces.


Usage Notes

This command provides a mechanism for registering a service, its type, its hostname, and its address. Both the type of service and the data can be any valid string, but the typical registration has either ORACLE_DATABASE or ORACLE_LISTENER as type of service, and the address as the data.

The object registration is propagated to all other Oracle Names servers in the region.

If the sqlnet.ora file is configured with the parameter NAMES.DEFAULT_DOMAIN to set the same domain name as the database domain, then the database name does not need to be qualified with the domain.

Example

The following example shows the registration of database service sales.us.acme.com.

NAMESCTL> REGISTER sales   -t oracle_database -d (DESCRIPTION=(ADDRESS= 
(PROTOCOL=TCP)(HOST=sales-server)(PORT=1575)) (CONNECT_DATA=(SERVICE_
NAME=sales.us.acme.com)))


REGISTER_NS

Purpose

Use the REGISTER_NS command to define an Oracle Names server and its authoritative domain.

Prerequisites

None

Password required if one has been set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl REGISTER_NS {onames_server}{(ADDRESS=...)}{domain}

From Oracle Names Control utility:

NAMESCTL> REGISTER_NS {onames_server}{(ADDRESS=...)}{domain}

Arguments

{onames_server}: Specify the Oracle Names server name.

{(ADDRESS=...)}: Specify the Oracle Names server protocol address.

{domain}: Specify the domain name.

Usage Notes

This command provides a mechanism for registering an Oracle Names server as an authoritative server for a given domain. The command adds a network session record type, NS.SMD, for the Oracle Names server to the domain, and provides the Oracle Names server with an address record, A.SMD.

This command will fail if either the domain exists and has non-NS records or the Oracle Names server exists and has a type of service record that is other than 'ORACLE_NAMESERVER'.

Ordinarily, the Oracle Names servers maintain their own data by registering themselves when they start. This command is provided as a manual way to manage domain and Oracle Names server data if for some reason the Oracle Names server cannot. This may occur if the region database tables are set up as read-only for security reasons.

If the Oracle Names servers are not registering themselves, then use this command to define the region topology data. Each Oracle Names server in the region should be defined using this command for each top-level domain in the region. Usually, the top level consists of a single parent domain, for example, acme.com. However, a region may also have multiple sibling parent domains, for example, a region covering North America would have US, CA, and MX as its top-level parent domains.

Note the regions which were defined using the Oracle Network Manager in SQL*Net version 2 have NS.SMD records defined for every domain in the administrative region, but in Oracle Net only the top-level parent domains need to have ns.smd records defined for each server in the region.

Use the Oracle Names Control utility DELEGATE DOMAIN command to define Oracle Names servers which are delegation points for subregions.

Use the NAMES.DOMAIN_HINTS parameter in the names.ora file to provide data about any other Oracle Names servers in foreign regions.

Example

NAMESCTL> REGISTER_NS  namesrv1 
(ADDRESS=(PROTOCOL=tcp)(HOST=namesvr1)(PORT=1575))
Total response time:   7 minutes 59.14 seconds
Response status:       normal, successful completion

RELOAD

Purpose

Use the command RELOAD to force the Oracle Names server to check immediately for data changes in its administrative region. If there are any changes, then the Oracle Names server reloads all database service names, net service names, global database links, and aliases.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue then the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl RELOAD [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> RELOAD [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then only the current Oracle Names server is reloaded.

Usage Notes

All Oracle Names servers load their data directly from the database specified by the NAMES.ADMIN_REGION parameter in the names.ora file.

In an environment with multiple regions, RELOAD affects only the data for the current administrative region. All foreign data in the cache is unchanged.

Example

NAMESCTL> RELOAD
Server reloaded.

REORDER_NS

Purpose

Use the command REORDER_NS to create the file that lists local Oracle Names servers and their protocol addresses.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl REORDER_NS [(ADDRESS=...)] 

From the Oracle Names Control utility:

NAMESCTL> REORDER_NS [(ADDRESS=...)]
See Also:

Chapter 5, "Protocol Address Configuration" for further information about protocol addresses and parameters

Arguments

[(ADDRESS=...)]: Specify an optional Oracle Names server address to be used as the initial Oracle Names server to contact.

Usage Notes

This command generates the file which defines Oracle Names server names and addresses to enable clients to contact Oracle Names servers for name lookup.

The REORDER_NS command performs the following tasks:

  1. Searches for the first Oracle Names server in the following order:
    1. A preferred Oracle Names server configured in the sqlnet.ora file with the NAMES.PREFERRED_SERVERS parameter
    2. A well-known Oracle Names server
    3. A local Oracle Names server configured with TCP/IP on port 1575
  2. Sends a query for all the Oracle Names servers in the local region
  3. Sends a ping to each of these Oracle Names servers
  4. Sorts the list of Oracle Names servers by increasing order of response time
  5. Writes an Oracle Names server list with the sorted list of names and addresses

Example

NAMESCTL> REORDER_NS (ADDRESS=(PROTOCOL=tcp)(HOST=namesrv-server)(PORT=1575))


REPEAT

Purpose

Use the command REPEAT to perform QUERY, REGISTER, TIMED_QUERY, or UNREGISTER multiple times to compute average return rates.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system prompt:

namesctl REPEAT {number} QUERY|REGISTER|TIMED_QUERY|UNREGISTER [record_type]

From the Oracle Names Control utility:

NAMESCTL> REPEAT {number} QUERY [record_type]

Arguments

{number}: Specify an integer

[record_type]: Specify one of the following record types:

Usage Notes

This command is useful for understanding the average response time over a number of requests.

Do not specify too large a number here; while the number of iterations are occurring, the Oracle Names Control utility cannot perform any other operation.

Example

NAMESCTL> REPEAT 10 QUERY manatee a.smd
Number of requests: 10
Average response time: 0.01 seconds
Minimum response time: 0.01 seconds
Maximum response time:0.04 seconds
Total response time:0.14 seconds
Response status:normal, successful completion
Authoritative answer:yes
Number of answers: 1
TTL: 1 day
Answers:
    data type is "a.smd"
        Syntax is ADDR:(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(Host=salmon)
(Port=1522))(CONNECT_DATA=(SID=otter)))

RESET_STATS

Purpose

Use the command RESET_STATS to reset the Oracle Names server statistics to the original values of the Oracle Names server at startup.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl RESET_STATS [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> RESET_STATS [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then only the current statistics for the Oracle Names server are reset.

Example

NAMESCTL> RESET_STATS
Confirm [yes or no]: yes
Server statistics reset.

RESTART

Purpose

Use the command RESTART to initiate a reset of an Oracle Names server to its original state at startup.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system prompt:

namesctl RESTART [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> RESTART [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then only the current Oracle Names server is restarted.

Usage Notes

RESTART is the same as STARTUP, except that you use it when the Oracle Names server is already running.

Data is reloaded, statistics are reset, and all foreign data is flushed. Valid foreign cache data, that is, data with a TTL greater than 0, is retrieved from the checkpoint files.

Example

NAMESCTL> RESTART
Confirm [yes or no]: yes
Server restarted.


SAVE_CONFIG

Purpose

Use the SAVE_CONFIG command to compare the current configuration state of the Oracle Names server, including trace level, trace file, trace directory, and logging to the names.ora file. Any changes are stored in names.ora, preserving formatting, comments, and case as much as possible.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

lsnrctl SAVE_CONFIG

From the Oracle Names Control utility:

LSNRCTL> SAVE_CONFIG

Arguments

None

Example

NAMESCTL> SAVE_CONFIG  
Server saving the config file now

SET

Purpose

Use the SET command to alter the parameter values for the Oracle Names server. These changes remain in effect until the Oracle Names is stopped. To make the changes permanent, use the SAVE_CONFIG, SET SAVE_CONFIG_ON_STOP, or SET SAVE_CONFIG_INTERVAL commands to save changes to the names.ora file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

NAMESCTL SET [parameter]

From the Oracle Names Control utility:

namesctl> SET [parameter]

Arguments

[parameter]: Specify a SET parameter to modify its configuration setting. Parameters are shown in the example output.

When you enter SET without an argument, the Oracle Names Control utility displays a list of all the parameters.

Example

NAMESCTL> SET
The following operations are available after set
An asterisk (*) denotes a modifier or extended command:
cache_checkpoint_interval
default_domain
forwarding_available
log_file_name
log_stats_interval
NAMESCTL_trace_level
password
requests_enabled
reset_stats_interval
save_config_interval
save_config_on_stop
server
trace_file_name
trace_level

SET CACHE_CHECKPOINT_INTERVAL

Purpose

Use the command SET CACHE_CHECKPOINT_INTERVAL to specify the time, in seconds, of how often to save all collected information about remote regions to the local cache file. By default, the cache checkpoint file name is ckpcch.ora.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SET CACHE_CHECKPOINT_INTERVAL [time]

From the Oracle Names Control utility:

NAMESCTL> SET CACHE_CHECKPOINT_INTERVAL [time]

Arguments

{time}: Specify the number of seconds.

For example, to increase the interval to 36 hours, set the following:

NAMESCTL> SET CACHE_CHECKPOINT_INTERVAL 129600

Usage Notes

Minimum Value: 10

Maximum Value: 259200 (3 days)

Default Value: 0 (disabled)

Example

NAMESCTL> SET CACHE_CHECKPOINT_INTERVAL 12


SET DEFAULT_DOMAIN

Purpose

Use the command SET DEFAULT_DOMAIN to set the domain from which the Oracle Names Control utility most often looks up names resolution requests. The domain set is used for the duration of the session, ignoring the NAMES.DEFAULT_DOMAIN parameter configured in the sqlnet.ora file.

Prerequisites

The Oracle Names Control utility must be loaded.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the Oracle Names Control utility:

NAMESCTL> SET DEFAULT_DOMAIN [domain_name]

Arguments

{domain}: Specify the domain name. The root domain is the default domain.

Usage Notes

When a default domain is set, it is automatically appended to any unqualified net service name or service name. For example, if the default domain is set to us.acme.com, the global name sales.us.acme.com can be queried using:

NAMESCTL> QUERY sales

Example

NAMESCTL> SET DEFAULT_DOMAIN us.acme.com
Default domain is now "US.ACME.COM"

SET FORWARDING_AVAILABLE

Purpose

Use the command SET FORWARDING_AVAILABLE to set forwarding to remote Oracle Names servers for client name requests.

Prerequisites

Oracle Names server must be running.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET FORWARDING_AVAILABLE [yes | no] [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> SET FORWARDING_AVAILABLE [yes | no] [onames_server] [...]

Arguments

[yes | no]: Specify yes or on to set forwarding on. Specify no or off (default) to set forwarding off.

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current Oracle Names server.

Usage Notes

This command is intended for Oracle Names servers that have no local clients and are exclusively handling requests from remote Oracle Names servers. This usually would apply only to Oracle Names servers in the root region when the root is configured without clients or services. If such an Oracle Names server is a performance bottleneck in cross-region request processing, then disabling forwarding in that Oracle Names server can reduce its workload in half. Rather than forward the request and return the answer, the Oracle Names server simply tells the requestor the address of the Oracle Names server that can answer the request. Note that there is no overall reduction in work; the work is simply displaced from the non-forwarding Oracle Names server to the requesting Oracle Names server.


Caution:

If SET FORWARDING_AVAILABLE is set to off or no, any clients that rely directly on that Oracle Names server will be unable to resolve remote names. Clients are not capable of redirecting their requests as Oracle Names servers are. Their requests will fail at that point, even if other Oracle Names servers are listed in the NAMES.PREFERRED_SERVERS parameter in the sqlnet.ora file.


Example

NAMESCTL> SET FORWARDING_AVAILABLE off 
Request processing is now disabled. 

SET LOG_FILE_NAME

Purpose

Use the command SET LOG_FILE_NAME to set the name for the Oracle Names server log file. By default, the log file name is names.log.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET LOG_FILE_NAME [file_name]

From the Oracle Names Control utility:

NAMESCTL> SET LOG_FILE_NAME [file_name]

Arguments

{file_name}: Specify file name of the Oracle Names trace. The default file name is names.log.

Usage Notes

The LOG_FILE_NAME changes the destination of all logging messages.

Example

NAMESCTL> SET LOG_FILE_NAME namesvr1


SET LOG_STATS_INTERVAL

Purpose

Use the command SET LOG_STATS_INTERVAL to change the frequency at which the statistics are logged to the log file. By default, the log file name is names.log.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET LOG_STATS_INTERVAL [time]

From the Oracle Names Control utility:

NAMESCTL> SET LOG_STATS_INTERVAL [time]

Arguments

{time}: Specify the time in seconds or in [n day[s]] [hh:mm:ss]. For example, to increase the LOG_STATS_INTERVAL to 36 hours, both of the following can be set:

set log_stats_interval 129600
set log_stats_interval 1 day 12:00:00

You can specify any valid combination, such as the number of days combined with number of hours, minutes, and seconds, or just the number in hours.

Restrictions

Minimum Value: 10

Maximum Value: None

Special Value: 0 (never reset)

Default value: 0 (no logging)

Usage Notes

The LOG_STATS_INTERVAL value is initially set based on the value configured in NAMES.LOG_STATS_INTERVAL parameter in the sqlnet.ora file when the Oracle Names server is loaded. By default, the value is 0 (no logging). This command is intended to override that value during server operation.

Example

NAMESCTL> SET LOG_STATS_INTERVAL 7200
Statistic counter logging interval is now 2 hours

SET NAMESCTL_TRACE_LEVEL

Purpose

Use the command SET NAMESCTL_TRACE_LEVEL to set the level at which the Oracle Names Control utility can be traced.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET NAMESCTL_TRACE_LEVEL {level}

From the Oracle Names Control utility:

NAMESCTL> SET NAMESCTL_TRACE_LEVEL {level}

Arguments

{level}: Specify one of the following trace levels:

Usage Notes

Tracing assists in diagnosing unexpected or unidentifiable failures in processing the Oracle Names Control utility. Tracing writes a series of events from normal Oracle Names Control utility processing to an operating system file for review by the administrator.

When no level is specified, the setting is reset to the level specified by the NAMESCTL.TRACE_LEVEL parameter in the sqlnet.ora file.

Example

NAMESCTL> SET NAMESCTL_TRACE_LEVEL admin
Controller's local trace level changed from 0 to 4


SET PASSWORD

Purpose

Use the command SET PASSWORD to set the password for privileged Oracle Names Control utility commands, such as STOP, RESTART, and RELOAD.

The password entered should match the one set for the NAMES.PASSWORD parameter in the names.ora file.

Prerequisites

The Oracle Names Control utility must be loaded.

Password Required If One Has Been Set

Not applicable

Syntax

From the Oracle Names Control utility:

NAMESCTL> SET PASSWORD [password]

Arguments

{password}: Specify the password.

Usage Notes

You can enter this command when you start up the Oracle Names Control utility or at any time during the session as needed.

When passed over the network, the password is always encrypted, regardless of how it is set.

See Also:

"Oracle Names Server Security"

Example

NAMESCTL> SET PASSWORD open_sesame

NAMESCTL> SET PASSWORD
enter name server password: onames9i


SET REQUESTS_ENABLED

Purpose

Use the command SET REQUESTS_ENABLED to determine whether the current Oracle Names server will respond to requests.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET REQUESTS_ENABLED [on | off]

From the Oracle Names Control utility:

NAMESCTL> SET REQUESTS_ENABLED [on | off]

Arguments

[on] (default): Specify to have the Oracle Names server respond to requests.

[off]: Specify to send refusals to all clients that approach with names resolution requests. This is primarily useful for diagnostics when an Oracle Names server is functioning unexpectedly.

Example

NAMESCTL> SET REQUESTS_ENABLED OFF
Confirm [yes or no]: yes
General request processing is now disabled

SET RESET_STATS_INTERVAL

Purpose

Use the command SET RESET_STATS_INTERVAL to change the time between the statistics being reset to 0 or initial values in the current Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET RESET_STATS_INTERVAL [time]

From the Oracle Names Control utility:

NAMESCTL> SET RESET_STATS_INTERVAL [time]

Arguments

{time}: Specify the time in seconds or in [n day[s]] [hh:mm:ss]. For example, to increase the RESET_STATS_INTERVAL to 72 hours, the following can be set:

SET RESET_STATS_INTERVAL 259200
SET RESET_STATS_INTERVAL 3 days

Minimum Value: 10 seconds

Maximum Value: no maximum

Default value: 0 (never reset)

Usage Notes

The RESET_STATS_INTERVAL value is initially set based on the NAMES.RESET_STATS_INTERVAL parameter in the names.ora file. This command is intended to override that value during Oracle Names server operation.

Example

NAMESCTL> SET RESET_STATS_INTERVAL 1 day
Statistic counter reset interval is now 24 hours

SET SAVE_CONFIG_INTERVAL

Purpose

Use the command SET SAVE_CONFIG_INTERVAL to save any changes made by SET commands to the names.ora at an interval.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET SAVE_CONFIG_INTERVAL [time]

From the Oracle Names Control utility:

NAMESCTL> SET SAVE_CONFIG_INTERVAL [time]

Arguments

{time}: Specify the time in seconds.

Example

NAMESCTL> SET SAVE_CONFIG_INTERVAL 10
Scheduled configuration save to occur in 3 minutes

SET SAVE_CONFIG_ON_STOP

Purpose

Use the command SET SAVE_CONFIG_ON_STOP to specify whether or not changes made to the parameter values for the Oracle Names server by the SET commands are to be saved to the names.ora file at the time the Oracle Names server is stopped with the SHUTDOWN or STOP commands.

When changes are saved, the Oracle Names Control utility tries to preserve formatting, comments, and letter case.

To have all parameters saved right away, use the SAVE_CONFIG command.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET SAVE_CONFIG_ON_STOP [on | off]

From the Oracle Names Control utility:

NAMESCTL> SET SAVE_CONFIG_ON_STOP [on | off]

Arguments

[on]: Specify to save configuration to names.ora.

[off] (default): Specify to not save configuration to names.ora.

Example

NAMESCTL> SET SAVE_CONFIG_ON_STOP on


SET SERVER

Purpose

Use the command SET SERVER to set Oracle Names server for the Oracle Names Control utility to administer.

Prerequisites

The Oracle Names Control utility must be loaded

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the Oracle Names Control utility:

NAMESCTL> SET SERVER [onames_server | (ADDRESS=(protocol_address_information))]
See Also:

Chapter 5, "Protocol Address Configuration" for further information about protocol addresses and parameters

Arguments

[onames_server | (ADDRESS=(protocol_address_information))]: Specify a valid Oracle Names server or Oracle Names server address.

If you specify no argument, this command defaults to the values set by the NAMES.PREFERRED_SERVERS parameter in the sqlnet.ora file.

Usage Notes

SET SERVER enables switching between multiple Oracle Names servers while running the Oracle Names Control utility. The qualifier can be a name where the name is defined in the memory of the current Oracle Names server, or it can be the TNS address of any Oracle Names server.

The Oracle Names server name specified is resolved through normal name lookup. Another Oracle Names server can be set only if the current Oracle Names server knows or can retrieve its address. If no current Oracle Names server is set, you must enter an address to complete this command.

Example

NAMESCTL> SET SERVER server1.us.acme


SET TRACE_FILE_NAME

Purpose

Use the command SET TRACE_FILE_NAME to set the name of the Oracle Names server trace file. By default, the trace file name is names.trc.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SET TRACE_FILE_NAME [file_name]

From the Oracle Names Control utility:

NAMESCTL> SET TRACE_FILE_NAME [file_name]

Arguments

{file_name}: Specify the file name of the Oracle Names trace.

Example

NAMESCTL> SET TRACE_FILE_NAME namesvr1


SET TRACE_LEVEL

Purpose

Use the command SET TRACE_LEVEL to set a specific level of tracing for the Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SET TRACE_LEVEL {level}

From the Oracle Names Control utility:

NAMESCTL> SET TRACE_LEVEL {level}

Arguments

{level}: Specify one of the following trace levels:

Usage Notes

Tracing assists in diagnosing unexpected or unidentifiable failures in processing the current Oracle Names server. It writes a series of events from normal Oracle Names server processing to an operating system file for review by the administrator.

After the TRACE_LEVEL is set, tracing begins immediately. All operations are traced until it is reset to trace level off.

Trace files can grow very large. Remember to turn trace level off after diagnosing the problem.

Example

NAMESCTL> SET TRACE_LEVEL admin
Trace level is now 6. 

SHOW

Purpose

Use the command SHOW to view the parameter values for the Oracle Names server.

All of the SET commands listed except SET PASSWORD have equivalent SHOW commands.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW 
namesctl SHOW [command]

From the Oracle Names Control utility:

NAMESCTL> SHOW
NAMESCTL> SHOW [command]

Arguments

[parameter]: Specify a SHOW parameter to view its configuration setting. Parameters are shown in the example output.

When you enter SET without an argument, the Oracle Names Control utility displays a list of all the parameters.

Example

NAMESCTL> SHOW
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
cache_checkpoint_interval
default_domain
forwarding_available
log_file_name
log_stats_interval
NAMESCTL_trace_level
requests_enabled
reset_stats_interval
save_config_interval
save_config_on_stop
server
status
system_queries
trace_file_name
trace_level
version

SHOW CACHE_CHECKPOINT_INTERVAL

Purpose

Use the command SHOW CACHE_CHECKPOINT_INTERVAL to show the frequency at which the Oracle Names server cache is written to the cache checkpoint file. By default, the cache checkpoint file name is ckpcch.ora.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW CACHE_CHECKPOINT_INTERVAL

From the Oracle Names Control utility

NAMESCTL> SHOW CACHE_CHECKPOINT_INTERVAL

Arguments

None

Usage Notes

The interval is initially set with the value in NAMES.CACHE_CHECKPOINT_INTERVAL parameter in the names.ora file. By default, the value is 0, which disables cache checkpointing. Data written to the cache checkpoint file includes net service names, protocol addresses, and Oracle Names server addresses that were learned by the Oracle Names server as a result of forwarding a query to a foreign region on behalf of the client.

Example

NAMESCTL> SHOW CACHE_CHECKPOINT_INTERVAL
Cache checkpoint interval is currently 8 minutes 20 seconds

SHOW DEFAULT_DOMAIN

Purpose

Use the command SHOW DEFAULT_DOMAIN to show the domain set by the SET DEFAULT_DOMAIN command or the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW DEFAULT_DOMAIN

From the Oracle Names Control utility:

NAMESCTL> SHOW DEFAULT_DOMAIN

Arguments

None

Usage Notes

When a default domain is set, it is automatically appended to any unqualified net service name or service name. For example, if the default domain is set to us.acme.com, the global name sales.us.acme.com can be queried using the following syntax:

NAMESCTL> QUERY sales

Example

NAMESCTL> SHOW DEFAULT_DOMAIN
Current default domain is "com"

SHOW FORWARDING_AVAILABLE

Purpose

Use the command SHOW FORWARDING_AVAILABLE to show whether the Oracle Names server is forwarding client requests to remote Oracle Names servers.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW FORWARDING_AVAILABLE [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> SHOW FORWARDING_AVAILABLE [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current Oracle Names server.

Usage Notes

By default, all Oracle Names servers forward requests to remote Oracle Names servers. If forwarding is disabled, then requests to remote Oracle Names server are redirected to an Oracle Names server in the region that is authoritative to the requested name.

Disabling forwarding can reduce the load on a particular Oracle Names server, but makes it impossible to direct clients to remote Oracle Names servers.

Use the SET FORWARDING_AVAILABLE command to turn forwarding on or off.

Example

NAMESCTL> SHOW FORWARDING_AVAILABLE
Request forwarding is currently enabled



SHOW LOG_FILE_NAME

Purpose

Use the command SHOW LOG_FILE_NAME to show the name of the file where the Oracle Names server writes logging information.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW LOG_FILE_NAME

From the Oracle Names Control utility:

NAMESCTL> SHOW LOG_FILE_NAME

Arguments

None

Usage Notes

The log file name is initially set with the value of the NAMES.LOG_FILE parameter in the names.ora file. By default, the log file name is names.log.

Example

NAMESCTL> SHOW LOG_FILE_NAME
Log file name is currently 
/oracle9i/network/log/names.log


SHOW LOG_STATS_INTERVAL

Purpose

Use the command SHOW LOG_STATS_INTERVAL to display the frequency at which statistics are logged to the log file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW [onames_server] [...] LOG_STATS_INTERVAL

From the Oracle Names Control utility:

NAMESCTL> SHOW [onames_server] [...] LOG_STATS_INTERVAL

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current server.

Usage Notes

The interval is initially set with the value of the NAMES.LOG_STATS_INTERVAL parameter in the names.ora file. By default, the value is 0, or no logging.

Example

NAMESCTL> SHOW LOG_STATS_INTERVAL
Statistic counter logging is currently disabled

SHOW NAMESCTL_TRACE_LEVEL

Purpose

Use the command SHOW NAMESCTL_TRACE_LEVEL to display the level at which the Oracle Names Control utility is being traced.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW NAMESCTL_TRACE_LEVEL

From the Oracle Names Control utility:

NAMESCTL> SHOW NAMESCTL_TRACE_LEVEL

Arguments

None

Usage Notes

Tracing assists in diagnosing unexpected or unidentifiable failures in processing the Oracle Names Control utility. Tracing writes a series of events from normal Oracle Names Control utility processing to an operating system file for review by the administrator.

Tracing output is at four levels

Example

NAMESCTL> SHOW NAMESCTL_TRACE_LEVEL
Controller's trace level is currently 0

SHOW REQUESTS_ENABLED

Purpose

Use the command SHOW REQUESTS_ENABLED to show whether the Oracle Names server is responding to requests.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW REQUESTS_ENABLED [onames_server] [...] 

From the Oracle Names Control utility:

NAMESCTL> SHOW REQUESTS_ENABLED [onames_server] [...] 

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current server.

Usage Notes

If requests are disabled, all requests to the Oracle Names server will be refused.

Example

NAMESCTL> SHOW REQUESTS_ENABLED
General request processing is currently enabled

SHOW RESETS_STATS_INTERVAL

Purpose

Use the command SHOW RESETS_STATS_INTERVAL to display the interval set for dumping statistics to the log file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW RESET_STATS_INTERVAL

From the Oracle Names Control utility:

NAMESCTL> SHOW RESET_STATS_INTERVAL

Arguments

None

Usage Notes

The interval is initially set with the value of the NAMES.RESET_STATS_INTERVAL parameter in the names.ora file. By default the value is set to 0, or no reset.

For example, if statistics are reset every day, then the statistics will represent totals for the day rather than the entire time the Oracle Names server has been running.

Example

NAMESCTL> SHOW RESET_STATS_INTERVAL
Statistic counter reset interval is currently 5 minutes

SHOW SAVE_CONFIG_INTERVAL

Purpose

Use the command SHOW SAVE_CONFIG_INTERVAL to display the interval of when the SET command is scheduled to save to the names.ora file.

Prerequisites

The command only displays an interval if the SET SAVE_CONFIG_INTERVAL command was set.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW SAVE_CONFIG_INTERVAL

From the Oracle Names Control utility:

NAMESCTL> SHOW SAVE_CONFIG_INTERVAL

Arguments

None

Example

NAMESCTL> SHOW SAVE_CONFIG_INTERVAL
Configuration will be saved in 1 minute 35 seconds

SHOW SAVE_CONFIG_ON_STOP

Purpose

Use the command SHOW SAVE_CONFIG_ON_STOP to show whether SET commands changes are scheduled to be saved to the names.ora file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW SAVE_CONFIG_ON_STOP

From the Oracle Names Control utility:

NAMESCTL> SHOW SAVE_CONFIG_ON_STOP

Arguments

None

Example

NAMESCTL> SHOW SAVE_CONFIG_ON_STOP
Save_config_on_stop is currently ON

SHOW SERVER

Purpose

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW SERVER

From the Oracle Names Control utility:

NAMESCTL> SHOW SERVER

Arguments

None

Usage Notes

SHOW SERVER displays the current Oracle Names server that commands will operate on.

Example

NAMESCTL> SHOW SERVER
currently managing name server "NameServer.us.acme.com
Version banner is "Oracle Names for SunOS: Version 9.2.0.2.0" 

SHOW STATUS

Purpose

Use the command SHOW STATUS to display general status information about the Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW STATUS [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> SHOW STATUS [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current server.

Usage Notes

This command is identical to the STATUS command.

Example

NAMESCTL> SHOW STATUS
Version Banner is "Oracle Names for SunOS: Version 9.2.0.2.0" Server has been 
running for:1 day 2 hours 3 minutes 35.16 seconds....

SHOW SYSTEM_QUERIES

Purpose

Use the command SHOW SYSTEM_QUERIES to display the next occurrence of all system queries.

Prerequisites

This is relevant only for distributed configurations. There are no system queries with only one administrative region.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW SYSTEM_QUERIES

From the Oracle Names Control utility:

NAMESCTL> SHOW SYSTEM_QUERIES

Arguments

None

Usage Notes

System queries are performed at intervals to keep information among Oracle Names servers current.

There is no specific action that can change the activities listed as system queries. Being able to show them gives the administrator an understanding of when a system change will occur, and can assist in a decision to RESTART.

Example

NAMESCTL> SHOW SYSTEM_QUERIES
System query index number:1
Query ID:49824
Query next issued in:2 hours 55 min 3.84 seconds
Query state:2
Name:""
Desired data type:ns.smd


SHOW TRACE_FILE_NAME

Purpose

Use the command SHOW TRACE_FILE_NAME to display the directory path and file name of the current Oracle Names server trace file.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW TRACE_FILE_NAME

From the Oracle Names Control utility:

NAMESCTL> SHOW TRACE_FILE_NAME

Arguments

None

Usage Notes

The trace file name is initially set with the value of the NAMES.TRACE_FILE parameter in the names.ora file. The default value is names.trc.

Example

NAMESCTL> SHOW TRACE_FILE_NAME
Trace file name is currently 
/oracle9i/network/names.trc

SHOW TRACE_LEVEL

Purpose

Use the command SHOW TRACE_LEVEL to display the level of tracing for the current Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW TRACE_LEVEL

From the Oracle Names Control utility:

NAMESCTL> SHOW TRACE_LEVEL

Arguments

None

Usage Notes

Tracing assists in diagnosing unexpected or unidentifiable failures in processing the current Oracle Names server. Tracing writes a series of events from normal Oracle Names server processing to an operating system file for review by the administrator.

Tracing is available at the following levels:

Example

NAMESCTL> SHOW TRACE_LEVEL
Trace level is currently 0

SHOW VERSION

Purpose

Use the command SHOW VERSION to display the current version and name of the Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl SHOW VERSION [onames_server] [...] VERSION

From the Oracle Names Control utility:

NAMESCTL> SHOW VERSION [onames_server] [...] VERSION

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current server.

Usage Notes

This command identifies the Oracle Names server by name and version, which can be useful when clearing up minor difficulties. This command is enabled every time you connect Oracle Names Control utility to an Oracle Names server.

Example

NAMESCTL> SHOW VERSION
Currently managing Oracle Names server "NameServer.com"
Version banner is "Oracle Names for SunOS: Version 9.2.0.2.0"

SHUTDOWN

Purpose

Use the command SHUTDOWN to stop one or more Oracle Names servers.

Prerequisites

The Oracle Names server(s) must be started.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl SHUTDOWN [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> SHUTDOWN [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. When no arguments are supplied, only the current Oracle Names server is shut down.

Usage Notes

SHUTDOWN stops the current Oracle Names server and unloads the program from memory. An Oracle Names server should be shut down only for operational reasons like upgrades or computer maintenance. The preferred way to stop and start an Oracle Names server is using the RESTART command because you can perform it from anywhere in the network. If SHUTDOWN and START are processed individually, then they must occur on the Oracle Names server computer.

This command is identical to the STOP command.

Example

NAMESCTL> SHUTDOWN
Confirm [yes or no] yes
Server shut down.

START

Purpose

Use the command START to load the Oracle Names server and start loading system and local administrative region data.

Prerequisites

Oracle Names server must be stopped.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl START 
 

From the Oracle Names Control utility:

NAMESCTL> START

Arguments

None

Usage Notes

START is the command to initially load an Oracle Names server into memory. At startup, the Oracle Names server reads its configuration files to set up its operating parameters, and then loads all data for the administrative region.

Security on Oracle Names server startup is supplied through the operating system that Oracle Names is installed on. Because an Oracle Names server must be started from a local session, network security is not an issue.

This command is identical to the STARTUP command.

Example

NAMESCTL> START
Starting "/private/dsteiner/sales/bin/names"...server successfully started

Currently managing name server "namesrv1.us.acme.com"
Version banner is "Oracle Names for Solaris: Version 9.2.0.2.0"

Server name:                              namesrv1.us.acme.com
Server has been running for:              0.16 seconds
Request processing enabled:               yes
Request forwarding enabled:               yes
Requests received:                        0
Requests forwarded:                       0
Foreign data items cached:                0
Region data next checked for reload in:   not set
Region data reload check failures:        0
Cache next checkpointed in:               not set
Cache checkpoint interval:                not set
Cache checkpoint file name:               
/private/dsteiner/sales/network/names/ckpcch.ora
Statistic counters next reset in:         not set
Statistic counter reset interval:         not set
Statistic counters next logged in:        not set
Statistic counter logging interval:       not set
Trace level:                              0
Trace file name:                          
/private/dsteiner/sales/network/trace/names_10841.trc
Log file name:                            
/private/dsteiner/sales/network/log/names.log
System parameter file name:               
/private/dsteiner/sales/network/admin/names.ora
Command-line parameter file name:         ""
Administrative region name:               ""
Administrative region description:        ""
ApplTable Index:                          0
Contact                                   ""
Operational Status                        0
Save Config on Stop                       yes

START_CLIENT_CACHE

Purpose

Use the command START_CLIENT_CACHE to start the client cache process. The client cache process finds a list of the local Oracle Names servers in a static list of preferred Oracle Names servers in the sqlnet.ora file or in the discovery list file (.sdns.ora or sdns.ora) the first time it runs. Afterwards, it relies on its cache checkpoint file. Once the client cache has contact with the local region server(s), it begins to cache data on all local servers, various foreign servers, and all the data it has been asked to find.

See Also:

Oracle9i Net Services Administrator's Guide for more information about the usage of this command

Prerequisites

The client cache process must be stopped.

An Oracle Names server list must exist before you run the client cache process.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl START_CLIENT_CACHE 

From the Oracle Names Control utility:

NAMESCTL> START_CLIENT_CACHE

Arguments

None

Usage Notes

Once started, the client cache daemon process stores all information received from an Oracle Names server, making lookups faster.

Example

NAMESCTL> START_CLIENT_CACHE
Starting ".../onrsd"...server successfully started

STARTUP

Purpose

Use the command STARTUP to load the Oracle Names server and start loading system and local administrative region data.

Prerequisites

Oracle Names server must be stopped.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl STARTUP 

From the Oracle Names Control utility:

NAMESCTL> STARTUP 

Arguments

None

Usage Notes

This command is identical to the START command.

Example

See example for START.


STATUS

Purpose

The command STATUS display statistics for one or more Oracle Names servers.

Prerequisites

Oracle Names server must be started.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl STATUS [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> STATUS [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. When no arguments are supplied, status is given only for the current Oracle Names server.

Usage Notes

STATUS shows the activity of the Oracle Names server over time and its state at a point in time.

Example

NAMESCTL> STATUS
Version banner is "Oracle Names for SunOS: 
9.2.0.2.0"
Server name:NSERVER.com
Server has been running for:1 day 20 hours ........

STOP

Purpose

Use the command STOP to stop one or more Oracle Names servers.

Prerequisites

Oracle Names server must be started.

Password Required If One Has Been Set

Yes. If a password is set, then issue the SET PASSWORD command prior to this command.

Syntax

From the operating system:

namesctl STOP  [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> STOP  [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. When no arguments are supplied, only the current Oracle Names server is stopped.

Usage Notes

STOP stops the current Oracle Names server and unloads the program from memory. An Oracle Names server should be shut down only for operational reasons like upgrades or computer maintenance. The preferred way to stop and start an Oracle Names server is using the RESTART command because you can issue it from anywhere in the network. If STOP and START are processed individually, they must occur on the Oracle Names server computer.

This command is identical to the SHUTDOWN command.

Example

NAMESCTL> STOP
Confirm [yes or no]: yes
Server shut down

TIMED_QUERY

Purpose

Use the command TIMED_QUERY to show all data in the Oracle Names server cache.

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl TIMED_QUERY [timestamp] 

From the Oracle Names Control utility:

NAMESCTL> TIMED_QUERY [timestamp]  

Arguments

Time in seconds

Usage Notes

The first time you issue this command, do not use the [timestamp] argument. The output returned includes all the objects registered. At the end of returned output is a Last timestamp field that provides a time stamp.

After there has been an update of date, issue the command again. This time, pass the time stamp provided from the first output. The command displays the data updated since the last the command was issued.

Example

In the following output, TIMED_QUERY is issued for the first time:

NAMESCTL> TIMED_QUERY
Total response time:   0.26 seconds
Response status:       normal, successful completion
Number of answers:     7
Name:                  [root]
    data type is "ns.smd"
        Syntax is DOMAIN: namesrv1
Name:                  us.acme.com
    data type is "ns.smd"
        Syntax is DOMAIN: us.acme.com
Name:                  hr.us.acme.com
    data type is "a.smd"
        Syntax is ADDR: 
        ...(address=(protocol=tcp)(host=namesrv1-server)(port=1575))
Name:                  namesrv2
    data type is "a.smd"
        Syntax is ADDR: 
        ...(address=(protocol=tcp)(Port=1575)(host=namesrv3-server))
    data type is "tos.npd.omd"
        Syntax is CTEXT: "ORACLE_NAMESERVER"
    data type is "host.nm.omd"
        Syntax is TEXT: "namesrv3-server"
Last timestamp:        1072

Note that the Last timestamp is 1072.

In the following output, TIMED_QUERY is issued before new data is registered.

NAMESCTL> TIMED_QUERY 1072
Total response time:   0.19 seconds
Response status:       NNC-00408: name "1072" exists but desired data does not

In the following output, a new object is registered:

NAMESCTL> REGISTER sales   -t oracle_database -d (DESCRIPTION=(ADDRESS= 
(PROTOCOL=TCP)(HOST=sales-server)(PORT=1575)) (CONNECT_DATA=(SERVICE_
NAME=sales.us.acme.com)))
Total response time:   0.29 seconds
Response status:       normal, successful completion

When TIMED_QUERY is issued again, the newly registered data displays in the output:

NAMESCTL> TIMED_QUERY 1072
Total response time:   0.13 seconds
Response status:       normal, successful completion
Number of answers:     1
Name:                  sales
    data type is "a.smd"
        Syntax is ADDR:
        
...(description=(address=(protocol=tcp)(host=sales-server)(port=1575))(connect_
data=(service_name=sales.us.acme.com)
Last timestamp:        6107

UNREGISTER

Purpose

Use the command UNREGISTER to remove a network object from an Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system

namesctl UNREGISTER {object_name} [-t service_type]  
[-d[(DESCRIPTION=](ADDRESS=...)[(CONNECT_DATA=(SERVICE_NAME|SID=service_
name|SID))][)] [-h host] [-l listener_name]

From the Oracle Names Control utility:

NAMESCTL> UNREGISTER {object_name} [-t service_type]  
[-d[(DESCRIPTION=](ADDRESS=...)[(CONNECT_DATA=(SERVICE_NAME|SID=service_
name|SID))][)] [-h host] [-l listener_name]

Arguments

{object_name}: Specify the object name.

[-t service_type]: Specify the service type of the object:

ORACLE_DATABASE for an Oracle database

ORACLE_LISTENER for a listener

ORACLE_NAMESERVER for an Oracle Names server


Note:

To remove an Oracle Names server, use the UNREGISTER_NS command rather than the UNEGISTER command.


[-d]: Specify the protocol address of the listener or Oracle Names server object, or complete connect descriptor of the database object, net service name, alias, or global database link

See Also:

Chapter 5, "Protocol Address Configuration" for further information about protocol addresses and parameters

[-h host]: Specify the host name the object resides on.

[-l listener_name]: Specify the name of the listener object.

The service type, address description, host, and listener name options are not necessary to make the registration process appear to work. However, they are necessary to make the registration useful. In other words, an object name registered without an address cannot be used.


Note:

The protocol address cannot contain any spaces.


Usage Notes

This command provides a manual mechanism for unregistering a service. The definition for that object is removed from the Oracle Names servers in the region. If the object was registered with an address, listener name, or a host name, then the address, listener name, or host name must be provided on the command line in order to unregister the object.

Example

NAMESCTL> UNREGISTER sales -t oracle_database -d
(description=(address= (protocol=tcp)(host=sales-server)(port=1575))(connect_ data=(service_name=db3)))

UNREGISTER_NS

Purpose

Use the UNREGISTER_NS command to undefine an Oracle Names server and its authoritative domain.

Prerequisites

None

Password required if one has been set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl UNREGISTER_NS {onames_server}{domain}

From Oracle Names Control utility:

NAMESCTL> UNREGISTER_NS {onames_server}{domain}

Arguments

{onames_server}: Specify the Oracle Names server name. If the sqlnet.ora file parameter NAMES.DEFAULT_DOMAIN to set to the same domain name as the Oracle Names server domain, then the Oracle Name server does not need to be qualified with its domain.

{domain}: Specify the domain name.

Usage Notes

This command provides a mechanism for unregistering an Oracle Names server as an authoritative server for a given domain. This command removes the NS.SMD record for the Oracle Names from the domain, and deletes the Oracle Names server and its A.SMD address record.

This command will fail if either the domain exists and has non-NS records or the server exists and has a type of service record that is other than 'ORACLE_NAMESERVER'.

Ordinarily, Oracle Names servers maintain their own data by registering themselves when they start. This command is provided as a manual way to manage domain and Oracle Names server data if for some reason the Oracle Names server cannot. This can occur if the region database tables are set up as read-only for security reasons.

If the Oracle Names servers are not registering themselves, then this command should be used to define the region topology data. Each Oracle Names server in the region should be defined using this command for each top-level domain in the region. Usually, the top level consists of a single parent domain, for example, acme.com. However, a region may also have multiple sibling parent domains, for example, a region covering North America would have US, CA and MX as its top-level parent domains.

Note the regions which were defined using the Oracle Network Manager in SQL*Net version 2 have ns.smd records defined for every domain in the administrative region, but in Oracle Net only the top-level parent domains need to have NS.SMD records defined for each server in the region.

Example

NAMESCTL> UNREGISTER_NS  namesrv1.us.acme.com us.acme.com 
Total response time:   7 minutes 59.14 seconds
Response status:       normal, successful completion

VERSION

Purpose

Use the command VERSION to display the current version and name of the Oracle Names server.

Prerequisites

None

Password Required If One Has Been Set

No. If a password is set, then the SET PASSWORD command does not need to be issued prior to this command.

Syntax

From the operating system:

namesctl VERSION [onames_server] [...]

From the Oracle Names Control utility:

NAMESCTL> VERSION [onames_server] [...]

Arguments

[onames_server]: Specify zero or more Oracle Names servers separated by a space. If no names are supplied, then the setting is displayed for the current server.

Usage Notes

The output identifies the Oracle Names server by name and version, which can be useful when clearing up minor difficulties.

Example

NAMESCTL> VERSION
Currently managing Oracle Names server "NameServer.com"
Version banner is "Oracle Names for SunOS: Version 9.2.0.2.0"