The following is the final part of a six-part series on Oracle Application Server 10g administration. Each tip...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
is excerpted from the Osborne Oracle Press book, "Oracle Application Server 10g administration handbook," by John Garmany and Don Burleson. Check back frequently for the next installment, or go to the main series page for all installments.
Distributed Configuration Management
The Distributed Configuration Management utility can be used instead of EM for some management activities, but not all. The dcmctl utility only manages the OHS/OC4J portion of the instance. It can be used within scripts to automate maintenance functions. If you are working with one instance, you will either need to pass dcmctl, the instance's ORACLE_HOME variable, or set it before executing the command. To avoid confusion, it is good practice to always set environmental variables in the script before executing either opmnctl or dcmctl. In a cluster environment, failure to set the appropriate ORACLE_HOME could result in making changes to the wrong instance. You can also use the environment variable ORACLE_DCM_JVM_ARGS to pass arguments to the Java Virtual Machine.
The dcmctl utility can be started so that commands can be directly entered using the command shell.
$ dcmctl shell dcmctl> createcomponent -ct oc4j -co OC4J_T2 dcmctl> exit $
$ dcmctl help
|Short Format||Long Format||Description|
|-i||-instance||Instance name (Oracle9iAS Instance)|
|-d||-debug||Print stack trace on exception|
|-l||-logdir||Location for the error log log.xml|
|-o||-oraclehome||ORACLE_HOME for that command|
|-t||-timeout||Max time to complete command (default: 45sec)|
|-v||-verbose||Verbose listing of state and error messages|
Now that we have defined the options, you can begin using the commands. Since dcmctl is used mostly within scripts, you need to be able to start and stop the instances/components. The following command starts the porta904 instance. Notice that we use the fully qualified instance name.
$ dcmctl start -i porta904.appsvr.localdomain.com Current State for Instance:porta904.appsvr.localdomain.com Component Type Up Status In Sync Status ======================================================================= 1 HTTP_Server HTTP_Server Up True 2 OC4J_Demos OC4J Up True 3 OC4J_Portal OC4J Up True 4 OC4J_Testing OC4J Up True 5 OC4J_Wireless OC4J Up True 6 home OC4J Up True
$ dcmctl stop -co OC4J_Testing Current State for Instance:porta904.appsvr.localdomain.com Component Type Up Status In Sync Status ======================================================================= 1 OC4J_Testing OC4J Down True
About the authors
A senior Oracle trainer with Burleson Consulting, John Garmany is also a respected Oracle expert and author and chosen by Oracle Press to write the "officially authorized edition" for the "Oracle Application Server 10g administration handbook." John also serves as a writer for DBAZine, "Oracle Internals" and has authored several popular Oracle books.
Don Burleson is one of the world's top Oracle database experts with more than 20 years of full-time DBA experience. He specializes in creating database architectures for very large online databases and he has worked with some of the world's most powerful and complex systems. Don's professional Web sites include www.dba-oracle.com and www.remote-dba.net.