Oracle Applications DBA 基础(第二期)Week 04 exercise

2024-03-09 23:48

本文主要是介绍Oracle Applications DBA 基础(第二期)Week 04 exercise,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1. applsys 用户是做什么用的 ?
applsys是AD和FND product的owner,其密码必须与apps用户一致.

--EOF--


2. config file, enviornment file, context file 分别是什么?请列出你的系统的例子。

config file - 包括各个节点的配置信息,主要用于升级或多节点安装

[oravis@oel57vis ~]$ ll $ORACLE_HOME/appsutil/conf_$ORACLE_SID.txt
-rw-r--r-- 1 oravis dba 10658 Feb 14 23:22 /u03/db/tech_st/11.1.0/appsutil/conf_VIS.txt


[applvis@oel57vis ~]$ ll $INST_TOP/conf_$TWO_TASK.txt
-rw-r--r-- 1 applvis dba 10654 Feb 14 23:21 /u02/inst/apps/VIS_oel57vis/conf_VIS.txt

enviroment file - 包括数据库或应用产品的一些环境变量

[oravis@oel57vis ~]$ ll $ORACLE_HOME/$CONTEXT_NAME.env
-rw-r--r-- 1 oravis dba 3941 Feb 15 01:20 /u03/db/tech_st/11.1.0/VIS_oel57vis.env


[applvis@oel57vis ~]$ ll $APPL_TOP/APPS$CONTEXT_NAME.env
-rw-r--r-- 1 applvis dba 1014 Feb 27 10:20 /u01/apps/apps_st/appl/APPSVIS_oel57vis.env

context file - 数据库或应用产品的集中配置文件,需要配合adautocfg.sh使用

[oravis@oel57vis ~]$ ll $CONTEXT_FILE
-rwxr-xr-x 1 oravis dba 12575 Feb 15 12:31 /u03/db/tech_st/11.1.0/appsutil/VIS_oel57vis.xml


[applvis@oel57vis ~]$ ll $CONTEXT_FILE
-rw-r--r-- 1 applvis dba 89874 Feb 27 10:20 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml


--EOF--


3。multi node 的安装,例如, 有4 台 应用服务器, 怎样知道 那些 services 运行在 那些 node 上?

可通过$CONTEXT_FILE来查看oa_service_group_list:

[applvis@vis2 ~]$ tail -n20 $CONTEXT_FILE
      <oa_service_group_list>
         <oa_service_group type="root" title="Root Service" services="opmn">
            <oa_service_group_status oa_var="s_root_status">enabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="web entry" title="Web Entry Point Services" requires="root" services="ohs, tns_apps">
            <oa_service_group_status oa_var="s_web_entry_status">enabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="web_applications" title="Web Application Services" requires="root" services="oacore, forms, oafm, tns_apps">
            <oa_service_group_status oa_var="s_web_applications_status">enabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="batch" title="Batch Processing Services" services="tns_apps, concmgr, icsm_srv, jtff_srv">
            <oa_service_group_status oa_var="s_batch_status">disabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="other" title="Other Services" services="forms_server, met_cl, met_srv, mwa_srv">
            <oa_service_group_status oa_var="s_other_service_group_status">disabled</oa_service_group_status>
         </oa_service_group>
      </oa_service_group_list>
      <!-- End of Service Group List -->
   </oa_services>
</oa_context>
[applvis@vis2 ~]$


[applvis@vis3 ~]$ tail -n20 $CONTEXT_FILE
      <oa_service_group_list>
         <oa_service_group type="root" title="Root Service" services="opmn">
            <oa_service_group_status oa_var="s_root_status">disabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="web entry" title="Web Entry Point Services" requires="root" services="ohs, tns_apps">
            <oa_service_group_status oa_var="s_web_entry_status">disabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="web_applications" title="Web Application Services" requires="root" services="oacore, forms, oafm, tns_apps">
            <oa_service_group_status oa_var="s_web_applications_status">disabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="batch" title="Batch Processing Services" services="tns_apps, concmgr, icsm_srv, jtff_srv">
            <oa_service_group_status oa_var="s_batch_status">enabled</oa_service_group_status>
         </oa_service_group>
         <oa_service_group type="other" title="Other Services" services="forms_server, met_cl, met_srv, mwa_srv">
            <oa_service_group_status oa_var="s_other_service_group_status">disabled</oa_service_group_status>
         </oa_service_group>
      </oa_service_group_list>
      <!-- End of Service Group List -->
   </oa_services>
