Monday, August 26, 2013

Whitepaper: The WHY of setting up Autoinvoice options for performance improvement

My earlier post http://plsql-apps.blogspot.co.at/2013/07/basic-pre-requisites-setups-to-decrease.html details about the different set of options to tackle and improve autoinvoice performance. This post details the in depth information on why these values need to be set and what are the default values that Oracle comes seeded with.

-       Setting purge interface table = Y
    With this option set to Yes, the processed records in the interface table is purged after each autoinvoice run automatically. By default or when set to No the purge of records does not happen until the purge concurrent program is run 

-       Set Max Memory (in bytes) = Suggested less than 3MB (3145728 bytes)
The default is 65535 bytes. Enter a lower number if AutoInvoice displays the message 'Failed to allocate memory for scratch_memory.' Enter a higher number if AutoInvoice displays the message 'The given piece of memory is not large enough to hold a single row.'  if you use AutoInvoice to import no more than 100 invoices at a time, enter a value of 102400. This is the amount of space that is allocated for autoinvoice validation step only.

-       Log File Message Level = 0
This is the amount of log messages to be printed during the autoinvoice process, higher the number slower the autoinvoice process and higher the number of messages to debug.
-       Tuning Segments
o    Accounting Flex
o    System Items
o    Territory
Autoinvoice uses the above segments frequently for invoice processing, in order to improve performance during runtime the segments from these flexfields can be tuned for the above set. For ex. RA_INTERFACE_DISTRIBUTIONS_ALL table consists of both code_combination_id and segments(n) column, during runtime all lines are updated with the segment values. By defining a tuning segment in the setup these column values are tuned for better performance. 

Oracle Application Setup: Manage System Profile Options

-       AR:  AutoInvoice Gather Statistics
When you submit the AutoInvoice Master program, AutoInvoice can first analyze the interface tables (RA_INTERFACE_LINES_ALL, RA_INTERFACE_DISTRIBUTIONS_ALL, and RA_INTERFACE SALESCREDITS_ALL) and automatically gather statistics to determine how best to execute the transaction import. If you want AutoInvoice to automatically gather statistics, then set this profile option to Yes. If the number of records to be imported and the number of worker processes are approximately the same as the previous submission of AutoInvoice, then you may set the profile option to No and skip this analysis.

-       AR: Maximum Lines Per AutoInvoice Worker
The default value for this profile option is 100000. This profile option allows you to give AutoInvoice a "tip" on how it should group the records so that all lines for an invoice can be assigned to a single or multiple workers. Here worker means number of spawned programs to group the number of records. If the profile option is set to 10,000 lines per worker, and an invoice has more than 10,000 lines, then all the lines on the invoice would be assigned to a single worker.

Sequence of grouping and assigning to workers:
-       Transaction lines are ordered and grouped by the grouping and line ordering rules defined.
-       After which the below grouping is done to assign to workers, if none of the below value changes then the records are processed by a single worker regardless of the maximum lines per worker else the profile option is used to group and to be processed by multiple workers

org_id || '~' || \n\
batch_source_name || '~' || \n\
orig_system_bill_customer_id || '~' || \n\
orig_system_bill_customer_ref || '~' || \n\
orig_system_bill_address_id || '~' || \n\
orig_system_bill_address_ref || '~' || \n\
NVL(cons_billing_number, trx_number) || '~' || \n\
NVL(cons_billing_number, purchase_order) || '~' || \n\
NVL(cons_billing_number, currency_code) || '~' || \n\
NVL(cons_billing_number, conversion_type) \n\
 

Truncate Interface Tables Vs. Delete Records

There is a need to frequently truncate tables.  TRUNCATE resets the table definition to an empty table by resetting the high water mark. This could increase the performance of autoinvoice as it releases the occupied blocks and table scan can be performed effectively. Whereas a delete does not relinquish segment space thus a table in which all records have been deleted retains all of its original blocks.

Wednesday, August 21, 2013

Tutorial: Loading images or any blob type files from server to Oracle Database using PLSQL - Part 1

Recently I was working with External tables which is becoming very handy in all the data transfer activities that my work wants to me to perform. They are really cool alternatives to SQL*Loader Utility. I also came across a requirement to load images from your local / server machine to Oracle Database and this is where I wanted to take a look at external tables whether they are equipped to handle images / documents or any other MIME types for that case, the answer was YES and it made my coding world easy to understand and deploy.

There are many ways which we can load image / document type file formats into Oracle Database fields (BLOB Type):- Java methods, DBMS_LOB package or External Tables. This blog post will detail on the DBMS_LOB and External Table to handle loading images / documents stored on a local / server machine as a complete file.

External Table:

1) Create a file (file.txt) for the external table to read with columns ID, file_name, file_name

