| Oracle9iAS Containers for J2EE User's Guide Release 2 (9.0.3) Part Number A97681-01 |
|
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 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:
dcmctlcommand[options]
Table B-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 B-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.
Table B-2
dcmctl Target Options
Table B-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:
ORACLE_HOME/bin/emctl start
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
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"
Use dcmctl to start, stop, restart, and retrieve the status of application server instances, components, and clusters.
Table B-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 B-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. |
|
|
Stops 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 B-5 describes commands that you can use to display information about application server instances and destory and resynchronize instances.
Table B-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 B-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 B-8 Deploying Applications
| 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 B-9 lists commands that you can use to back up your application instance, including clustering information, configuration, and applications deployed.
Table B-9 Backing Up the Application Instance
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 shelldcmctl> createcluster testclusterdcmctl> joincluster testclusterdcmctl> createcomponent -ct oc4j -co component1dcmctl> start -co component1dcmctl> deployapplication -f /stage/apps/app1.ear -a app1 -co component1dcmctl> start -cl testclusterdcmctl> getstatedcmctl> exit
You can execute dcmctl commands from a script file using the following command:
dcmctl shell -fscript_file_name
For example, create a file called testFile.cmd containing the following lines:
# this is a comment in a dcmctl command fileecho "creating testcluster"createcluster testclusterecho "joining testcluster"joincluster testclusterecho "creating component component1"createcomponent -ct oc4j -co component1echo "starting component to deploy application"start -co component1echo " deploying application"deployapplication -f /stage/apps/app1.ear -a app1 -co component1echo "starting the cluster"start -cl testclusterecho "verifying everything started "getstateexit
Execute testFile.cmd using the following command:
dcmctl shell -f testFile.cmd
|
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|