</oa_context>
[applvis@vis3 ~]$


--EOF--


4。修改 oacore 的jvm 的最大heap size (Xmx) ,由默认的512 M, 降到 256M。
修改 oacore 的jvm 的 启动 heap size (Xms)为 128M.
(注意: 这里将 数值降低是考虑到 大家的测试机配置。在生产环境很可能是增加。
bonus question: 怎样判断应该增加还是减少?) 

查看当前参数:

[applvis@oel57vis scripts]$ egrep "oacore_jvm_start_options|oacore_jvm_stop_options" $CONTEXT_FILE
        -server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml
        -server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ sed -n '111,120p' $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml
            <process-type id="oacore" module-id="OC4J" status="enabled" working-dir="$ORACLE_HOME/j2ee/home">
               <module-data>
                  <category id="start-parameters">
                     <data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies"/>
                     <data id="java-bin" value="/u02/inst/apps/VIS_oel57vis/admin/scripts/java.sh"/>
                     <data id="oc4j-options" value="-out /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.out -err /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.err"/>
                  </category>
                  <category id="stop-parameters">
                     <data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
                  </category>
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ ps -ef | grep "oracle.oc4j.instancename=oacore"
applvis   9365  9231  0 22:29 ?        00:00:17 /u01/apps/tech_st/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=9365 -server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=/u01/apps/tech_st/10.1.3/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies -Doracle.ons.oraclehome=/u01/apps/tech_st/10.1.3 -Doracle.home=/u01/apps/tech_st/10.1.3 -Doracle.ons.oracleconfighome=/u02/inst/apps/VIS_oel57vis/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancename=VIS_oel57vis.oel57vis.example.com -Dopmn.compatible=904 -Doracle.ons.indexid=oacore.default_group.1 -Doracle.ons.numprocs=1 -Doracle.ons.uid=1503415290 -Doracle.oc4j.groupname=default_group -Doracle.oc4j.instancename=oacore -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid=g_rt_id -DOPMN=true -jar oc4j.jar -config /u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/server.xml -properties -out /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.out -err /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.err -ports default-web-site:ajp:21500,rmi:20000,jms:23000
applvis  17693  8257  0 23:33 pts/4    00:00:00 grep oracle.oc4j.instancename=oacore
[applvis@oel57vis scripts]$


修改最大heap size(Xmx)为256M,由于启动heap size(Xms)已经是128M所以保持不变.

[applvis@oel57vis scripts]$ ./adstpall.sh apps/apps
...
[applvis@oel57vis scripts]$ cp $CONTEXT_FILE{,.bk03mar2014}
[applvis@oel57vis scripts]$ ls -l $CONTEXT_FILE*
-rw-r--r-- 1 applvis dba 89874 Feb 27 10:20 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml
-rw-r--r-- 1 applvis dba 89874 Mar  3 23:36 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml.bk03mar2014
[applvis@oel57vis scripts]$ vim /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml
[applvis@oel57vis scripts]$ egrep "oacore_jvm_start_options|oacore_jvm_stop_options" $CONTEXT_FILE

        -server -verbose:gc -Xmx256M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml
        -server -verbose:gc -Xmx256M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ ./adautocfg.sh
Enter the APPS user password:

The log file for this session is located at: /u02/inst/apps/VIS_oel57vis/admin/log/03032353/adconfig.log

AutoConfig is configuring the Applications environment...

AutoConfig will consider the custom templates if present.
    Using CONFIG_HOME location     : /u02/inst/apps/VIS_oel57vis
    Classpath                   : /u01/apps/apps_st/comn/java/lib/appsborg2.zip:/u01/apps/apps_st/comn/java/classes

    Using Context file          : /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml

Context Value Management will now update the Context file

    Updating Context file...COMPLETED

    Attempting upload of Context file and templates to database...COMPLETED

