Oracle Applications DBA 基础(二)

6.OAM及系统管理

2014913

20:40

参考资料:

 

1.Oracle Applications System Administrator's Guide - Configuration

http://download.oracle.com/docs/... acrobat/120sacg.pdf

 

2.Oracle Applications System Administrator's Guide - Maintenance

http://download.oracle.com/docs/... acrobat/120samg.pdf

 

3.Oracle Applications System Administrator's Guide - Security

http://download.oracle.com/docs/... acrobat/120sasg.pdf

 

4.Oracle 11i System Administrator Fundamentals

 

 

OracleApplicatinons Manager (OAM) 是一个 R12 的GUI管理工具,通常感兴趣的地方有

site map

dashboard

checkingpatch applied

runautoconfig

 

OAM的内容丰富。Oracle对GUI管理工具也在不断改善,所以值得去看,尝试使用。

 

 

=======================

R12 8-系统管理

-----------------

 

系统管理通常不是 DBA 的职责,另有专人负责,不过我觉得DBA 了解基本的内容也是需要的。一方面在

自己学习的过程中,方便学习。比如说要开发一个custom的concurrentprogram,写好

程序后你也要会将它连到R12中,这就需要system administration的知识。

 

另外,在performancetuning 的过程中, 如果要给用户一个好的体验,system administration

方面的知识也很重要,比如说concurrent manager。如果只是看 CPU/Memory 又或者 数据库性能,

你可能只是看到系统很忙,资源不够,不过,如果你熟悉concurrent manager, 你还可以看看

processesnumber that the concurrent manager defines, what's the workshifts ,

what'sthe cache size . 另外, 还可以看看有什么负责purge 过期数据的concurrent request有没有

在系统schedule。这些东西都会影响系统性能,影响用户的体验。

 

 

下面列出一些我觉得重要的systemadmin 方面的知识,具体的内容可参考上面列出的参考资料。

 

1.Security 方面的内容:

这包括function security,responsibility,data group,data security 的概念。

 

OracleApplications 里面的security 的结构大致如下:

 

FND user=> responsibility => request group

                       => menu   => function

                                 => menu=> function

 

 

                       => data group =>applications <=> Oracle ID  =>tables

                                          ||

                                          formsand programs

 

2. 有关user managment 方面的内容。

 

3. 有关profile option 方面的内容。

 

profileoption 大致相当于程序中的 global variable,它的scope 可以有以下几种:

   user level

   responsibility level

   application level

   site level

   ( Server , Organization level)

 

它的内容可以在以下表内查看:

fnd_profile_options

fnd_profile_options_tl

fnd_profile_option_values

 

大量的R12的设置由ProfileOption 决定,所以需要了解。

 

4. 有关Flexfield 方面的内容。

Flexfields包括如下两种:

-Descriptive Flexfields (DFF) : ATTRIBUTE1 .. n in tables

- KeyFlexfields (KFF) : eg. GL_CODE_COMBINATIONS ( CODE_COMBINATION_ID + SEGMENT1 +...)

 

5. 有关concurrent manager 方面的内容。

 

6. 有关printer setup and report generation 方面的内容。






7.Concurrent Processing

2014913

20:42

参考资料:

 

1.Oracle Applications System Administrator's Guide - Configuration

http://download.oracle.com/docs/... acrobat/120sacg.pdf

 

2.Oracle Applications System Administrator's Guide - Maintenance

http://download.oracle.com/docs/... acrobat/120samg.pdf

 

3.Oracle 11i System Administrator Fundamentals

 

4.Oracle Applications Developer's Guide

http://download.oracle.com/docs/... acrobat/120devg.pdf

 

并发处理 (Concurrent process) 和 并发管理器(Concurrent Manager) 是R12中负责

处理批作业 或后台作业的。 用的地方很多,所以需要多花点时间理解。

 

ConcurrentManager 管理的基础知识,比如 start/stop,output and logfile location 等,

前面已提及。

 

下面只是列出一些常用的内容,可以帮助理解concurrentmanager。

 

=====================================================

# 如何从 concurrent request id  找到 Oracle session id (sid)

 

很多时候我们需要从concurrent request 的request id 找到对应的

Oraclesession id (sid),可以用下面的方法, 由此我们也可了解

concurrentmanager 对应的 table 结构。

 

 

#当前正在运行的 concurrent request:

 

selectrequest_id, controlling_manager,  phase_code 

fromfnd_concurrent_requests  

wherephase_code='R';

 

# 根据request id 找到 对应的<controlling_manager>

selectrequest_id, controlling_manager,  phase_code 

fromfnd_concurrent_requests  

whererequest_id = <request_id>;

 

# 根据 <controlling_manager> 找到对应的<ORACLE_PROCESS_ID>

