Using the Distributed Configuration Manager (DCM) command shell... americas cup win 2682133k1

Using the Distributed Configuration Manager (DCM) command shell…

At first I couldn’t remember this dcm-commands and always had to type them at least twice untill… I learned about the “shell”- subcommand which is part of Oracle iAS’s since iAS9i Rel.1.
Oddly enough, this shell is almost hidden behind a cloud of silence from Oracle’s side and I haven’t found it used in any of the How-to books I read. So why bother?
Because it can make the life of an application server administrator easier – type- and otherwise. It’s a simple command shell for all dcm-commands. It is a little bit like the old command-line servermanager all dba’s know.

Just imagine, you just installed an iAS with OC4J-container (stand-alone) and deployed your Java application. You entered thet URL of your new webserver into your browser just to see that it is working and all you get is “The Page can not be displayed” (HTTP-404).

Sure, you can directly dive into the Apache logs or may be the OC4J-logs first? So, in this case you want to find out first which component of the iAS refuses to work properly.

To check the status of all installed components of an instance you type a command like (and don’t forget to set Oracle_home first and go to OH/dcm/bin if it is not in your path which isn’t if its installed bij the OUI):

> dcmctl getstate -v -D

The command will show the acutal status of all installed components of the instance verbosely (-v can be skipped in 9.0.4, it’s implicit!) and in a Debug-mode (-D).

Let’s say as a result of that command you get:

    Component            Type                   Up Status       In Sync Status
1   home             OC4J                       Up              True
2   HTTP_Server      HTTP_Server                Down            True

And you see – aha- the HTTP server is down causing the problem and – praise the Lord – the metadata repository is still in sync. So now all you need to do is starting the webserver. That is also done with a dcmctl–command which goes like:

> dcmctl start -co HTTP_Server

Followed again (you don’t really trust it) by an other check of all components. So you typed in total:

>  dcmctl getstate -v -D
>  dcmctl start -co HTTP_Server
>  dcmctl getstate -v -D

While you could have done it (in AS10g) with

> dcmctl shell
dcm >  getstate -D
dcm >  start -co HTTP_Server
dcm > getstate  -D 

(or repeat second last command)

dcm > exit or quit (to leave the shell) 

I hear you cry: an opmnctl stopall/startall would be faster and easier to type.
Yes, I know, not very impressive this far, but just imagine working on an Unix/Linux machine debugging a serious error in one of the components with a repository out of sync and a backup of the configuration after the repairs. Issueing all the necessary dcm-commands in one shell without having to type dcmctl in front of all your commands all the time saves a lot of time and trouble!

You just have to concentrate on the command you have to issue without being afraid of staying in the wrong directory, resetting Oracle_Home over and over again and so forth. In an other terminal window you can hop around in your filesystem in a normal shell doing all the rest without losing the posibility to do your next step in dcm where you left off.

This relatively tiny piece of software (compared to for example the webcache) makes actually the iAS tick by making sure that all components which have to work together are registered to a (filebased) repository and, if clustered, that each machine has a fitting, current configuration.
In iAS version 9.0.2 DCM at first had a serius bug – it collided heavily with the function of EMCTL, which is now just another way of handling dcm-commands.

DCM works in conjunction with the Oracle Process Monitor(s) (OPMN). OPMN is always a pure local process depending on the configration controlled by DCM.
DCM assures that the configurations of all nodes of an instances are in sync and propagates changes over all nodes. It synchronizes with the metadata repository of the infrastructure (if used) or uses a filebased repository for example in a stand-alone installation.

When does one use the opmnctl and when dcmctl?

OPMN is usually used to start/stop the whole instance in one go.

> opmnctl startall


> opmnctl stopall

When you have to

  • check the status of components of an application server instance
  • (re)synchronize configuration files with the repository
  • backup the instance configuration
  • stop/start individual components of an instance
  • deploy war/ear-files manually on a command-line

than you better use dcmctl or even better use it as a shell.


  1. Sambasiva Mannava February 2, 2006
  2. Jacco Landlust December 10, 2005
  3. Karin Kriebisch December 9, 2005
  4. Jacco Landlust December 9, 2005
  5. Marco Gralike June 6, 2005