Configuring templates from all of the product tops...
    Configuring AD_TOP........COMPLETED
    Configuring FND_TOP.......COMPLETED
    Configuring ICX_TOP.......COMPLETED
    Configuring MSC_TOP.......COMPLETED
    Configuring IEO_TOP.......COMPLETED
    Configuring BIS_TOP.......COMPLETED
    Configuring AMS_TOP.......COMPLETED
    Configuring CCT_TOP.......COMPLETED
    Configuring WSH_TOP.......COMPLETED
    Configuring CLN_TOP.......COMPLETED
    Configuring OKE_TOP.......COMPLETED
    Configuring OKL_TOP.......COMPLETED
    Configuring OKS_TOP.......COMPLETED
    Configuring CSF_TOP.......COMPLETED
    Configuring IGS_TOP.......COMPLETED
    Configuring IBY_TOP.......COMPLETED
    Configuring JTF_TOP.......COMPLETED
    Configuring MWA_TOP.......COMPLETED
    Configuring CN_TOP........COMPLETED
    Configuring CSI_TOP.......COMPLETED
    Configuring WIP_TOP.......COMPLETED
    Configuring CSE_TOP.......COMPLETED
    Configuring EAM_TOP.......COMPLETED
    Configuring FTE_TOP.......COMPLETED
    Configuring ONT_TOP.......COMPLETED
    Configuring AR_TOP........COMPLETED
    Configuring AHL_TOP.......COMPLETED
    Configuring OZF_TOP.......COMPLETED
    Configuring IES_TOP.......COMPLETED
    Configuring CSD_TOP.......COMPLETED
    Configuring IGC_TOP.......COMPLETED

AutoConfig completed successfully.
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ sed -n '111,120p' $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml
            <process-type id="oacore" module-id="OC4J" status="enabled" working-dir="$ORACLE_HOME/j2ee/home">
               <module-data>
                  <category id="start-parameters">
                     <data id="java-options" value="-server -verbose:gc -Xmx256M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies"/>
                     <data id="java-bin" value="/u02/inst/apps/VIS_oel57vis/admin/scripts/java.sh"/>
                     <data id="oc4j-options" value="-out /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.out -err /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.err"/>
                  </category>
                  <category id="stop-parameters">
                     <data id="java-options" value="-server -verbose:gc -Xmx256M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2  -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
                  </category>
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ ./adstrtal.sh apps/apps
[applvis@oel57vis scripts]$ ps -ef | grep "oracle.oc4j.instancename=oacore"

applvis  24979 24843  6 Mar03 ?        00:00:08 /u01/apps/tech_st/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=24979 -server -verbose:gc -Xmx256M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=/u01/apps/tech_st/10.1.3/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies -Doracle.ons.oraclehome=/u01/apps/tech_st/10.1.3 -Doracle.home=/u01/apps/tech_st/10.1.3 -Doracle.ons.oracleconfighome=/u02/inst/apps/VIS_oel57vis/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancename=VIS_oel57vis.oel57vis.example.com -Dopmn.compatible=904 -Doracle.ons.indexid=oacore.default_group.1 -Doracle.ons.numprocs=1 -Doracle.ons.uid=1503415294 -Doracle.oc4j.groupname=default_group -Doracle.oc4j.instancename=oacore -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid=g_rt_id -DOPMN=true -jar oc4j.jar -config /u02/inst/apps/VIS_oel57vis/ora/10.1.3/j2ee/oacore/config/server.xml -properties -out /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.out -err /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.3/opmn/oacorestd.err -ports default-web-site:ajp:21500,rmi:20000,jms:23000
applvis  26487  8257  0 00:01 pts/4    00:00:00 grep oracle.oc4j.instancename=oacore
[applvis@oel57vis scripts]$

由上可以看出Xmx参数已经修改成功.

当oacore的日志($INST_TOP/logs/ora/10.1.3/opmn/default_group~oacore~default_group~1.log)频繁出现Full GC时,可以考虑增加.

当执行adstpall.sh在关闭oacore组件时出现"ERROR : Timed out( 100000 ): Interrupted Exception"错误,可以考虑减少.


参考:

Tuning JVM in Oracle E-Business Suite
http://avdeo.com/2008/07/24/tuning-jvm-in-oracle-e-business-suite/


Tuning Full GC Events In The OACORE JDK 6 Java Virtual Machine (Doc ID 851765.1)


Configuring various JVM tuning parameters for Oracle E-Business suite 11i and R12 (Doc ID 567551.1)


adstpall.sh Script Fails with ERROR : Timed out (Doc ID 1617999.1)