1,034517.jpg,034517.jpg
2,037608.jpg,037608.jpg
3,045023.jpg,045023.jpg
4,049412.jpg,049412.jpg
5,059125.jpg,059125.jpg
6,066945.jpg,066945.jpg

2) Create a database directory where the file will be stored on the machine

CREATE OR REPLACE DIRECTORY xxfile_dir AS '/usr/tmp/JK'  

3) Save the file 'file.txt' and the files that are referenced inside the file in the directory mentioned in step 2

4) Now connect to database and create an external table with the columns ID, file_name, BLOB column for your file

CREATE TABLE XXLOAD_FILE (
  ID                NUMBER(10),
  FILE_NAME         CHAR(15),
  BLOB_CONTENT      BLOB
)
ORGANIZATION EXTERNAL
(
  TYPE ORACLE_LOADER
  DEFAULT DIRECTORY XXFILE_DIR
  ACCESS PARAMETERS
  (
    RECORDS DELIMITED BY NEWLINE
    BADFILE XXFILE_DIR:'lob_tab_%a_%p.bad'
    LOGFILE XXFILE_DIR:'lob_tab_%a_%p.log'
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    (
      ID                CHAR(10),
      FILE_NAME         CHAR(15),
      BLOB_FILENAME     CHAR(100)
    )
    COLUMN TRANSFORMS (BLOB_CONTENT FROM LOBFILE (BLOB_FILENAME) FROM (XXFILE_DIR) BLOB)
  )
  LOCATION ('file.txt')
)
PARALLEL 2
REJECT LIMIT UNLIMITED;

4) Now you are all done, either call the table using a select statement or in your procedures and load into your document / image tables. You can see that the field BLOB_FILENAME does not match the actual definition as this field is used to actually fetch the file and save it into BLOB_CONTENT field using the COLUMN TRANSFORMS function

select * from XXLOAD_FILE
or
create table XXFILE as
select ID, substr(FILE_NAME,1,instr(FILE_NAME,'.',1)-1) person_no, FILE_NAME, BLOB_CONTENT FILE from XXLOAD_FILE


As this blog post is getting really huge, I would be splitting the tutorial using DBMS_LOB in the next post.

Tuesday, August 6, 2013

Tutorial: Oracle Applications - Custom Key Flexfields

The following are the points that need to be taken into consideration while creating a custom Key Flexfield (KFF)

1) Structure of your custom Key Flexfield table, the table should contain all of the following
- Combination ID column
- Structure ID Column
- Enabled Flag Column
- Summary Flag Column
- Start Date Active & End Date Active Column
- Segment columns

2) Sequence
- A sequence should be created with the same name as the table created appended with '_S'. There is no mapping to table or KFF required.

3) Registration of table created in the Database using inbuilt AD_DD package

4) Registration of Key Flexfield from the front end applications

5) Decide on whether to allow dynamic insertion of flexfield values for the KFF

Friday, August 2, 2013

OA Framework - How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12.x (Doc ID 416708.1)

This is a excerpt from the metalink note, you can download the patch from metalink using patch search.

Identify the OA Framework version in your instance by activating diagnostics and click the "About This Page" from any OAF page. Click the "Technology Components" tab. The OA Framework version in the top row of the table can then be matched to the JDeveloper Patch.

Release 11i

OA Framework 5.10 patchJDeveloper 9i Patch
ATG.PF.H (patch 3438354 or Oracle Applications 11.5.10)Patch 4045639 9IJDEVELOPER WITH OA EXTENSION ARU FOR FWK.H
ATG PF CU1 (patch 4017300)Patch 4141787 9IJDEVELOPER WITH OA EXTENSION ARU FOR CU1
ATG PF CU2 (patch 4125550)Patch 4573517 Oracle9i JDeveloper with OA Extension for 11.5.10 CU2
11i.ATG_PF.H RUP3 (patch 4334965)Patch 4725670 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP3
11i.ATG_PF.H RUP4 (patch 4676589)Patch 5455514 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP4
11i.ATG_PF.H RUP5 (patch 5473858)Patch 6012619 9IJDeveloper With OA Extension ARU FOR 11i10 RUP5
11i.ATG_PF.H.RUP6 (patch 5903765)Patch 6739235 9IJDeveloper With OA Extension ARU FOR 11i10 RUP6
Patch 6469392 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11I10 RUP6
11i.ATG_PF.H.delta.7 (patch 6241631)Patch 8751878 9I JDEVELOPER WITH OA EXTENSION ARU FOR 11I RUP7


Release 12.0