selectOS_PROCESS_ID, ORACLE_PROCESS_ID 

fromfnd_concurrent_processes 

whereCONCURRENT_PROCESS_ID = <controlling_manager>;

 

# 根据 <ORACLE_PROCESS_ID> 就知道 SID

selecta.sid ,b.spid from v$session a , v$process b 

whereb.addr=a.paddr and b.pid = <ORACLE_PROCESS_ID>;

 

# 另外一种SQL query 方法:

selectsession_id from fnd_concurrent_processes 

whereCONCURRENT_PROCESS_ID = <controlling_manager>;

 

selectsid from v$session where audsid=<session_id>;

 

===========================================

# 统计 每个program 对应完成的 request 数量:

 

selecta.concurrent_program_id , b.CONCURRENT_PROGRAM_NAME, count(1) 

fromfnd_concurrent_requests a, fnd_concurrent_programs b

wherea.concurrent_program_id = b.concurrent_program_id

group bya.concurrent_program_id,b.CONCURRENT_PROGRAM_NAME;

 

===============================================

# 列出concurrent program的种类

 

colLOOKUP_CODE for a10

colmeaning for a60

 

selectlv.lookup_code, lv.meaning from fnd_lookup_values lv

wherelv.lookup_type='CP_EXECUTION_METHOD_CODE' and language='US' order by 1;

 

# 列出concurrent program的种类对应的数量

selectlv.meaning , count(*) from fnd_lookup_values lv,

fnd_concurrent_programscp where lv.lookup_type='CP_EXECUTION_METHOD_CODE' and

language='US'and lv.lookup_code=cp.execution_method_code

group bylv.meaning order by 2;

 

selectcp.enabled_flag,lv.meaning , count(*) cp_count

fromfnd_lookup_values lv,fnd_concurrent_programs cp 

wherelv.lookup_type='CP_EXECUTION_METHOD_CODE' and

language='US'and lv.lookup_code=cp.execution_method_code

group bycp.enabled_flag,lv.meaning

order bycp.enabled_flag, cp_count;

 

==========================================================

#列出正在运行的 concurrent manager processes: 

 

selectCONCURRENT_QUEUE_NAME, control_code, running_processes, max_processes 

fromfnd_concurrent_queues 

whererunning_processes != 0

 

========================

# statuscode 对应的解释 <297909.1>

 

selectlookup_type,lookup_code, meaning from fnd_lookups 

wherelookup_type like 'CP_%';

 

#fnd_concurrent_processes 的 status_code

 

selectlookup_code, meaning from fnd_lookups 

wherelookup_type='CP_PROCESS_STATUS_CODE'

 

 

#如何手动停掉正在运行的 Concurrent Request <154688.1> 

 

updatefnd_concurrent_requests set status_code='C',phase_code='c' 

whererequest_id=4374195;

 

#<152763.1> , in that case, set status_code='X'

# checkthe meaning of status_code of requests from the note above

 

updatefnd_concurrent_requests set status_code='C' ,phase_code='C' 

whererequest_id = 2722233;

 

# TheOracle server process might become runaway. 

# findout the sid first to kill it manully if needed.

 

==================================

#如何在命令行上提交 concurrent request

 

CONCSUBapps/apps SYSADMIN "System Administrator" SYSADMIN WAIT=N CONCURRENTFND cusupt3 PROGRAM_NAME="custom update 3"

 

"cusupt3":concurrent executable in $FND_TOP/bin

 

 

# 如何trace concurrent program

===================================

metalinknote: 453527.1

 

1.concurrent program => define => "Enable Trace" 

 

2.Profiles => System => Concurrent:Allow Debugging

 

3.submit request => Debug Options

 

 

# 各种 不同的concurrent programs

ConcurrentProgram 可以用不同的方式构成, 既可以用 shell,PL/SQL, C, JAVA 等

语言,也可以用Oracle Reports,SQL*loader 等工具。下面逐一介绍。

====================================== 

example1 : shell concurrent program

=======================================

 

cd$FND_TOP/bin

viWH1TEST.prog

 

cat./WH1TEST.prog

===========================

#!/bin/ksh

./applvis/apps/apps_st/appl/APPSVIS_mis.env

 

sqlplusapps/apps@VIS <<EOF

EOF

echo"END"

=========================

 

chmod +xWH1TEST.prog

 

### passparameter as separate variable

 

ln -s$FND_TOP/bin/fndcpesr WH1TEST

 

然后,在R12中逐一定义如下内容:

concurrentexecutable 

concurrentprogram 

Responsibility: Request 

requestgroup (system Administrator Reports)

 

## startconcurrent program "WH1TEST" manually

