Skip Headers

Oracle® Internet Directory Administrator's Guide
10g (9.0.4)

Part Number B12118-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to beginning of chapter Go to next page

Syntax for LDIF and Command-Line Tools, 3 of 10


Starting, Stopping, Restarting, and Monitoring Oracle Internet Directory Servers

This section tells how to use command-line tools for starting, stopping, restarting, and monitoring Oracle Internet Directory servers. It contains these topics:

The OID Monitor (oidmon) Syntax

Use the OID Monitor to initiate, monitor, and terminate directory server processes. If you elect to install a replication server, OID Monitor controls it. When you issue commands through OID Control Utility (OIDCTL) to start or stop directory server instances, your commands are interpreted by this process.

Starting the OID Monitor

Starting OID Monitor restarts any Oracle Internet Directory processes that were previously stopped.

To start the OID Monitor:

  1. Set the following environment variables:

    • ORACLE_HOME

    • ORACLE_SID or a proper TNS CONNECT string

    • NLS_LANG (APPROPRIATE_LANGUAGE.AL32UTF8). The default language set at installation is AMERICAN_AMERICA.

    • PATH. In the PATH environment variable, specify the Oracle LDAP binary--that is, ORACLE_HOME/bin--before the UNIX binary directory.

  2. At the system prompt, type:

    oidmon [connect=connect_string] [host=virtual/host_name][sleep=seconds] 
    start
    
    Table A-1  Arguments for Starting OID Monitor
    Argument Description

    connect=connect_string

    Specifies the connect string for the database to which you want to connect. This is the network service name set in the tnsnames.ora file. This argument is optional.

    host=virtual/host_name

    Specifies the virtual host or rack nodes on which to start OID Monitor

    sleep=seconds

    Specifies number of seconds after which the OID Monitor should check for new requests from OID Control and for requests to restart any servers that may have stopped. The default sleep time is 10 seconds. This argument is optional.

    start

    Starts the OID Monitor process

    For example:

    oidmon connect=dbs1 sleep=15 start
    
    

    To start OID Monitor on a virtual host:

    oidmon connect=dbsl host=virtual_host start
    

Stopping the OID Monitor

Stopping the OID Monitor also stops all other Oracle Internet Directory processes.

To stop the OID Monitor daemon, at the system prompt, type:

oidmon [connect=connect_string] [host=virtual/host_name] stop
Table A-2  Arguments for Stopping OID Monitor
Argument Description

connect=connect_string

Specifies the connect string for the database to which you want to connect. This is the connect string set in the tnsnames.ora file.

host=virtual/host name

Specifies the virtual host or rack nodes on which to start OID Monitor

stop

Stops the OID Monitor process

For example:

oidmon connect=dbs1 stop

Starting and Stopping OID Monitor in a Cold Failover Cluster Configuration

While starting and stopping OID Monitor, use the host parameter to specify the virtual host name. The syntax is:

oidmon [connect=connect_string] host=virtual_host start|stop

Note:

If you are going to start Oracle Internet Directory servers on a virtual host, then, when using both OIDMON and OIDCTL, be sure to specify the host argument as the virtual host.

If the OID Monitor is started with the host=host name argument, and the host name does not match the name of the physical host, then the OID Monitor assumes that the intended host is the logical host. You must use the same host name when using OIDCTL to stop or start any servers, otherwise the OID Monitor does not start or stop the servers.

To determine the physical host name, execute the uname command.

The OID Control Utility (oidctl) Syntax

OID Control Utility is a command-line tool for starting and stopping the directory server. The commands are interpreted and executed by the OID Monitor process.

This section contains these topics:

Starting and Stopping an Oracle Directory Server Instance

Use the OID Control Utility to start and stop Oracle directory server instances.

Starting an Oracle Directory Server Instance

The syntax for starting an Oracle directory server instance is:

