SYS_并发管理系列5_并发程序管理器程序诊断脚本REQCHECK.sql(案例)

简介: 2012-03-05 Created By BaoXinjian 一、摘要 Oracle Metalink 提供一个诊断并发程式进程的脚本 This Script is made available for Diagnosing Common Problems Related to Concurrent Requests 该脚本的主要作用 1.

2012-03-05 Created By BaoXinjian

一、摘要


Oracle Metalink 提供一个诊断并发程式进程的脚本

This Script is made available for Diagnosing Common Problems Related to Concurrent Requests

该脚本的主要作用

1. There should never be more than 3-4K records

2. Please Run Purge Concurrent Requests /and or Manager Data if => 3K There should never be more than 3-4K records

3. Please Run Purge Concurrent Requests /and or Manager Data if => 3K If records found, Update fnd_concurrent_requests set phase_code='C' and status_code='E' where phase_code='T'

4. If records found, Update fnd_concurrent_requests set phase_code='C' where phase_code = 'P' to Purge Pending Requests

5. Limits the Number of Requests Run Simultaneously by each User

6. Setting this option to YES will enable the 'Submit a New Request' button

7. Enables you to automatically place requests on hold after submission

8. Determines access privs to report output/log files

9. The value for number of Report Copies Currently Set

10. Determines the Priority of a Request upon Submission

11. Identifies the domain within which all the incompatibilities between programs has to be resolved

12. Setting this option to YES will save the output from a concurrent request to a file.

 

二、分析


 Step1. SQLPLUS调用该脚本

SQL> @REQCHECK.sql

 

Step2. 脚本自动产生Report Log在相应目录

[applvis@paleonode1 scripts]$ cat reqcheck.lst

 

Step3. 具体的Report

There should never be more than 3-4K records
  COUNT(*)
----------
      3514

Please Run Purge Concurrent Requests /and or Manager Data if => 3K
There should never be more than 3-4K records
  COUNT(*)
----------
      1221

Please Run Purge Concurrent Requests /and or Manager Data if => 3K
If records found, Update fnd_concurrent_requests set phase_code='C'
and status_code='E' where phase_code='T'
  COUNT(*)
----------
         0

If records found, Update fnd_concurrent_requests set phase_code='C'
where phase_code = 'P' to Purge Pending Requests
  COUNT(*)
----------
         2

Limits the Number of Requests Run Simultaneously by each User
no rows selected

Setting this option to YES will enable the 'Submit a New Request' button
no rows selected

Enables you to automatically place requests on hold after submission
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
N

Determines access privs to report output/log files
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
U

The value for number of Report Copies Currently Set
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
0

Determines the Priority of a Request upon Submission
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
50

Identifies the domain within which all the incompatibilities
between programs has to be resolved
no rows selected

Setting this option to YES will save the output from a concurrent
request to a file.
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
Y

Setting this option to YES will force concurrent requests to run sequentially
in the order in which they were submitted.
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
N

Set this option to YES to show request set stages in the concurrent
request screens.
no rows selected

Set this option to NO if you have multiple requests to submit and do not wish to
see the Request Summary form after each submission.
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
N

Specifies the number of minutes that a client will wait for a given Transaction
Manager to become available before trying a different Transaction Manager.
PROFILE_OPTION_VALUE
--------------------------------------------------------------------------------
1 

 

Step4. 具体的脚本REQCHECK.sql

REM #########################################################################  
REM ## Purpose: Diagnostic Script for Concurrent Requests  
REM ## Author: Brian Kerr  
REM ## Email: brian.kerr@oracle.com  
REM ## Filename: reqcheck.sql  
REM ## Cert: 10.7, 11, 11.5, 12  
REM ## Note:  
REM ## Usage: sqlplus apps/ @reqcheck.sql  
REM ## Output: reqcheck.lst  
REM ## Notes:  
REM ## a. The selects below run against system level only.  
REM ## b. Include Responsibility & User level queries - Open.  
REM ## c. '0 Rows Selected' represents that the Profile Option is Not Set.  
REM ##  
REM ## $Id: reqcheck.sql, v 1.2 2001/11/18 17:20:00 bkerr Exp $  
REM #########################################################################  
spool reqcheck.lst  
prompt There should never be more than 3-4K records  
select count(*) from fnd_concurrent_requests;  
prompt Please Run Purge Concurrent Requests /and or Manager Data if => 3K  
  
prompt There should never be more than 3-4K records  
select count(*) from fnd_concurrent_processes;  
prompt Please Run Purge Concurrent Requests /and or Manager Data if => 3K  
  
prompt If records found, Update fnd_concurrent_requests set phase_code='C'  
prompt and status_code='E' where phase_code='T'  
select count(*) from fnd_concurrent_requests  
where phase_code='T';  
  
prompt If records found, Update fnd_concurrent_requests set phase_code='C'  
prompt where phase_code = 'P' to Purge Pending Requests  
select count(*) from fnd_concurrent_requests  
where phase_code='P';  
  
prompt Limits the Number of Requests Run Simultaneously by each User  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Active Request Limit';  
  
prompt Setting this option to YES will enable the 'Submit a New Request' button  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Enable Request Submission in View Mode';  
  
prompt Enables you to automatically place requests on hold after submission  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Hold Requests';  
  
prompt Determines access privs to report output/log files  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Report Access Level';  
  
prompt The value for number of Report Copies Currently Set  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Report Copies';  
  
prompt Determines the Priority of a Request upon Submission  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Request Priority';  
  
prompt Identifies the domain within which all the incompatibilities  
prompt between programs has to be resolved  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Conflicts Domain';  
  