CONCSUBapps/apps SYSADMIN "System Administrator" SYSADMIN WAIT=N CONCURRENTFND WH1TEST PROGRAM_NAME="WH1TEST"

 

selectCONCURRENT_PROGRAM_NAME, PROGRAM_TYPE from 

fnd_concurrent_programswhere concurrent_program_name likE '%WH1%';

 

====================================================================

 

 

example2: c & pro*c concurrent program

========================================

基本上参考 metalink <113428.1>。因为内容比较长,不在这里列出。

 

example3: report concurrent program

===================================

这里只是copy现成的一个test Oracle Report 做示范。

cd$FND_TOP/reports/US

 

Note:the report file should be in US directory.

 

cp/applvis/apps/tech_st/10.1.2/reports/samples/demo/test.rdf ./WH1RPTCP.rdf

 

[applvis@misUS]$ pwd

/applvis/apps/apps_st/appl/fnd/12.0.0/reports/US

[applvis@misUS]$ ls -l WH1*

-rw-r--r--  1applvis dba 98304 Aug  9 17:40 WH1RPTCP.rdf

[applvis@misUS]$

 

thenregister this rdf as in other cases of the concurrent testing program

use"WH1RPTCP" as the Execution file name. (note: without the .rdfsuffix)

 

but inthe "define" part, choose "pdf" as output format .

=================================================

 

example4: PL/SQL concurrent program

===================================

参考 metalink <73492.1>

 

[oravis@mis~]$ cat plconc.sql

createor replace procedure WH1plcp(errbuf out varchar2, retcode out varchar2) as

begin

fnd_file.put_line(FND_FILE.LOG,'WH1plcp begins');

fnd_file.put_line(FND_FILE.OUTPUT,'WH1plcp output');

insertinto t1 values('WH1PLCP');

commit;

fnd_file.put_line(FND_FILE.LOG,'WH1plcp ends');

end;

/

[oravis@mis~]$

 

###submit conc request in PL/SQL

### ref<221542.1> 

### notethat CONC_REQUEST_ID returns -1. <878636.1> 

declare

v_idnumber;

v_id2number;

begin

--(user_id,responsibility_id, app_resp_id) 

--(sysadmin,system administrator, application system admin)

 

fnd_global.apps_initialize(0,20420,1);

 

--(appshort name, conc program short name )

v_id :=APPS.FND_REQUEST.SUBMIT_REQUEST('FND','FNDSCURS');

v_id2 :=FND_GLOBAL.CONC_REQUEST_ID;

commit;

dbms_output.put_line(v_id);

dbms_output.put_line(v_id2);

end;

 

### findout relevant info

select *from fnd_application_tl where application_id = 1 ;

select *from fnd_user where user_name ='SYSADMIN' ;

select *from fnd_responsibility_tl where responsibility_name = 'System Administrator';

select *from fnd_user_resp_groups where user_id = 0 ;

select *from fnd_conc_req_summary_v where program_short_name='FNDSCURS';

select *from fnd_conc_req_summary_v where request_id=  314020 ;

###check the stauts of an conc request

 

declare

l_req_idnumber;

l_phasevarchar2(30);

l_statusvarchar2(30);

l_dev_statusvarchar2(30);

l_dev_phasevarchar2(30);

l_msgvarchar2(2000);

statusboolean;

begin

l_req_id:= 314021  ;

  status:=fnd_concurrent.get_request_status(REQUEST_ID=>l_req_id, 

  PHASE=>l_phase, STATUS=>l_status, DEV_PHASE => l_dev_phase, 

  DEV_STATUS=> l_dev_status, MESSAGE => l_msg ) ; 

dbms_output.put_line(l_req_id||':'||l_phase||':'||l_status||':'||l_dev_phase||':'||l_dev_status);

end;

/

 

 

#####################################

example5: SQL*loader Concurrent program

========================================

vi .ctlfile in $PRODUCT_TOP/bin

 

 

example6: Java concurrent program

=================================================

参看 metalink <250964.1>

 

cd $JAVA_TOP/oracle/apps/fnd/cp

mkdirsample

 

viHello.java

################################

packageoracle.apps.fnd.cp.sample;

importoracle.apps.fnd.cp.request.*;

 

publicclass Hello implements JavaConcurrentProgram {

publicstatic final String RCS_ID = "$Header$";

publicvoid runProgram (CpContext ctx) {

ctx.getLogFile().writeln("--Hello World!--",0);

ctx.getOutFile().writeln("--Hello World!--");

ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL,"");

}

}

 

###########################

 

javac$JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java

 

ls -l$INST_TOP/appl/fnd/12.0.0/secure/VIS.dbc

 

[applvis@missample]$ which java

/applvis/apps/tech_st/10.1.3/appsutil/jdk/jre/bin/java

 

