Oracle9i Application Server Administrator's Guide Release 2 (9.0.2) Part Number A92171-02 |
|
The Distributed Configuration Management (DCM) utility, dcmctl
, provides a command-line alternative to using Oracle Enterprise Manager for some management tasks. The dcmctl
tool uses the same distributed architecture and synchronization features as Enterprise Manager Web site, thereby providing identical functionality in a format that is ideal for scripting and automation.
The following sections describe the tasks you can perform using dcmctl
:
The dcmctl
utility is located in:
(UNIX) ORACLE_HOME/dcm/bin/dcmctl
(Windows) ORACLE_HOME\dcm\bin\dcmctl
In order to run dcmctl
you must log in to your operating system as the user that installed Oracle9i Application Server. You can run dcmctl
from your operating system prompt using the following syntax:
dcmctl
command[
options]
Table F-1 displays dcmctl
help and error information commands.
The following sections describe overall information on how to use dcmctl
:
The dcmctl
utility supports many commands, which are described in the subsequent sections of this appendix. Commands are a single word and are not case-sensitive. Each dcmctl
command supports zero or more options.
Options take the following form:
-
option
[
argument
]
Option names have a long and short form, and are not case-sensitive. There are two types of dcmctl
options: target and universal.
Table F-2 lists the dcmctl
target options that define the target on which to apply the given command. Subsequent sections of this appendix describe which target options can be used with each command. On hosts with multiple application server instances, dcmctl
determines the target instance as follows:
-cluster
or -cl
option.
-instance
or -i
option.
-oraclehome
universal option.
-oraclehome
is not supplied, use the instance associated with the Oracle home directory in which the dcmctl
executable resides.
dcmctl
Target Options
Table F-3 lists the dcmctl
universal options that define command behavior and can be used with all commands.
dcmctl
Universal Options
In order to use dcmctl
in a clustered environment, you must have a DCM daemon associated with every instance in the cluster. You can do this in one of the following ways:
(UNIX)ORACLE_HOME
/bin/emctl start
(Windows)ORACLE_HOME
\bin\emctl start
See Also:
"Starting and Stopping the Oracle Enterprise Manager Web Site" for more information on starting the Oracle Enterprise Manager Web site. |
dcmctl
shell in each application server instance in the cluster. On each host that contains instances in the cluster, log in as the user that installed Oracle9i Application Server and execute the following command in the Oracle home directory for each instance in the cluster:
ORACLE_HOME
/dcm/bin/dcmctl shell
To stop the process, use the following command:
dcmctl> exit
Note that the dcmctl shell must stay running in the foreground; do not put it in the background.
You can pass parameters directly to the JVM when executing dcmctl
through the ORACLE_DCM_JVM_ARGS
environment variable.
For example, to set up a proxy:
ORACLE_DCM_JVM_ARGS="-DhttpProxy.host=yourproxyhost.com -DhttpProxy.port=yourproxyport"
You can use dcmctl
to start, stop, restart, and retrieve the status of application server instances, components, and clusters.
Table F-4 lists the administration commands and their options for starting, stopping, restarting, and retrieving the status of instances, clusters, or components within the instance or cluster.
Command | Description |
---|---|
|
Start the processes indicated. The default is to start the local application server instance only. Refer to Table F-2 for information on the scope parameters. Note that you can choose to start all application server instances in the cluster ( |
|
Stop the processes indicated. See the start command for further discussion. This does not stop OPMN and DCM. |
|
Restart the processes indicated. See the start command for further discussion. This will leave OPMN and DCM running. |
|
Stop the local application server instance, including its components, OPMN, and DCM. This command is appropriate to run before a system shutdown. |
|
Return the current status of the processes indicated. This command returns a status of "up" or "down" for the indicated process. |
Table F-5 describes commands that you can use to display information about application server instances and destroy and resynchronize instances.
Table F-6 describes commands that you can use to manage Oracle HTTP Server and OC4J instances that reside within a J2EE and Web Cache instance type.
Table F-7 describes commands that you can use to manage application server clusters.
This section describes commands for deploying, redeploying, and undeploying OC4J applications.
On hosts with multiple OC4J instances, dcmctl
determines the target OC4J instance as follows:
-co
target option, apply the operation to that OC4J instance within the associated application server instance. The application server instance is determined first by the -oraclehome
option, and second by the Oracle home directory in which the dcmctl
executable resides. If the application server instance is part of a cluster, apply the operation to all OC4J instances with the specified name within the cluster.
-co
target option is not supplied, apply the operation to all OC4J instances within the associated application server instance. The application server instance is determined first by the -oraclehome
option, and second by the Oracle home directory in which the dcmctl
executable resides. If the application server instance is part of a cluster, apply the operation to all OC4J instances within the cluster.
Table F-8 Deployment Commands and Their Options
Command | Description |
---|---|
|
Deploy an application to the current instance using the WAR or EAR file supplied with the |
|
Redeploy an application to the current instance using the WAR or EAR file indicated by the |
|
Undeploy the indicated application. |
|
Return a list of the applications deployed within the indicated OC4J component. Note that this command allows you to specify an instance or cluster that contains the OC4J component. |
|
Determine if the supplied EAR file is J2EE compliant. In order to run this command, you must set up your proxy so that Document Type Definitions (DTDs) may be reached on the Web. See Also: "Passing Parameters to the JVM" for more information. |
Table F-9 lists commands that you can use to back up your application instance, including clustering information, configuration, and applications deployed.
Table F-9 Backup Commands and Their Options
You can execute dcmctl
commands from within the dcmctl
shell. To start the dcmctl
shell, type:
dcmctl shell
The following is a sample session using the dcmctl
shell:
dcmctl shell
dcmctl> createcluster testcluster
dcmctl> joincluster testcluster
dcmctl> createcomponent -ct oc4j -co component1
dcmctl> start -co component1
dcmctl> deployapplication -f /stage/apps/app1.ear -a app1 -co component1
dcmctl> start -cl testcluster
dcmctl> getstate
dcmctl> exit
You can execute dcmctl
commands from a script file using the following command:
dcmctl shell -f
script_file_name
For example, create a file called testFile.cmd
containing the following lines:
# this is a comment in a dcmctl command file
echo "creating testcluster"
createcluster testcluster
echo "joining testcluster"
joincluster testcluster
echo "creating component component1"
createcomponent -ct oc4j -co component1
echo "starting component to deploy application"
start -co component1
echo " deploying application"
deployapplication -f /stage/apps/app1.ear -a app1 -co component1
echo "starting the cluster"
start -cl testcluster
echo "verifying everything started "
getstate
exit
Execute testFile.cmd
using the following command:
dcmctl shell -f testFile.cmd
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|