ATG Release 12 VersionJDeveloper 10g Patch
12.0.0Patch 5856648 10g Jdev with OA Extension
12.0.1  (patch 5907545)Patch 5856648 10g Jdev with OA Extension
12.0.2  (patch 5484000 or 5917344)Patch 6491398 10g Jdev with OA Extension ARU for R12 RUP2 (replaces 6197418)
12.0.3  (patch 6141000 or 6077669)Patch 6509325 10g Jdev with OA Extension ARU for R12 RUP3
12.0.4 (patch 6435000 or 6272680)Patch 6908968 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12 RUP4
12.0.5 (No new ATG code released)No new JDev patch required
12.0.6  (patch 6728000 or patch 7237006)Patch 7523554 10G Jdeveloper With OA Extension ARU for R12 RUP6

Release 12.1

ATG Release 12.1 VersionJDeveloper 10g Patch
12.1 (Controlled Release - only included for completeness)Patch 7315332 10G Jdev with OA Extension ARU for R12.1 (Controlled Release)
12.1.1 (rapidInstall or patch 7303030)Patch 8431482 10G Jdeveloper with OA Extension ARU for R12.1.1
12.1.2 (patch 7303033 or patch 7651091)Patch 9172975 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.2
12.1.3 (patch 9239090 or patch 8919491)Patch 9879989 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.3
12.1.3.1 (patch 11894708)Patch 9879989 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1.3

Downloads: Oracle Workflow Builder / Client / Standalone for Windows

Below listed are the links to Oracle Workflow Builder with loads of variant to versions and compatibility. I have listed the compatibility changes for latest Windows Operating Systems (Platforms).

Download Links:

Patch 2053572 Is Required To Install Oracle 9i Workflow Client

Patch 2610507 Oracle Workflow Builder Release 2.6.1 

Patch 3031420 Workflow Builder 2.6.3.0.1
 
Patch 4066964 Workflow Client for Apps 11i10 ( 2.6.3.01 ) running Windows 7 Ultimate ( 64 Bit )

Patch 6970344 Workflow Builder client 2.6.3 is certified for Windows XP, Vista and Windows 7 (32-bit and 64-bit) users with Oracle E-Business Suite 11i, 12.0 and 12.1.  


Compatibility:



Setting Compatibility Mode Manually

To set compatibility mode before running the executable follow these steps;

  1. Right click on the 'setup.exe' for the application
  2. Select 'Troubleshoot Compatibility' and the 'Program Compatibility' window should open
  3. Click the option 'Try recommended settings'
  4. The 'Windows compatibility mode' should be set to 'Windows XP (Service Pack 2)' or 'Windows XP (Service Pack 3)'
  5. Click the 'Start the program...'
  6. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
  7. The 'Oracle Universal Installer' window should now open allowing installation of the application

Let Windows Set Compatibility Mode

  1. Run the 'setup.exe' for the application
  2. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
  3. When the 'Oracle Universal Installer' window tries to open the following Error window appears:
  4. Click the 'OK' button and the 'Program Compatibility Assistant' window will open
  5. Select the option, 'Reinstall using the recommended settings'
  6. If the 'User Account Control' window opens with the message, 'Do you want to allow the following program from an unknown publisher to make changes to this computer?', select 'Yes'
The 'Oracle Universal Installer' window should now open allowing installation of the application

Search This Blog

Labels

oracle oracle applications 11i 12.1 PLSQL SQL database index r12 12 API HRMS PL application r12.1.3 table whitepaper AR DOCUMENT_CATEGORY Database Options Oracle Application Setup Packages Sequences Stand-alone System Profile Options Tables Tuning User-defined types Views autoinvoice compatibility concurrent developer document documents of record download impact import increase issue lookup manager master object names oracle workflow performance receivables script technology windows workflow APP-PAY-06841 ATG BI BLOB DBMS_LOB DFF DIRECTORY Dynamic FND FNDLOAD HR_CHANGE_START_DATE_API IN IN OUT Jdeveloper 11g KFF MIME Materialized views OA Framework OAF ORACLE_LOADER OUT Private synonyms Problem Problem Statement SQL*LOADER SSHR Starters Tutorial WebService XP ad_dd administrator all all workflows amateur architecture assi assignment attachments breadth first search builder category change client column columns compression consideration create create_shared_type custom flexfield cyclic graph data flow data structure data structures depth first search employee external tables field file flex flex field flexfield fnd_irep_classes fnd_irep_function_flavors fnd_lookup_types_pkg fnd_lookup_values_pkg functionality graph image infrastructure insert_row integrated SOA gateway invisible indexes irep jdev jdeveloper key key flexfield keywords latest start date list list of APIs load logging mandatory metalink node noob operating system operational BI package package maximum length parameters patch per_shared_types_api person procedures query queue quick start record registering registration reserved results solution stack standalone start date subcategory technical traverse traversing a graph type update_start_date upload values vertex view vista wf wf_local_roles windows 7

Total Pageviews