java-Ddbcfile=$INST_TOP/appl/fnd/12.0.0/secure/VIS.dbc \

-Drequest.outfile=./outfile\

oracle.apps.fnd.cp.request.Run\

oracle.apps.fnd.cp.sample.Hello

 

#在R12中作如下设置:

executable:WH1JAVACP

program:WH1JAVACP

security> responsiblity > request

 

 

###另一个版本

catHello.java

 

packageoracle.apps.fnd.cp.sample;

importoracle.apps.fnd.cp.request.*;

importoracle.apps.fnd.util.*;

importjava.io.*;

importjava.sql.*;

 

publicclass Hello implements JavaConcurrentProgram {

publicstatic final String RCS_ID = "$Header$";

Stringc1Var ;

publicvoid runProgram (CpContext ctx) {

c1Var="HI";

ctx.getLogFile().writeln("--Hello World!--",0);

ctx.getOutFile().writeln("--Hello World!--");

ConnectionmJConn = ctx.getJDBCConnection();

ParameterListlPara = ctx.getParameterList();

ReqCompletionlRC = ctx.getReqCompletion();

StringlQuery = "select c1 from t1 where c1 = ?";

while(lPara.hasMoreElements() )

{

  NameValueType aNVT = lPara.nextParameter();

  c1Var = aNVT.getValue();

}

  try{

   PreparedStatement lStmt = mJConn.prepareStatement(lQuery);

   lStmt.setString(1, c1Var);

   ResultSet lRs = lStmt.executeQuery();

  OutFilelOF = ctx.getOutFile();

  LogFilelLF = ctx.getLogFile();

  while  (lRs.next() )

  {

   lOF.writeln(lRs.getString(1));

  }

  lStmt.close();

ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL,"");

  }

  catch(SQLException e) {

  lRC.setCompletion(ReqCompletion.ERROR,e.toString());

  }

  finally{

  ctx.releaseJDBCConnection();

}

}

}

 

 

java-Ddbcfile=$INST_TOP/appl/fnd/12.0.0/secure/VIS.dbc \

-Drequest.outfile=./outfile\

oracle.apps.fnd.cp.request.Run\

oracle.apps.fnd.cp.sample.Hello\

"TOKEN1=HI"





8.Custom Application Integration

2014913

20:42

OracleApplications 比较灵活,易于做客户化开发。虽然DBA 通常不需要做开发, 但我觉得

了解客户化过程也很有帮助,因为可因此了解Oracle其他模块的开发方式和标准。

 

因为大家都遵循同样的开发标准,做过一次,就会熟悉,比如说,File system 里product 的目录结构,

adadmin的维护任务等等。

 

参考资料:

 

1.Oracle Applications Developer's Guide

http://download.oracle.com/docs/... acrobat/120devg.pdf

 

2.<176852.1>Integrating Custom Applications with Oracle ApplicationsRelease 11i 

 

3.<70167.1> Step by Step guide to Creating a C or Pro*C StandaloneConcurrent program 

forOracle applications

 

4.<70228.1> Running a Shell script as a Concurrent Program

 

复杂一点的开发可能用C/JAVA之类,如上面的metalink涉及的,简单的客户化可以只是一个

SQLstatement。





9.FNDCPASSFND_STATS和FNDLOAD 

2014913

20:43

11 和 12节 介绍 Oracle Applications 里几种常用的工具, FNDCPASS, FND_STATS,

FND_LOAD.

 

 

FNDCPASS 是用来修改fnd_user和fnd_oracle_userid上面用户的密码的。

### 例子1: 修改 apps 用户的password

 

shutdownapps tier,

 

FNDCPASSapps/apps 0 Y system/manager SYSTEM APPLSYS password

 

然后 运行AUTOCONFIG, 再start app tier 。

 

### 例子 2: 修改 sysadmin  用户的password

不用shutdown app tier,

 

FNDCPASSapps/password 0 Y system/manager USER SYSADMIN password

 

然后restart apache, forms, reports, 806 listener, and cm 

 

### 例子3: 修改 gl, pa, etc. 用户的password

不用shutdown app tier

 

FNDCPASSapps/password 0 Y system/manager ALLORACLE password

 

 

FNDLOAD可以用来在不同的环境中copy configuration。例如,业务人员可能在

UAT设好config,可以用这个工具download 下来再传给Production,这样就避免

人工输入可能出现的错误。下面举几个例子:

 

- UsingFNDLOAD to download Concurrent Program definition 

 

selectAPPLICATION_ID, CONCURRENT_PROGRAM_NAME 

fromfnd_concurrent_programs 

whereCONCURRENT_PROGRAM_NAME='FNDSCURS';

 

selectAPPLICATION_SHORT_NAME 

fromfnd_application where APPLICATION_ID = 0;

 

