Skip Headers
Oracle® Application Server Quick Administration Guide
10g Release 2 (10.1.2)
B14126-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

B DCM Commands

Distributed Configuration Management is a management framework that enables you to manage the configurations of multiple instances. Distributed Configuration Management (DCM) features enable you to:

Table B-1 describes the key DCM commands and illustrates their usage.

Table B-1 DCM Commands and Usage

DCM Commands Type Syntax Description and Example

createCluster

Configuration Management

createCluster -cl cluster_name

Creates a managed cluster.

dcmctl createCluster -cl cluster1

createComponent

Configuration Management

createComponent -ct oc4j -co component_name

Creates a new OC4J instance belonging to the local application server instance. You cannot specify another instance with the –i option. The command operates locally.

Example:

dcmctl createComponent -ct oc4j -co OC4J_myapps

exportRepository

Configuration Management

exportRepository -f myFile [-force]

Copies the file-based repository information to the location specified. Use the –force option to overwrite an existing file. If you do not use the –force option and the named file exists, an exception is thrown.

Example:

exportrepository -f /export/repository_save_file

getRepositoryId

Configuration Management

getRepositoryId

Returns the file-based repository identifier of the farm to which the instance belongs. If the instance is a standalone instance, this command returns the repository identifier for the instance. If the standalone instance is to be used to establish a new distributed file-based repository, use the returned repository identifier to initialize the repository host with joinFarm and the –r option.

Example:

dcmctl getrepositoryId

importRepository

Configuration Management

importRepository -f file_name [-force]

Moves a file-based repository from one instance to another, based on a saved file from the exportRepository command. The repository may be restored to any instance in the farm. If the current instance is not hosting a repository, dcmctl prompts for confirmation of the action, unless the –force option is used.

Example:

importrepository -f /export/repository_save_file

joinCluster

Configuration Management

joinCluster -cl cluster_name [-i instance_name]

Adds an application server instance to the managed OracleAS Cluster specified with the –cl option. By default, this command uses the local instance. Specify a different instance with the –i option.

Example:

dcmctl joinCluster -cl cluster1

joinFarm

Configuration Management

joinFarm [-r repository_ID]

With the –r option and a repository ID, associates an instance with the named file-based repository. The repository_ID is a hostname and port.

Example:

dcmctl joinFarm -r repository_ID

leaveCluster

Configuration Management

leaveCluster [-i instance_name]

Removes an application server instance from its managed OracleAS Cluster. By default, this command uses the local instance. Specify a different instance with the –i option.

Example:

dcmctl leaveCluster

leaveFarm

Configuration Management

leaveFarm

Removes an application server instance from a farm. This command affects only the relationship between DCM and a repository, and has no impact on other components.

Example:

dcmctl leaveFarm

listInstances

Configuration Management

listInstances [-cl cluster_name]

With no options, this command lists the application server instances that belong to the same farm as the local instance, but are not part of a cluster. With the –cl option, it lists only the instances that are part of the specified cluster.

Example:

dcmctl listInstances

resyncInstance

Configuration Management

resyncInstance [-force]|[-i instance_name]

Resynchronizes the instance configuration files with the contents of the DCM repository. This command takes all data from the repository that is not yet propagated and writes it out to the configuration files for the specified instance. It updates the Oracle HTTP Server, OC4J, and OPMN configuration files, as well as targets.xml.

Example:

dcmctl resyncinstance -i instance1

shell

Configuration Management

dcmctl shell [-f file_name]

Starts the dcmctl shell, and, optionally, executes the commands in a named file.

Example:

dcmctl shell

updateConfig

Configuration Management

updateConfig [-ct component_type [, component_type...]] [-force]

Updates the DCM repository with the information in local configuration files. With no arguments, this command updates all DCM managed components, configuration files, as well as targets.xml.

Example:

dcmctl updateConfig

whichCluster

Configuration Management

whichCluster [-i instance_name]

Returns the name of the cluster that contains the named instance. If no instance is specified, it returns the name of the cluster that contains the local instance.

Example:

dcmctl whichCluster

whichFarm

Configuration Management

whichFarm [-i instance_name]

Returns the farm name, farm type (database or distributed file-based repository), the hosting instance, and the host name.

Example:

dcmctl whichFarm

applyArchiveTo

Archive

applyArchiveTo –src archiveName [-cl clusterName | -i instanceName]

When configuration information is stored in the DCM repository, it is recognized as one of the following two types of information:

  • Information that is generic to any instance (cluster-wide information).

  • Information that is specific to a particular instance (instance-specific information).

Example:

dcmctl applyarchiveto –src archive1 –i instance1

createArchive

Archive

createArchive -arch archiveName [-cl myCluster | -i myInstance] [-comment "myComments"]

Creates an archive of the named instance or cluster. If you do not specify a cluster or instance, the current instance is archived.

dcmctl applyarchiveto –src archive1 –i instance

exportArchive

Archive

exportArchive -arch archiveName -f myFile [-comment "myComments"]

Exports an archive from the repository to a file. Then, you can import the file to the same repository or to a different repository.

Example:

dcmctl exportArchive –arch archive1 –f /exports/testConfig -comment "this is an export of archive1"

importArchive

Archive

importArchive [-arch archiveName] -f myFile [-comment "myComments"]

Imports the named archive file to the current repository. Use –arch to change the name and –comment to change the comment during the import.

Example:

dcmctl importArchive –arch Archive1 –f /exports/testConfig -comment "this is an import"

deployApplication

Application

deployApplication -f file -a app_name [-co comp_name] [-enableIIOP] [-rc rootcontext] [-pa parent_name]

Deploys the J2EE application to the local application server instance.

Example:

dcmctl deployApplication -f app1.ear -a app1

redeployApplication

Application

redeployApplication -f file -a app_name [-co comp_name] [-enableIIOP] [-rc rootcontext]

Redeploys a J2EE application (WAR or EAR file) to the local application server instance.

Example:

dcmctl redeployApplication -f app1.ear -a app1

undeployApplication

Application

undeployApplication -a application_name -co instance_name

Undeploys the named application in the named OC4J instance.

Example:

undeployApplication -a testAp -co home

getReturnStatus

dcmctl Properties

getReturnStatus

Displays the status of the last dcmctl command that performed an asynchronous operation (as opposed to a command that returned information). Use this command to get the status of a previous command that timed out.

Example:

dcmctl getReturnStatus

getState

Configuration Management

getState [-i instance_name] [-cl cluster_name] [-co component_name]

Returns the state of all components.

Example:

dcmctl getState