--EOF--


5。将 FORMS 的连接 由 默认的 servlet mode 改为  socket mode。
怎样看到改了?
(hint: 参考 metalink note :384241.1 )
bonus question: 什么时候用 socket mode 好, 什么时候用servlet mode 好?

查看当前参数:

[applvis@oel57vis scripts]$ grep s_frmConnectMode $CONTEXT_FILE
        servlet
[applvis@oel57vis scripts]$ ./adformsrvctl.sh status


You are running adformsrvctl.sh  version 120.15.12010000.3

Forms Connect Mode is set to Servlet. Please Change Forms Mode to socket and then run this script.

adformsrvctl.sh: exiting with status 1

[applvis@oel57vis scripts]$

修改成socket mode:

[applvis@oel57vis scripts]$ ./adstpall.sh apps/apps
[applvis@oel57vis scripts]$ cp $CONTEXT_FILE{,.bk04mar2013}

[applvis@oel57vis scripts]$ ls -l $CONTEXT_FILE*
-rw-r--r-- 1 applvis dba 89874 Mar  3 23:56 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml
-rw-r--r-- 1 applvis dba 89874 Mar  3 23:36 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml.bk03mar2014
-rw-r--r-- 1 applvis dba 89874 Mar  4 00:39 /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml.bk04mar2013
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode -contextfile=$CONTEXT_FILE -mode=socket -port=9095 -runautoconfig=No
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChangeFormsMode_Tue_Mar_4_00_40_11_2014.log
Program : /u01/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl started @ Tue Mar  4 00:40:11 2014

*** Log File = /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChangeFormsMode_Tue_Mar_4_00_40_11_2014.log

Arguments passed: -contextfile=/u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml -mode=socket -port=9095 -runautoconfig=No


-----------
Values used
-----------
Context File   : /u02/inst/apps/VIS_oel57vis/appl/admin/VIS_oel57vis.xml
Mode           : socket
Port           : 9095
Run AutoConfig : No


Execute SYSTEM command : netstat -a


********************************
Backing up context file....
********************************
Context file backed up at: /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/Tue_Mar_4_00_40_11_2014/VIS_oel57vis.xml


********************************
Changing to Socket Mode.......
********************************
Updating context Variable s_forms_servlet_serverurl....
Updated context Variable s_forms_servlet_serverurl to
Updating context Variable s_frmConnectMode....
Updated context Variable s_frmConnectMode to socket
Updating context Variable s_formsstatus....
Updated context Variable s_formsstatus to disabled
Updating context Variable s_formsserver_status....
Updated context Variable s_formsserver_status to enabled
Updating context Variable s_other_service_group_status....
Updated context Variable s_other_service_group_status to enabled
Updating context Variable s_formsport....
Updated context Variable s_formsport to 9095
Updating context Variable s_formslauncher_path....
Updated context Variable s_formslauncher_path to OA_HTML/frmservlet


*********************************************************************************
You should run Autoconfig to update the runtime configurations to new Forms Mode.
*********************************************************************************

Log file to change the Forms Mode :
 /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChangeFormsMode_Tue_Mar_4_00_40_11_2014.log


Program : /u01/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl completed @ Tue Mar  4 00:40:28 2014

End of /u01/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChangeFormsMode.pl : No Errors encountered
[applvis@oel57vis scripts]$
[applvis@oel57vis scripts]$ grep s_frmConnectMode $CONTEXT_FILE
        socket
[applvis@oel57vis scripts]$ $INST_TOP/admin/scripts/adautocfg.sh
...

[applvis@oel57vis scripts]$ $INST_TOP/admin/scripts/adstrtal.sh apps/apps
...


[applvis@oel57vis scripts]$ $INST_TOP/admin/scripts/adformsrvctl.sh status

You are running adformsrvctl.sh  version 120.15.12010000.3

Checking status of FORMS Server (Socket Mode) ...

 Forms Server (Socket) is running as PID  6732


adformsrvctl.sh: exiting with status 0

adformsrvctl.sh: check the logfile /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.2/forms/socket.log for more information ...  

[applvis@oel57vis scripts]$ tail -n 15 $INST_TOP/logs/ora/10.1.2/forms/socket.log
Developer:Forms/LogRecord