###download the definition to file myACTIVEUSER.ldt

FNDLOADapps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct myactiveuser.ldtPROGRAM APPLICATION_SHORT_NAME="FND"CONCURRENT_PROGRAM_NAME="FNDSCURS"

 

- UsingFNDLOAD to download Lookup type and its value <419136.1>

selectLOOKUP_TYPE from FND_LOOKUP_TYPES  where lookup_type like 'FND%'order by 1

 

FNDLOADapps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct mylookup.ldtFND_LOOKUP_TYPE VIEW_APPSNAME=FND LOOKUP_TYPE="FND_CP_PROGRAM_TYPE"

 

 

- UsingFNDLOAD to download profile options set on responsibiity level <566865.1>

 

selectRESPONSIBILITY_KEY from FND_RESPONSIBILITY ;

selectPROFILE_OPTION_NAME 

fromFND_PROFILE_OPTIONS 

wherePROFILE_OPTION_NAME like 'FND%'  ;

selectUSER_PROFILE_OPTION_NAME 

fromFND_PROFILE_OPTIONS_VL 

whereUSER_PROFILE_OPTION_NAME like 'FND%';

 

FNDLOADapps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct myresp.ldtFND_RESPONSIBILITY RESP_KEY="SYSTEM_ADMINISTRATOR"

 

FNDLOADapps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct myprofile.ldtPROFILE PROFILE_NAME="ICX_SESSION_TIMEOUT"APPLICATION_SHORT_NAME="ICX" 

FNDLOADapps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct myprofile.ldtPROFILE PROFILE_NAME="FND_DIAGNOSTICS"APPLICATION_SHORT_NAME="FND" 

 

 

===========================================

 

 

12.statistics

=======================================================

 

OracleApplications 并不直接用 DBMS_STATS 来 收集数据库的statistics,而是用自己的工具

FND_STATS。

 

例子如下:

#sqlplus apps/<apps_pwd>

SQL>exec fnd_stats.gather_schema_statistics('MRP');                   <- One schema

SQL>exec fnd_stats.gather_schema_statistics('ALL');                   <- All schemas

SQL>exec fnd_stats.gather_table_stats('MRP','MRP_FORECAST_DATES'); <- One table

 

SQL>begin                                                           <-Partitioned table

  2     fnd_stats.gather_table_stats(ownname    => 'APPLSYS',

  3                                tabname     =>'WF_ITEM_ACTIVITY_STATUSES',

  4                                granularity => 'PARTITION');

  5  end;

  6  /

 

selectPARTITION_NAME from all_tab_partitions where upper(TABLE_NAME) ='GL_JE_LINES';

 

execFND_STATS.GATHER_TABLE_STATS('GL','GL_JE_BATCHES',10,8,NULL,'NOBACKUP',TRUE,'GLOBAL');

execFND_STATS.GATHER_TABLE_STATS('GL','GL_JE_HEADERS',10,8,NULL,'NOBACKUP',TRUE,'GLOBAL');

 

execapps.FND_STATS.GATHER_TABLE_STATS('GL','GL_JE_LINES',10,8,'JAN09','NOBACKUP',TRUE,'PARTITION');

 

###check global stats

selecttable_name, last_analyzed from dba_tables where table_name ='GL_JE_LINES'

###gather table stats

execapps.FND_STATS.GATHER_TABLE_STATS('GL','GL_JE_LINES',10,8,NULL,'NOBACKUP',TRUE,'ALL');

 

###check which columns do histogram                            

selecttable_name,column_name,hsize from applsys.fnd_histogram_cols;

 

 

参考资料:

<419728.1>How To Gather Statistics On Oracle Applications 11.5.10(and above)

<169935.1>Troubleshooting Oracle Applications Performance Issues

<429002.1>histogram collection





10. 性能调整基础

2014913

20:44

性能影响用户对系统的体验,所以显得很重要,不过因为涉及的地方比较多,

很难一下掌握,下面只是对于OracleApplications,列出一些通常注意的地方,

包括从应用服务器到后台数据库。

 

性能调整自然会涉及不同的参数,具体要设什么值,就要看具体情况具体分析。

 

1.应用服务器( technology stack)方面

 

Technologystack 方面的范围也比较广, 下面分点列出.

 

1.1 JVM

 

OracleApplications 11i 和 R12 都有着 大量的功能用 Java 实现, 所以JVM的调优要考虑,

但一般来说,不是太复杂。主要要点:

 

- JVM的数量

Bydefault, R12 有如下的JVM:

[applvis@misscripts]$ ./adopmnctl.sh status|grep OC4J

OC4JGroup:default_group         | OC4J

afm         |    5552 | Alive

OC4JGroup:default_group         | OC4J:forms        |    5459 | Alive

