Oracle Application Server 10g: J2EE Deployment and Administration

dcmctl Usage

In this section we'll cover the purpose, location, common usage, and syntax for the dcmctl utility.

Purpose

DCM works in conjunction with OPMN and has the primary responsibility of synchronization of the instance components (for example, OC4J and OHS) with the repository. Though OPMN works internally within the instance, DCM communicates instance updates externally to other instances and the infrastructure. This is especially important when the mid- tier instance is part of a farm (attached to an infrastructure) or part of a cluster. DCM makes sure that the configuration files on the file system are in sync with the repository, and any updates are propagated accordingly .

DCM is also used to deploy J2EE applications to the embedded OC4J instances within 10g AS.

The dcmctl utility is useful for several tasks such as the following:

Location

Located in the 10g AS $ORACLE_HOME/dcm/bin directory.

Common Usages

Common usages for dcmctl are shown in the following sections.

Check status

$ dcmctl getstate Current State for Instance:904mt1.mike.wessler.name Component Type Up Status In Sync Status ========================================================================= 1 home OC4J Up True 2 HTTP_Server HTTP_Server Up True $

Start an individual process (OHS, for example)

$ dcmctl start -co HTTP_Server Current State for Instance:904mt1.mike.wessler.name Component Type Up Status In Sync Status ============================================================================ 1 HTTP_Server HTTP_Server Up True $

Stop an individual process (OHS, for example)

$ dcmctl stop -co HTTP_Server Current State for Instance:904mt1.mike.wessler.name Component Type Up Status In Sync Status ============================================================================ 1 HTTP_Server HTTP_Server Down True $

Restart an individual process (OHS, for example)

$ dcmctl restart -co HTTP_Server Current State for Instance:904mt1.mike.wessler.name Component Type Up Status In Sync Status ============================================================================ 1 HTTP_Server HTTP_Server Up True $

Verify autoarchiving

$ dcmctl set Verbose: true Sort: false Warning: true Debug: true Default Timeout: 120 Auto Archive Count : 15 $

Create an archive

$ dcmctl exportarchive -arch 904mt1bk-02012004_1 f /home/oracle/archives/904mt1bk-02012004_1 $ ls -altr /home/oracle/archives/904mt1bk-02012004_1 -rw-r----- 1 oracle dba 370770 Feb 1 11:53 /home/oracle/archives/904mt1bk-02012004_1 $

Import an archive from a specific file backup

$ dcmctl importarchive -arch 904mt1restore-02012004_1 -f /home/oracle/archives/ 904mt1bk-02012004_1

Import an archive from the local repository

$ dcmctl applyarchiveto -arch 904mt1bk-02012004_1

Deploying a J2EE application (ojspdemos) to an embedded 10g AS OC4J instance (webdev, for example)

$ dcmctl deployapplication -file ./ojspdemos.ear -co webdev application ojspdemos

Redeploying a J2EE application (ojspdemos) to an embedded 10g AS OC4J instance (webdev, for example)

$ dcmctl redeployapplication -file ./ojspdemos.ear -co webdev -application ojspdemos

Undeploying a J2EE application (ojspdemos) from an embedded 10g AS OC4J instance (webdev, for example)

$ dcmctl undeployapplication -co webdev -application ojspdemos

Syntax

To get a list of available arguments, issue dcmctl help, as follows :

$ dcmctl help DCMCTL Command Help !! addopmnlink applyarchiveto applyclusterto applyinstanceto configrepositoryssl createarchive createcluster createcomponent deployapplication destroyinstance echo exit exportarchive exportrepository getcomponenttype geterror getopmnport getrepositoryid getreturnstatus getstate help importarchive importrepository isclusterable iscompatible joincluster joinfarm leavecluster leavefarm listapplications listarchives listclusters listcomponents listcomponenttypes listinstances listopmnlinks quit redeployapplication removearchive removecluster removecomponent removeopmnlink repositoryrelocated resetdcmcacheport resetfiletransaction resethostinformation restart restoreinstance resyncinstance saveinstance set setloglevel shell shutdown start stop undeployapplication updateconfig validateearfile whichcluster whichfarm whichinstance $

To get usage for a particular command, issue dcmctl help argument_name , as follows:

$ dcmctl help restart restart Restarts processes. Type Process Management Syntax restart [[-cl cluster_name] [-i instance_name] [-co component_name] [-ct component_type]] [-admin] Description Restarts running processes in the specified scope. This command does not restart OPMN or the DCM daemon, it leaves them running. Only the processes that were running when the command was issued are restarted. If the -admin option is used, then the DCM daemon is restarted. Example To restart the local instance: restart To restart a remote instance: restart -i myInstance To restart a component across a cluster: restart -cl myCluster -co myComponent $

Категории