[Tue Mar  4 01:13:38 2014 CST]::Server Start-up Data:
    Server Log Filename: /u02/inst/apps/VIS_oel57vis/logs/ora/10.1.2/forms/socket.log
    Server Hostname: oel57vis.example.com
    Server Port: 9095
    Server Pool: 1
    Server Process Id: 8530


03/04/14-01:13:38 :: adformsrvctl.sh: exiting with status 0


================================================================================
 
[applvis@oel57vis scripts]$

然后可以直接用如下URL测试登录(*我试了一下,只有一个什么都没有的空白页?):


http://oel57vis.example.com:8000/OA_HTML/frmservlet


不过在登录EBS打开一个form后,在JAVA 控制台可以看到"connectMode=Socket"的信息.



Oracle EBS - Forms Servlet与Socket模式比较

=====Servlet模式=====
R12默认使用Servlet模式;
Servlet基于HTTP/HTTPS,不需要额外的端口,可以不用额外配置就适应现有网络架构
Servlet由于要转换成HTTP/HTTPS,需要额外的带宽和负载开销
Servlet支持基于Windows系统的平台
一般适合在WAN(需要通过Internet接入)下使用

=====Socket模式=====
11i默认使用Socket模式
Socket需要额外端口,因此需要调整防火墙或者其他基础网络设置
Socket通过直接建立Socket连接,不需要转换成HTTP/HTTPS,能节省相对于Servlet模式多达40%的网络开销,而且使用更少的JVM资源(性能开销)
Socket不支持基于Windows系统的平台
一般适合在LAN(公司内部局域网或者VPN)下使用

FROM MY BLOG: http://blog.csdn.net/t0nsha/article/details/18095765


其间一个错误的解决方法:

错误:

[applvis@oel57vis scripts]$ ./adformsrvctl.sh start

You are running adformsrvctl.sh  version 120.15.12010000.3

Starting FORMS Server in Socket Mode...
Calling txkChkFormsDeployment.pl to check whether latest FORMSAPP.EAR is deployed...
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014.log
Program : /u01/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl started @ Tue Mar  4 00:48:13 2014

*** Log File = /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014.log

File "/u01/apps/tech_st/10.1.3/j2ee/forms/applications/forms/formsweb/WEB-INF/lib/frmsrv.jar" exists. Proceeding to check the size...

=================================================
*** Latest formsapp.ear has NOT been deployed ***
Deploying the latest EAR file...
=================================================


Program : /u01/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/txkChkFormsDeployment.pl completed @ Tue Mar  4 00:48:20 2014

Error while executing the perl script txkChkFormsDeployment.pl
/u02/inst/apps/VIS_oel57vis/logs/ora/10.1.2/forms/socket.log


adformsrvctl.sh: exiting with status 1

[applvis@oel57vis scripts]$ view /u02/inst/apps/VIS_oel57vis/logs/appl/rgf/TXK/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014/txkChkFormsDeployment_Tue_Mar_4_00_48_12_2014.log
...

======================
Inside manageOpmn()...
======================


*** OPERATION is reload ***

Execute SYSTEM command : /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl reload

/u01/apps/tech_st/10.1.3/opmn/bin/opmnctl: line 1150: /d2/R12/ab/apps/R1211XB9/apps/tech_st/10.1.3/opmn/bin/opmn: No such file or directory
opmnctl: opmn is not running.
...


解决:

[applvis@oel57vis scripts]$ cp /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl.bk04mar2013
[applvis@oel57vis scripts]$ vim /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl
[applvis@oel57vis scripts]$ diff /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl /u01/apps/tech_st/10.1.3/opmn/bin/opmnctl.bk04mar2013
26,28c26
< #Unable To Deploy Ear File (Doc ID 1602344.1)
< . /u01/apps/apps_st/appl/APPSVIS_oel57vis.env
< # ORACLE_HOME=/d2/R12/ab/apps/R1211XB9/apps/tech_st/10.1.3; export ORACLE_HOME

---
> ORACLE_HOME=/d2/R12/ab/apps/R1211XB9/apps/tech_st/10.1.3; export ORACLE_HOME
30c28
< # TNS_ADMIN=${TNS_ADMIN="/d2/R12/ab/apps/R1211XB9/apps/tech_st/10.1.3/network/admin"}; export TNS_ADMIN
---
> TNS_ADMIN=${TNS_ADMIN="/d2/R12/ab/apps/R1211XB9/apps/tech_st/10.1.3/network/admin"}; export TNS_ADMIN
[applvis@oel57vis scripts]$