OC4JGroup:default_group         | OC4J

acore       |    5365 | Alive

 

一般来说,不用启动太多的JVM,因为Java 是multi thread的, 所以Oracle建议有俩个CPU 

才用一个JVM,但如果你的connection数量非常大,也有很多CPU, 就可以考虑是否需要

增加 JVM的数量。Oracle 建议一个JVM 服务不超过100个 active connection。 

 

如果想看详细点JVM的运行情况,你可以做threaddump ( kill -3 ) 来看当前thread 的状态。

 

-合理的memory配置

主要就是heapsize (XMX, XMS)的设置,我见过设得太大,导致系统出现paging,

以致很慢的,也见过设得太小, 导致 OOM error 和 GC 很忙的。所以,设置要适中。

 

其他还有一些JVM的参数,比如,stacksize,perm size , new size, new/old ratio, 

parallelcollection 等等,就和你用的JVM有关 (AIX, Sun 的之类),比较复杂, 

一般先用default值看看。

 

如果想看详细点,就要根据 Garbage Collection的情况。这是所有JVM tuning 都一样的,

R12也没什么不同。

 

GC的信息在jvm log 中,参见有关的jvm_start_options。

-Xloggc:/u02/inst/apps/PROD_mis/logs/ora/10.1.3/opmn/jvmoacore.log-XX:+PrintGCDetails

 

 

1.2.Apache

有关Apache 的常用的参数如下。

 

Timeout 

Keeplive 

MinSpareServers5

MaxSpareServers10

StartServers3

MaxClients512

LogLevel

SSLLogLevel

 

 

1.3 JDBC

DBC file( $INST_TOP/appl/fnd/12.0.0/secure/prod.dbc) 控制app tier 与数据库

的JDBC连接 (参考  metalink note <278868.1> AOL/J JDBC Poolin 11i )。

 

每个 JVM都会 创建自己的 JDBC Pool. 常用的参数如下,根据具体情况配置:

 

fnd_jdbc_buffer_decay_interval=300

fnd_jdbc_buffer_decay_size=5

fnd_jdbc_usable_check=false

fnd_jdbc_buffer_min=1

fnd_jdbc_buffer_max=5

FND_JDBC_STMT_CACHE_SIZE=200

FND_MAX_JDBC_CONNECTIONS=500

 

 

1.4其他一些参数:

FND:View Object Max Fetch Size

FND:Enable Cancel Query

ICX:Session Timeout

s_sesstimeout: selfservice session timeout

s_frmConnectMode:FORMS使用socket mode 或servlet

 

具体的参数描述,见metalinknote <458282.1> : Context Variables.

 

 

2. 数据库方面

 

数据库方面跟其他应用的数据库调优并没有什么不同。也可以分两个层次:

 

2.1Instance level

 

与R12有关的Instancelevel参数, 可参看metalink note 

<396009.1>Database initilization parameters for Oracle applications for R12

 

例如,_optimizer_autostats_job=false, 这是因为R12 采用自己的FND_STATS

package 来 collect stats。  sec_case_sensitive_logon = FALSE ,这是因为

R12不支持11g 的这个新特性。

 

另外,象sga/pga 这些参数,也可根据具体情况设置。

 

2.2 SQLlevel 

 

象大多数数据库一样,今时今日,Instance level参数要注意的地方不多,一方面

Oracle在不断改善,越做越好,另一方面,DBA 也越来越熟悉这些地方。现在,

棘手的问题大多在SQLlevel。

 

处理的方法可以从AWRreport, v$active_session_history,或trace(concurrent manager 

job或Forms 的 trace, 具体collection方法见前述 )中, 找到问题SQL,然后再具体分析。

 

一些有用的view:

v$sql/v$sql_plan/v$sql_bind_capture/v$sql_plan_statistics

 

解决的方法,要不是open SR (anyway, 这是Oracle 自己开发的程序),要不就用 SQL profile (10g)

SQL planbaseline (11g) 影响 optimizer 以得到正确的plan。

 

当然,在分析时,要保证表的statisitcs是 up-to-date,可以这样看:

 

setserveroutput on

set long10000

setlinesize 132

setpages 1000

execfnd_stats.verify_stats('GL','GL_DAILY_BALANCES');

 

===================================================================================================

Table  GL_DAILY_BALANCES

===================================================================================================

lastanalyzed     sample_size num_rows           blocks

05-17-200803:14  6199        61990              4527

Indexname                   last analyzed    num_rows  LB      DK      LB/key  DB/key  CF

----------------------------------------------------------------------------------------------------

GL_DAILY_BALANCES_N1         05-17-2008 03:14  61976    445     33848    1      1       60667

GL_DAILY_BALANCES_N2         05-17-2008 03:14  61976    299     194     1       146     28420

