2008年4月27日 星期日

The Internal Logic for Refresh of Security cache

Refreshing the security cache after changing the security settings is very important.
Both security windows Security Permissions and Grant Administration
include the possibility to refresh the cache.

The operation of refreshing the security cache consists of the following steps:

  1. Remove method restriction entries in table SECURITY_SYS_TAB where no grants
    for the corresponding package are found in USER_TAB_PRIVS_MADE.

  2. Copy package and view grants from USER_TAB_PRIVS_MADE to SECURITY_SYS_PRIVS_TAB.

  3. Synchronize the contents of FND_USER_ROLE_TAB and SYS.DBA_ROLE_PRIVS (upgrade issue).

  4. Update the table SECURITY_SYS_RPRIVS_COPY_TAB according to SYS.DBA_ROLE_PRIVS and FND_USER_ROLE_TAB to be used
    for performance boost of the next step.

  5. Update the expanded role lists in tables FND_USER_ROLE_RUNTIME_TAB
    and SECURITY_SYS_ROLE_PRIVS_TAB
    by using non-expanded role relations in SYS.DBA_ROLE_PRIVS.
    (above is a example of IFS-2001 etc)

Shared Pool Administration IN Admin.exe

1.before Shared Pool administration functionality in IFS/Deployment Administrator can be used, Oracle package DBMS_Shared_Pool has to be installed in the database. This is normal done by executing the files: rdbms/admin/dbmspool.sql and prvtpool.plb as user SYS.
2.
The Shared Pool Administrator can be used to pin Oracle packages in the shared pool preventing them from being swapped out by Oracle.
There are two possible reasons for keeping a package permanently in the shared area:
  • a package is large, so there is a risk that it won't fit back if it gets swapped out

  • a package is often executed and swapping it out will increase the overhead

To be kept in the database, the package has to be loaded in the shared area.
The administrator window shows all the packages presently loaded,
so there is little point in running it unless the database has been running for a while.
Through the pop-up menu the packages can be sorted according to size or number of executions.
A Kept package will reside permanently in the shared pool until the Oracle restarts.
If the same packages are to be kept in the shared pool even after a restart,
a script that will load and pin those packages can be created from this tool.
This script should be run immediately after a database restart.

3.path:Installation/SQL File Executor
select pool, name,round(bytes/1024/1024) as mb from v$sgastat order by pool,mb desc

pool name mb
java pool free memory 32
shared pool free memory 332
shared pool sql area 6
shared pool miscellaneous 6
shared pool library cache 5
shared pool PL/SQL MPCODE 3
shared pool 1M buffer 2
shared pool PL/SQL DIANA 2
shared pool dictionary cache 2
shared pool KGLS heap 2
shared pool KQR M PO 1
shared pool message pool freequeue 1
shared pool KSXR receive buffers 1
shared pool KSXR pending messages que 1
shared pool event statistics per sess 1

4. init.ora
....
#######################
# Pools
#######################
java_pool_size =33554432
ared_pool_size =367001600

2008年4月15日 星期二

Custom RMB on Quick Report Results with parameters

Here is an example of one parameters
(Testing result is quite good in IFS2004 Flux !)
step by step as below:
1.create a sql expression on quick report as below:
SELECT a.Contract ,a.Part_No,
IFSAPP.INVENTORY_PART_API.GET_DESCRIPTION(a.contract, a.part_no)"PART_DESC",
round(a.Latest_Purchase_Price,4) "Latest_Purchase_Price",
round(a.Average_Purchase_Price,4)"Average_Purchase_Price"
,b.inventory_value "inventory_value"
from IFSAPP.INVENTORY_PART_CONFIG a,IFSAPP.INVENTORY_PART_UNIT_COST b
where a.part_no like '&PART_NO'
and a.contract=b.contract and a.part_no = b.part_no
and (a.Latest_Purchase_Price >0 or a.Average_Purchase_Price >0)
order by a.contract,a.part_no
2.let QUICK_REPORT_ID is 30
(SELECT QUICK_REPORT_ID,DESCRIPTION
from QUICK_REPORT)
3.In Custom Menu:(new)
--Action Type:SAL code
--window:tbwPurchaseOrderLine
--parameter:
InfoService.QuickReportStart(SalNumberToStrX(30,0) II
'@PART_NO=
' IItbwPurchaseOrderLine.colPartNo II'^')
4.Testing okay in IFS2004 Flux