参考:

Unable To Deploy Ear File (Doc ID 1602344.1)


--EOF--


6. 将 数据库的listener port由 默认的 1521改为  1522。(hint: 参考 metalink note :338003.1 )

查看数据库的当前监听端口:

[oravis@oel57vis ~]$ lsnrctl status VIS

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAR-2014 22:19:20

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel57vis.example.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     VIS
Version                   TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date                04-MAR-2014 22:07:42
Uptime                    0 days 0 hr. 11 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u03/db/tech_st/11.1.0/network/admin/VIS_oel57vis/listener.ora
Listener Log File         /u03/db/tech_st/11.1.0/log/diag/tnslsnr/oel57vis/vis/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1521)))
Services Summary...
Service "VIS" has 2 instance(s).
  Instance "VIS", status UNKNOWN, has 1 handler(s) for this service...
  Instance "VIS", status READY, has 1 handler(s) for this service...
Service "VIS_XPT" has 1 instance(s).
  Instance "VIS", status READY, has 1 handler(s) for this service...
The command completed successfully
[oravis@oel57vis ~]$ netstat -natulp | grep tns
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:1521                0.0.0.0:*                   LISTEN      6373/tnslsnr        
tcp        0      0 192.168.10.200:1521         192.168.10.200:22974        ESTABLISHED 6373/tnslsnr        
[oravis@oel57vis ~]$

修改数据库的监听端口为1522:

1. Deregister the current database server (Required)

[oravis@oel57vis ~]$ ls -l $CONTEXT_FILE*
-rwxr-xr-x 1 oravis dba 12575 Feb 15 12:31 /u03/db/tech_st/11.1.0/appsutil/VIS_oel57vis.xml
-rwxr-xr-x 1 oravis dba 12575 Mar  4 22:22 /u03/db/tech_st/11.1.0/appsutil/VIS_oel57vis.xml.bk03mar2014.2222
[oravis@oel57vis ~]$ perl $ORACLE_HOME/appsutil/bin/adgentns.pl appspass=apps contextfile=$CONTEXT_FILE -removeserver
##########################################################################
                   Generate Tns Names
##########################################################################
    Classpath                   : :/u03/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/u03/db/tech_st/11.1.0/appsutil/java/xmlparserv2.jar:/u03/db/tech_st/11.1.0/appsutil/java:/u03/db/tech_st/11.1.0/jlib/netcfg.jar:/u03/db/tech_st/11.1.0/jlib/ldapjclnt11.jar

Loading ORACLE_HOME environment from /u03/db/tech_st/11.1.0
Logfile: /u03/db/tech_st/11.1.0/appsutil/log/VIS_oel57vis/03042223/NetServiceHandler.log

adgentns.pl exiting with status 0
ERRORCODE = 0 ERRORCODE_END
[oravis@oel57vis ~]$


2. Update the AutoConfig Context files (conditional)
2.1 DB Tier: Update the context file as below :

[oravis@oel57vis ~]$ cd $ORACLE_HOME/appsutil
[oravis@oel57vis appsutil]$ sed -i.bk1521 's/1521/1522/g' VIS_oel57vis.xml
[oravis@oel57vis appsutil]$ diff VIS_oel57vis.xml VIS_oel57vis.xml.bk1521
66c66
<          <dbport oa_var="s_dbport" oa_type="PORT" base="1522" step="1" range="-1" label="Database Port">1522</dbport>
---
>          <dbport oa_var="s_dbport" oa_type="PORT" base="1521" step="1" range="-1" label="Database Port">1521</dbport>
87c87
<          <cmanport oa_var="s_cmanport" oa_type="EXT_PORT" base="1522" step="1" range="-1" label="Oracle Connection Manager Port">1522</cmanport>
---
>          <cmanport oa_var="s_cmanport" oa_type="EXT_PORT" base="1521" step="1" range="-1" label="Oracle Connection Manager Port">1521</cmanport>
[oravis@oel57vis appsutil]$