GL_DAILY_BALANCES_N3         05-17-2008 03:14  61976    300     151     1       188     28418

GL_DAILY_BALANCES_N4         05-17-2008 03:14  7547     31      5       6       359     1796

----------------------------------------------------------------------------------------------------

Histogram  Stats

Schema        Table Name                    Status     last analyzed     Column Name

----------------------------------------------------------------------------------------------------

GL            GL_DAILY_BALANCES             not presentTEMPLATE_ID

Legend:

LB :Leaf Blocks

DK :Distinct Keys

DB :Data Blocks

CF :Clustering Factor

 

PL/SQLprocedure successfully completed.

SQL>

 

 

3. 应用方面

 

应用层常见的需要注意的地方:

 

3.1.Concurrent manager

 

ConcurrentManager 方面,可以注意以下参数:

cachesize: number of pending requestes picked up each time

numberof work processes: 

Workshift: 

 

另外,一些常见的重要job:

 

"PurgeConcurrent Request and/or Manager Data"

"PurgeObsolete Workflow Runtime Data"

 

有关concurrent job 运行情况的表:

 

fnd_conc_req_stat( turned off by profile "Concurrent: Collect Request Statistics"

 

 

 

3.2.产品的参数表

 

有时候,有些product的参数表也需要考虑,例如 HR payroll 里的 pay_action_parameters,

需要注意的参数如下:

Threads: number of processes to use in the concurrent manager 

Chunk_size: commit unit

 

 

4. OS(cpu/memory/disk/network)

 

Last butnot least, 任何tuning 都要考虑 OS 方面的东西,cpu/memory/disk/network。






11.从11i到R12的升级

2014913

20:45

参考资料:

1.Oracle Applications Upgrade Guide: Release 11i to Release 12.0.4

http://download.oracle.com/docs/... bat/r1204upg11i.pdf

 

2.<850008.1> Interesting Documents Concerning E-Business Suite 11i to R12Upgrades

3.<554509.1> Unable To Login To Oracle Applications After Upgrading 

from11.5.10 to R12  

 

4.<403339.1> Oracle 10gR2 Database Preparation Guidelines for 

anOracle E-Business Suite Release 12.0.4 Upgrade 

 

5. http://advait.wordpress.com/2008/03/04/

upgrading-oracle-application-11i-to-e-business-suite-r12/

 

11i 到R12 的升级过程比较复杂,下面分planning, preparing, upgrade, after upgrade 

几个section简单介绍一下,只是一个大概的印象。主要还是靠阅读相关的metalink 文档。

 

除了techstack的升级外,一部分精力可能还在各个product 升级后,业务可能遇到的bug,

需要其他进一步的patch。不过,好在11iupgrade 通常也不是一两天的工作。

 

 

14.1planning for upgrade

=========================

 

首先清楚自己在什么版本,一般要求在11.5.10.2CU2 ,

metalink note <316366.1>: 11.5.10 Oracle E-Business SuiteConsolidated Update 2 (CU2)

有这样的解释:

"11.5.10.2Maintenance Pack (3480000.drv). This new release of the maintenance pack 

includesCU2. You do not have to apply it separately"

"Likethe 11.5.10.2 Maintenance Pack, Rapid Install 11.5.10.2 also includesCU2, 

so thereis no need to apply it separately. "

 

相关的11.5.10.2CU2 的patch number:

 

Patch3460000: 11.5.10 ORACLE E-BUSINESS SUITE CONSOLIDATED UPDATE 2

Patch3480000: ORACLE APPLICATIONS RELEASE 11.5.10.2 MAINTENANCE PACK

 

检查11.5.10 CU2 的 level:

selectbug_number from apps.ad_bugs where bug_number ='3460000';

 

检查 AD 的level: 

selectpatch_level from fnd_product_installations where patch_level like '%AD%';

11i.AD.I.5

 

检查 checktablespace sizing 

 

selectsum(bytes)/1024/1024,TABLESPACE_NAME from 

dba_free_spacegroup by TABLESPACE_NAME;

 

selectcontents,extent_management,allocation_type 

fromdba_tablespaces where tablespace_name='TEMP';

 

 

检查 OATMOracle Application Tablespace Model

 

检查multiple org 是否enabled

selectmulti_org_flag from apps.fnd_product_groups;

select *from apps.hr_operating_units;

profileoption: "MO:Operating Unit"

 

检查 dbparameters

recyclebin=off

 

14.2Preparing for the upgrade

================================

安装 TUMS(Upgrade Manual Script ) patch 5120936, 步骤如下:

 

adadmin=> adpatch

cd$AD_TOP/patch/115/sql

sqlplusapps/welcome @adtums.sql /usr/tmp

 

注意:/usr/tmp must be in the "utl_file_dir"

 

安装 ADpreparation patch: patch 5726010

 

cd5726010

sqlplusapps/welcome @adgncons.sql apps welcome

 

修改adcrtbsp.sql to reflect your current tablespace information

sqlplus<SYSTEM>/<SYSTEM PASSWORD> @adcrtbsp.sql   

 

mkdir -p$ORACLE_HOME/appsutil/admin

cpadgrants.sql $ORACLE_HOME/appsutil/admin

sqlplus/ as sysdba

SQL>@$ORACLE_HOME/appsutil/admin/adgrants.sql APPLSYS

 

rungather statistics

 

 

14.3upgrade

================================

 

确认character sets of APPL_TOP

CharacterSets

You haveto be careful while selecting the character set for APPL_TOP.

 

###create /u01 ,/u02, /u03 for the R12 tech stacks.

/u01=> appl_top,common_top, 10.1.3,10.1.2

/u02=> inst_top

/u03=> rdbms home ,10.2.3

 

chown -Rapplvis:dba /u01

chown -Rapplvis:dba /u02

chown -Roravis:dba /u03

 

第一次运行rapidwiz 安装新的tech stack:

 

[root@misrapidwiz]# pwd

/media/usbdisk/r1204/StageR12/startCD/Disk1/rapidwiz

[root@misrapidwiz]# ./rapidwiz

 

选项如下:

=>upgrade to R12 => create upgrade file system => apps/welcome

 

Configurationfile written to: /u02/apps/PROD_mis/conf_PROD.txt

Configurationfile written to: /u03/db/tech_st/10.2.0/appsutil/conf_PROD.txt

Databaselogfile - /u03/db/tech_st/10.2.0/appsutil/log/PROD_mis/12121135.log

Appltoplogfile - /u02/apps/PROD_mis/logs/12121135.log

 

升级数据库 to10gR2

 

applypatch 6319846

[oravis@mis6319846]$ $ORACLE_HOME/OPatch/opatch napply -skip_subset -skip_duplicate

sql>@postinstall.sql

 

applypatch 6110331

 

如果 appsaccount locked ,unlock apps, enable maintenance

 

sourceR12's env, apply patch 6604842

 

#$APPL_TOP/admin/topfile.txt

 

###apply u6394500.drv

cd$AU_TOP/patch/115/driver

adpatchoptions=nocopyportion,nogenerateportion

 

可能问题如下:

1. mkdiradmin

 

2.ORA-02303: cannot drop or replace a type with type or table dependents

 

metalink:<603952.1> Script jtfpfcreate.sql fails during Upgrade to Release 12.0.4

nodependent objects found for type "JTF_PF_CLIENT_OBJECT"

droptype force for all the type listed in <603952.1>.

dropTYPE APPS.JTF_PF_CLIENT_OBJECT force;

useadctrl to restart failed job

 

###JTF  Java Technology Foundation, used by CRM , iStore,iMarketing

 

3.ORA-01653: unable to extend table APPLSYS.AD_DEFERRED_JOBS by 16 in tablespaceAPPS_TS_TX_DATA

restartadpatch

 

4./u01/apps/apps_st/appl/jtf/12.0.0/patch/115/sql/jtfpfstart.sql

apparentlyworkaround for point 2 is not good. causing issue here.

justmodify the sql and put exit. 

 

5.restart a failed patch process

tellworker to shutdown ; 

tellmanager that worker failed its job ; 

tellmanager that worker acknowledges quit ; 

restartadpatch;

 

#######################################

 

###autoconfig rdbms home

 

###第二次运行 rapidwiz 以配置系统。

 

[root@misrapidwiz]# ./rapidwiz

 

RapidInstall Wizard is validating your file system......

4 dvdlabels found

RapidInstall Wizard will now launch the Java Interface.....

 

[root@misrapidwiz]# Appltop logfile - /u02/apps/PROD_mis/logs/12151909.log

 

 

14.4  Upgrade 后可能的问题

############################# 

can'topen any form after login:

javaconsole get this:

Loadedimage: 

FollowingException occured: java.lang.IllegalArgumentException: Illegal argument forcolorScheme applet parameter

java.lang.IllegalArgumentException:Illegal argument for colorScheme applet parameter

       at oracle.forms.engine.Main.initDesktop(Unknown Source)

       at oracle.forms.engine.Main.start(Unknown Source)

       atsun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)

       at java.lang.Thread.run(Unknown Source)

 

 

metalink<858367.1> matches . 

justdeinstall java 1.5 and then open a form again it will pickup the java 1.6.

and ok.

 

noFND_COLOR_SCHEME in R12. only "java color scheme", and not set. 


你可能感兴趣的:(Oracle Applications DBA 基础(二))