prompt Setting this option to YES will save the output from a concurrent  
prompt request to a file.  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Save Output';  
  
prompt Setting this option to YES will force concurrent requests to run sequentially  
prompt in the order in which they were submitted.  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Sequential Requests';  
  
prompt Set this option to YES to show request set stages in the concurrent  
prompt request screens.  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Show Requests Set Stages';  
  
prompt Set this option to NO if you have multiple requests to submit and do not wish to  
prompt see the Request Summary form after each submission.  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent: Show Requests Summary After Each Request Submission';  
  
prompt Specifies the number of minutes that a client will wait for a given Transaction  
prompt Manager to become available before trying a different Transaction Manager.  
select c.profile_option_value  
from fnd_profile_options a, fnd_profile_options_tl b, fnd_profile_option_values c  
where a. profile_option_name = b.profile_option_name  
and a.profile_option_id = c.profile_option_id  
and c.level_id = 10001  
and b.user_profile_option_name = 'Concurrent:Wait for Available TM';  
  
spool off  

 

Thanks and Regards

参考:Pan_Tian - http://blog.csdn.net/pan_tian/article/details/8634639

参考:Metalink - Diagnostic Script for Concurrent Requests (Doc ID 164978.1)

ERP技术讨论群: 288307890
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建
相关文章
|
5月前
|
SQL 数据库 数据安全/隐私保护
数据库数据恢复——sql server数据库被加密的数据恢复案例
SQL server数据库数据故障: SQL server数据库被加密,无法使用。 数据库MDF、LDF、log日志文件名字被篡改。 数据库备份被加密,文件名字被篡改。
|
4月前
|
存储 SQL 数据库连接
C#程序调用Sql Server存储过程异常处理:调用存储过程后不返回、不抛异常的解决方案
本文分析了C#程序操作Sql Server数据库时偶发的不返回、不抛异常问题,并提出了解决思路。首先解析了一个执行存储过程的函数`ExecuteProcedure`,其功能是调用存储过程并返回影响行数。针对代码执行被阻塞但无异常的情况,文章总结了可能原因,如死锁、无限循环或网络问题等。随后提供了多种解决方案:1) 增加日志定位问题;2) 使用异步操作提升响应性;3) 设置超时机制避免阻塞;4) 利用线程池分离主线程;5) 通过信号量同步线程;6) 监控数据库连接状态确保可用性。这些方法可有效应对数据库操作中的潜在问题,保障程序稳定性。
320 11
|
12月前
|
SQL 数据库
数据库数据恢复—SQL Server数据库报错“错误823”的数据恢复案例
SQL Server附加数据库出现错误823,附加数据库失败。数据库没有备份,无法通过备份恢复数据库。 SQL Server数据库出现823错误的可能原因有:数据库物理页面损坏、数据库物理页面校验值损坏导致无法识别该页面、断电或者文件系统问题导致页面丢失。
225 13
数据库数据恢复—SQL Server数据库报错“错误823”的数据恢复案例
|
5月前
|
关系型数据库 MySQL 大数据
大数据新视界--大数据大厂之MySQL 数据库课程设计:MySQL 数据库 SQL 语句调优的进阶策略与实际案例(2-2)
本文延续前篇,深入探讨 MySQL 数据库 SQL 语句调优进阶策略。包括优化索引使用,介绍多种索引类型及避免索引失效等;调整数据库参数,如缓冲池、连接数和日志参数;还有分区表、垂直拆分等其他优化方法。通过实际案例分析展示调优效果。回顾与数据库课程设计相关文章,强调全面认识 MySQL 数据库重要性。为读者提供综合调优指导,确保数据库高效运行。
|
6月前
|
SQL Oracle 关系型数据库
【YashanDB知识库】共享利用Python脚本解决Oracle的SQL脚本@@用法
【YashanDB知识库】共享利用Python脚本解决Oracle的SQL脚本@@用法
|
7月前
|
SQL 数据库
数据库数据恢复—SQL Server报错“错误 823”的数据恢复案例
SQL Server数据库附加数据库过程中比较常见的报错是“错误 823”,附加数据库失败。 如果数据库有备份则只需还原备份即可。但是如果没有备份,备份时间太久,或者其他原因导致备份不可用,那么就需要通过专业手段对数据库进行数据恢复。
|
6月前
|
SQL Oracle 关系型数据库
【YashanDB知识库】共享利用Python脚本解决Oracle的SQL脚本@@用法
本文来自YashanDB官网,介绍如何处理Oracle客户端sql*plus中使用@@调用同级目录SQL脚本的场景。崖山数据库23.2.x.100已支持@@用法,但旧版本可通过Python脚本批量重写SQL文件,将@@替换为绝对路径。文章通过Oracle示例展示了具体用法,并提供Python脚本实现自动化处理,最后调整批处理脚本以适配YashanDB运行环境。
|
10月前
|
SQL 数据库
gbase 8a 数据库 SQL优化案例-关联顺序优化
gbase 8a 数据库 SQL优化案例-关联顺序优化
|
10月前
|
SQL 数据库 UED
SQL性能提升秘籍:5步优化法与10个实战案例
在数据库管理和应用开发中,SQL查询的性能优化至关重要。高效的SQL查询不仅可以提高应用的响应速度,还能降低服务器负载,提升用户体验。本文将分享SQL优化的五大步骤和十个实战案例,帮助构建高效、稳定的数据库应用。
745 3
|
11月前
|
SQL 关系型数据库 MySQL

热门文章

最新文章