2.2 Applications Tier: Update the existing Applications Tier Context file on all APPL_TOP nodes
Change the values "Data Server Host" and "Database Port" in the Applications Tier Context file on all APPL_TOP nodes.
[applvis@oel57vis ~]$ cd $INST_TOP/appl/admin/
[applvis@oel57vis admin]$ sed -i.bk1521 's/1521/1522/g' VIS_oel57vis.xml
[applvis@oel57vis admin]$ diff VIS_oel57vis.xml VIS_oel57vis.xml.bk1521
269c269
<          <jdbc_url oa_var="s_apps_jdbc_connect_descriptor">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=VIS)))</jdbc_url>
---
>          <jdbc_url oa_var="s_apps_jdbc_connect_descriptor">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=VIS)))</jdbc_url>
753c753
<       <dbport oa_var="s_dbport" oa_type="EXT_PORT" base="1522" step="1" range="-1" label="Database Port">1522</dbport>
---
>       <dbport oa_var="s_dbport" oa_type="EXT_PORT" base="1521" step="1" range="-1" label="Database Port">1521</dbport>
785c785
<       <cmanport oa_var="s_cmanport" label="Oracle Connection Manager Port">1522</cmanport>
---
>       <cmanport oa_var="s_cmanport" label="Oracle Connection Manager Port">1521</cmanport>
[applvis@oel57vis admin]$


3. Shutdown the Applications Tier Services (Required)
[applvis@oel57vis admin]$ $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
...

4. Reseed the Net Services Topology Model (Required)
4.1 Run AutoConfig on the Database Tier (Required)

[oravis@oel57vis appsutil]$ cd $ORACLE_HOME/appsutil/bin/
[oravis@oel57vis bin]$ ./adconfig.sh contextfile=$ORACLE_HOME/appsutil/$CONTEXT_NAME.xml
...


4.2 Run AutoConfig on the Applications Tier(s) (Required)
[applvis@oel57vis admin]$ $ADMIN_SCRIPTS_HOME/adautocfg.sh appspass=apps
...


5. Shutdown the Database Listener (required)
[oravis@oel57vis bin]$ $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/addlnctl.sh stop $ORACLE_SID
Logfile: /u03/db/tech_st/11.1.0/appsutil/log/VIS_oel57vis/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Shutting down listener process VIS ...


LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAR-2014 23:33:03

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel57vis.example.com)(PORT=1522)))
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u03/db/tech_st/11.1.0/appsutil/log/VIS_oel57vis/addlnctl.txt for more information ...  

[oravis@oel57vis bin]$


6. Start the DB TNS Listener (required)
[oravis@oel57vis bin]$ $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/addlnctl.sh start $ORACLE_SID
Logfile: /u03/db/tech_st/11.1.0/appsutil/log/VIS_oel57vis/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Starting listener process VIS ...


LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAR-2014 23:33:29

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Starting /u03/db/tech_st/11.1.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.7.0 - Production
System parameter file is /u03/db/tech_st/11.1.0/network/admin/VIS_oel57vis/listener.ora
Log messages written to /u03/db/tech_st/11.1.0/admin/VIS_oel57vis/diag/tnslsnr/oel57vis/vis/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1522)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel57vis.example.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     VIS
Version                   TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date                04-MAR-2014 23:33:30
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u03/db/tech_st/11.1.0/network/admin/VIS_oel57vis/listener.ora
Listener Log File         /u03/db/tech_st/11.1.0/admin/VIS_oel57vis/diag/tnslsnr/oel57vis/vis/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1522)))
Services Summary...
Service "VIS" has 1 instance(s).
  Instance "VIS", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u03/db/tech_st/11.1.0/appsutil/log/VIS_oel57vis/addlnctl.txt for more information ...  

[oravis@oel57vis bin]$ netstat -natulp | grep tns
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:1522                0.0.0.0:*                   LISTEN      17762/tnslsnr       
[oravis@oel57vis bin]$ tnsping VIS

TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 04-MAR-2014 23:35:44

Copyright (c) 1997, 2008, Oracle.  All rights reserved.

Used parameter files:
/u03/db/tech_st/11.1.0/network/admin/VIS_oel57vis/sqlnet_ifile.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=oel57vis.example.com)(PORT=1522)) (CONNECT_DATA= (SID=VIS)))
OK (0 msec)
[oravis@oel57vis bin]$


7. Start the Applications Tier Services
[applvis@oel57vis admin]$ $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps
...