oidctl connect=connect_string server=oidldapd instance=server_instance_number 
[configset=configset_number] [host=virtual/host_name][flags=' -p port_number 
-work maximum_number_of_worker_threads_per_server -debug debug_level -l change_
logging' -server number_of_server_processes] start
Table A-3  Arguments for Starting a Directory Server by Using OIDCTL
Argument Description

-debug debug_level

Specifies a debug level during Oracle directory server instance startup

-l change_logging

Turns replication change logging on and off. To turn it off, enter -l false. To turn it on, do any one of the following:

  • omit the -l flag

  • enter simply -l

  • enter -l true

Turning off change logging for a given node by specifying -l false has two drawbacks: it prevents replication of updates on that node to other nodes in the DRG, and it prevents application provisioning and synchronization of connected directories, because those two services require an active change log. The default, TRUE, permits replication, provisioning, and synchronization.

-p port_number

Specifies a port number during server instance startup. The default port number is 389.

-server number_of_server_processes

Specifies the number of server processes to start on this port

-sport

Specifies the SSL port number during server instance startup. Default port if not set is 636.

See Also:

-work maximum_number_of_worker_threads_per_server

Specifies the maximum number of worker threads for this server

configset=configset_number

Configset number used to start the server. This defaults to configset0 if not set. This should be a number between 0 and 1000.

connect=connect_string

If you already have a tnsnames.ora file configured, then this is the net service name specified in that file, located in ORACLE_HOME/network/admin.

host=virtual/host_name

Specifies the virtual host or rack nodes on which to start the directory server

instance=server_instance_number

Instance number of the server to start. Should be a number between 1 and 1000.

server=oidldapd

Type of server to start (valid values are OIDLDAPD and OIDREPLD). This is not case-sensitive.

start

Starts the server specified in the server argument.

For example, to start a directory server instance whose net service name is dbs1, using configset5,at port 12000, with a debug level of 1024, an instance number 3, and in which change logging is turned off, type at the system prompt:

oidctl connect=dbs1 server=oidldapd instance=3 configset=5 flags='-p 12000 
-debug 1024 -l
' start

When starting and stopping an Oracle directory server instance, the server name and instance number are mandatory, as are the commands start or stop. All other arguments are optional.

All keyword value pairs within the flags arguments must be separated by a single space.

Single quotes are mandatory around the flags.

The configset identifier defaults to zero (configset0) if not set.


Note:

If you choose to use a port other than the default port (389 for non-secure usage or 636 for secure usage), you must tell the clients which port to use to locate the Oracle Internet Directory. If you use the default ports, clients can connect to the Oracle Internet Directory without referencing a port in their connect requests.


Stopping an Oracle Directory Server Instance

At the system prompt, type:

oidctl connect=connect_string server=oidldapd instance=server_instance_number 
stop

For example:

oidctl connect=dbs1 server=oidldapd instance=3 stop

Troubleshooting Directory Server Instance Startup

If the directory server fails to start, you can override all user-specified configuration parameters to start the directory server and then return the configuration sets to a workable state by using the ldapmodify operation.

To start the directory server by using its hard-coded default parameters instead of the configuration parameters stored in the directory, type at the system prompt:

oidctl connect=connect_string flags='-p port_number -f'


The -f option in the flags starts the server with hard-coded configuration values, overriding any defined configuration sets except for the values in configset0.

To see debug log files generated by the OID Control Utility, navigate to $ORACLE_HOME/ldap/log.

Starting and Stopping an Oracle Directory Replication Server Instance

Use the OID Control Utility to start and stop Oracle directory replication server instances.

Starting an Oracle Directory Replication Server Instance

The syntax for starting the Oracle directory replication server is:

oidctl connect=connect_string server=oidrepld instance=server_instance_number 
[configset=configset_number] flags=' -p directory_server_port_number -d debug_
level -h directory_server_host_name -m [true | false]-z transaction_size ' start
Table A-4  Arguments for Starting a Directory Replication Server by Using OIDCTL
Argument Description

connect=connect_string

If you already have a tnsnames.ora file configured, then this is the name specified in that file, which is located in ORACLE_HOME/network/admin

server=oidrepld

Type of server to start (valid values are OIDLDAPD and OIDREPLD). This is not case-sensitive.

instance=server_instance_number

Instance number of the server to start. Should be a number between 1 and 1000.

configset=configset_number

Configset number used to start the server. The default is configset0. This should be a number between 0 and 1000.

-p directory_server_port_number

Port number that the replication server uses to connect to the directory on TCP port directory_server_port_number. If you do not specify this option, the tool connects to the default port (389).

-d debug_level

Specifies a debug level during replication server instance startup

-h directory_server_host_name

Specifies the directory_server_host_name to which the replication server connects, rather than to the default host, that is, your local computer. Directory_server_host_name can be a computer name or an IP address. (Replication server only)

-m [true|false]

Turns conflict resolution on and off. Valid values are true and false. The default is true. (Replication server only)

-z transaction_size

Specifies the number of changes applied in each replication update cycle. If you do not specify this, the number is determined by the Oracle directory server sizelimit parameter, which has a default setting of 1024. You can configure this latter setting.

start

Starts the server specified in the server argument.

For example, to start the replication server with an instance=1, at port 12000, with debugging set to 1024, type at the system prompt:

oidctl connect=dbs1 server=oidrepld instance=1 flags='-p 12000 -h eastsun11 -d 
1024' start

When starting and stopping an Oracle directory replication server, the -h flag, which specifies the host name, is mandatory. All other flags are optional.

All keyword value pairs within the flags arguments must be separated by a single space.

Single quotes are mandatory around the flags.

The configset identifier defaults to zero (configset0) if not set.


Note:

If you choose to use a port other than the default port (389 for non-secure usage or 636 for secure usage), you must tell the clients which port to use to locate the Oracle Internet Directory. If you use the default ports, clients can connect to the Oracle Internet Directory without referencing a port in their connect requests.


Stopping an Oracle Directory Replication Server Instance

At the system prompt, type:

oidctl connect=connect_string server=OIDREPLD instance=server_instance_number 
stop

For example:

oidctl connect=dbs1 server=oidrepld instance=1 stop

Starting the Oracle Directory Integration and Provisioning Server

The Oracle directory integration and provisioning server executable, odisrv, resides in the $ORACLE_HOME/bin directory.

The way you start the directory integration and provisioning server depends on whether your installation is:

You can start the directory integration and provisioning server in either SSL mode for tighter security, or non-SSL mode. You need to use a connect string to connect to the database.


Note:

When the Oracle directory integration and provisioning server is invoked in the default mode, it supports only the Oracle Directory Provisioning Integration Service, and not the Oracle Directory Synchronization Service.


Starting the Oracle Directory Integration and Provisioning Server by Using the OID Monitor and Control Utilities

To start the directory integration and provisioning server in non-SSL mode:

  1. Be sure that OID Monitor is running. To verify this on UNIX, enter the following at the command line:

    ps -ef | grep oidmon
    
    

    If OID Monitor is not running, then start it by following the instructions in "The OID Monitor (oidmon) Syntax".

  2. Start the directory integration and provisioning server by using the OID Control Utility. Do this by entering:

    oidctl [connect=connect_string] server=odisrv [instance=instance_number]  
    [config=configuration_set_number] [flags="[host=hostname] [port=port_number] 
    [debug=debug_level] [refresh=interval_between_refresh] 
    [grpID=group_identifier_of_provisioning_profile]
    [maxprofiles=number_of_profiles]
    [ sslauth=ssl_mode ]"] start

    Table A-5 describes the arguments in this command.

    Table A-5  Description of Arguments for Starting the Oracle Directory Integration and Provisioning Server
    Argument Description

    connect=connect_string

    If you already have a tnsnames.ora file configured, then this is the net service name specified in that file, located in $ORACLE_HOME/network/admin

    server=odisrv

    Type of server to start. In this case, the server you are starting is odisrv. This is not case-sensitive. This argument is mandatory.

    instance=instance_number

    Specifies the instance number to assign to the directory integration and provisioning server. This instance number must be unique. OID Monitor verifies that the instance number is not already associated with a currently running instance of this server. If it is associated with a currently running instance, then OID Monitor returns an error message.

    config=configuration_set_number

    Specifies the number of the configuration set that the directory integration and provisioning server is to execute. This argument is mandatory.

    host=hostname

    Oracle directory server host name

    port=port_number

    Oracle directory server port number

    debug=debug_level

    The required debugging level of the directory integration and provisioning server

    See Also: Table 10-2 for a description of the various debug levels

    refresh=interval_between_refreshes

    Specifies the interval, in minutes, between server refreshes for any changes in the integration profiles.
    Default is 2 minutes (Refresh=2).

    maxprofiles=number_of_profiles

    Specifies the maximum number of profiles that can be executed concurrently for this server instance

    sslauth=ssl_mode

    SSL modes:

    • 0: SSL is not used--that is, non-SSL mode

    • 1: SSL used for encryption only--that is, with no PKI authentication. A wallet is not used in this case.

    • 2: SSL is used with one-way authentication. This mode requires you to specify a complete path name of an Oracle Wallet, including the file name itself, unlike other Oracle Internet Directory tools that expect only the wallet location. For example, in a server-only installation, or in a complete installation, you would enter something like this:

      oidctl server=odisrv
      [instance=instance_number]
      [configset=configset_number]
      [grpID=group_identifier_of_provisioning_
      profile]
       flags="host=myhost 
      port=myport sslauth=2 
      
      

      In a client-only installation, you would enter something like this:

      odisrv [host=host_name]
      [port=port_number] 
      config=configuration_set_number 
      [instance=instance_number] 
      [debug=debug_level]
      [refresh=interval_between_refresh] 
      [maxprofiles=number_of_profiles]
      [refresh=interval_between_refresh] 
      [maxprofiles=number_of_profiles] 
      [sslauth=ssl_mode]
      
Starting the Oracle Directory Integration and Provisioning Server Without Using the OID Monitor and the OID Control Utility

In a client-only installation, where the OID Monitor and OID Control tools are not available, the Oracle directory integration and provisioning server can be started without OID Monitor or OID Control Utility, either in non-SSL mode or, for tighter security, in SSL mode. The parameters described in Table A-5 remain the parameters for each type of invocation.

To start the directory integration and provisioning server, enter the following at the command line:

odisrv [host=host_name] [port=port_number] 
config=configuration_set_number [instance=instance_number] [debug=debug_level] [refresh=interval_between_refresh] [maxprofiles=number_of_profiles] [sslauth=ssl_mode]

Stopping the Oracle Directory Integration and Provisioning Server

The way you stop the directory integration and provisioning server depends on the tool that you used to start it.

Stopping the Oracle Directory Integration and Provisioning Server by Using OID Monitor and the OID Control Utility

If you started the directory integration and provisioning server by using OID Monitor and the OID Control utility, then you use them to stop it, as follows:

  1. Before you stop the directory integration and provisioning server, be sure that the OID Monitor is running. To verify this, enter the following at the command line:

    ps -ef | grep oidmon
    
    

    If OID Monitor is not running, then start it by following the instructions in "The OID Monitor (oidmon) Syntax".

  2. Stop the directory integration and provisioning server by entering:

    oidctl [connect=connect_string] server=odisrv instance=instance stop
    
Stopping the Oracle Directory Integration and Provisioning Server Without Using OID Monitor and the OID Control Utility

In a client-only installation, where the OID Monitor and OID Control tools are not available, the Oracle directory integration and provisioning server can be started without OID Control. To stop the server without these tools, use the stopodiserver.sh tool, which is located in the $ORACLE_HOME/ldap/admin directory.


Note:

To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:


See Also:

"The StopOdiServer.sh Tool Syntax" for instructions about using the stopodiserver.sh tool


Note:

If the Oracle directory integration and provisioning server is stopped by any means other than the methods mentioned in this section, then the server cannot be started from the same host. In that case, the footprint of the previous execution in the directory needs to be removed by using the following command:

$ORACLE_HOME/ldap/admin/stopodiserver.sh [-host directory_server_host] [-port directory_server_port] [-binddn super_user_dN (default is cn=orcladmin)] [-bindpass super_user_password (default is welcome)] -instance number_of_the_instance_to_stop -clean


Restarting Oracle Internet Directory Server Instances

When you want to refresh the server cache immediately, rather than at the next scheduled time, use the RESTART command. When the Oracle Internet Directory server restarts, it maintains the same parameters it had before it stopped.

To restart an Oracle Internet Directory server instance, at the system prompt, type:

oidctl connect=connect_string server={oidldapd|oidrepld|odisrv} 
instance=server_instance_number restart

OID Monitor must be running whenever you restart directory server instances.

If you try to contact a server that is not running, you receive from the SDK the error message 81--LDAP_SERVER_DOWN.

If you change a configuration set entry that is referenced by an active server instance, you must stop that instance and restart it to effect the changed value in the configuration set entry on that server instance. You can either issue the STOP command followed by the START command, or you can use the RESTART command. RESTART both stops and restarts the server instance.

For example, suppose that Oracle directory server instance1 is started, using configset3, and with the net service name dbs1. Further, suppose that, while instance1 is running, you change one of the attributes in configset3. To enable the change in configset3 to take effect on instance1, you enter the following command:

oidctl connect=dbs1 server=oidldapd instance=1 restart

If there are more than one instance of the Oracle directory server running on that node using configset3, then you can restart all the instances at once by using the following command syntax:

oidctl connect=dbs1 server=oidldapd restart

Note that this command restarts all the instances running on the node, whether they are using configset3 or not.


Important Note:

During the restart process, clients cannot access the Oracle directory server instance. However, the process takes only a few seconds to execute.


Starting and Stopping Oracle Internet Directory Servers on Either a Virtual Host or a Rack Node

When starting a directory server, a directory replication server, or a directory integration and provisioning server, use the host parameter to specify the virtual host name.

Starting and Stopping a Directory Server on Either a Virtual Host or a Rack Node

To start a directory server on a virtual host:

oidctl [connect=connect_string] host=virtual_host_name server=oidldapd 
instance=instance_number configset=configset_number flags= "..." start

To stop a directory server on a virtual host:

oidctl host=virtual_host_name server=oidldapd instance=instance_number stop
Starting and Stopping a Directory Replication Server on Either a Virtual Host or a Rack Node

To start a directory replication server on a virtual host:

oidctl [connect=connect_string] host=virtual_host_name server=oidrepld 
instance=instance_number flags= "..." start

To stop a directory replication server on a virtual host:

oidctl host=virtual_host_name server=oidrepld instance=instance_number stop

Starting and Stopping a Oracle Directory Integration and Provisioning Server on Either a Virtual Host or a Rack Node

To start a directory integration and provisioning server on a virtual host:

oidctl [connect=connect_string] host=virtual_host_name server=odisrv 
instance=instance_number configset=configset_number flags= "..." start

To stop a directory integration and provisioning server on a virtual host:

oidctl host=virtual/host_name server=odisrv instance=instance_number stop

When the directory server is started to run on the virtual host, it binds and listens to requests on the specified LDAP port on the IP address or IP addresses that correspond to the virtual host only.

When communicating with the directory server, the directory replication server uses the virtual host name. Further, the replicaID attribute that represents the unique replication identification for the Oracle Internet Directory node is generated once. It is independent of the host name and hence requires no special treatment in cold failover configuration.

When communicating with the directory server, the directory integration and provisioning server uses the virtual host name.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1999, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index