然后提交Active User request进行sanity test.


至此, 数据库监听端口成功修改.


参考:

adclonectx.pl error: ensure that Classpath is set properly
http://oradbapp.blogspot.com/2013/11/adclonectxpl-error-ensure-that.html


--EOF--

这篇关于Oracle Applications DBA 基础(第二期)Week 04 exercise的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/792334

相关文章

Oracle查询优化之高效实现仅查询前10条记录的方法与实践

《Oracle查询优化之高效实现仅查询前10条记录的方法与实践》:本文主要介绍Oracle查询优化之高效实现仅查询前10条记录的相关资料,包括使用ROWNUM、ROW_NUMBER()函数、FET... 目录1. 使用 ROWNUM 查询2. 使用 ROW_NUMBER() 函数3. 使用 FETCH FI

数据库oracle用户密码过期查询及解决方案

《数据库oracle用户密码过期查询及解决方案》:本文主要介绍如何处理ORACLE数据库用户密码过期和修改密码期限的问题,包括创建用户、赋予权限、修改密码、解锁用户和设置密码期限,文中通过代码介绍... 目录前言一、创建用户、赋予权限、修改密码、解锁用户和设置期限二、查询用户密码期限和过期后的修改1.查询用

Oracle数据库使用 listagg去重删除重复数据的方法汇总

《Oracle数据库使用listagg去重删除重复数据的方法汇总》文章介绍了在Oracle数据库中使用LISTAGG和XMLAGG函数进行字符串聚合并去重的方法,包括去重聚合、使用XML解析和CLO... 目录案例表第一种:使用wm_concat() + distinct去重聚合第二种:使用listagg,

oracle中exists和not exists用法举例详解

《oracle中exists和notexists用法举例详解》:本文主要介绍oracle中exists和notexists用法的相关资料,EXISTS用于检测子查询是否返回任何行,而NOTE... 目录基本概念:举例语法pub_name总结 exists (sql 返回结果集为真)not exists (s

MySQL中my.ini文件的基础配置和优化配置方式

《MySQL中my.ini文件的基础配置和优化配置方式》文章讨论了数据库异步同步的优化思路,包括三个主要方面:幂等性、时序和延迟,作者还分享了MySQL配置文件的优化经验,并鼓励读者提供支持... 目录mysql my.ini文件的配置和优化配置优化思路MySQL配置文件优化总结MySQL my.ini文件

Oracle的to_date()函数详解

《Oracle的to_date()函数详解》Oracle的to_date()函数用于日期格式转换,需要注意Oracle中不区分大小写的MM和mm格式代码,应使用mi代替分钟,此外,Oracle还支持毫... 目录oracle的to_date()函数一.在使用Oracle的to_date函数来做日期转换二.日

oracle数据库索引失效的问题及解决

《oracle数据库索引失效的问题及解决》本文总结了在Oracle数据库中索引失效的一些常见场景,包括使用isnull、isnotnull、!=、、、函数处理、like前置%查询以及范围索引和等值索引... 目录oracle数据库索引失效问题场景环境索引失效情况及验证结论一结论二结论三结论四结论五总结ora

Oracle Expdp按条件导出指定表数据的方法实例

《OracleExpdp按条件导出指定表数据的方法实例》:本文主要介绍Oracle的expdp数据泵方式导出特定机构和时间范围的数据,并通过parfile文件进行条件限制和配置,文中通过代码介绍... 目录1.场景描述 2.方案分析3.实验验证 3.1 parfile文件3.2 expdp命令导出4.总结

Oracle数据库执行计划的查看与分析技巧

《Oracle数据库执行计划的查看与分析技巧》在Oracle数据库中,执行计划能够帮助我们深入了解SQL语句在数据库内部的执行细节,进而优化查询性能、提升系统效率,执行计划是Oracle数据库优化器为... 目录一、什么是执行计划二、查看执行计划的方法(一)使用 EXPLAIN PLAN 命令(二)通过 S

零基础学习Redis(10) -- zset类型命令使用

zset是有序集合,内部除了存储元素外,还会存储一个score,存储在zset中的元素会按照score的大小升序排列,不同元素的score可以重复,score相同的元素会按照元素的字典序排列。 1. zset常用命令 1.1 zadd  zadd key [NX | XX] [GT | LT]   [CH] [INCR] score member [score member ...]