Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Saturday, May 14, 2016

Oracle Configurator - Publication Enabled Properties

Oracle Configurator build 12.1.3.31.9 has introduced a new flag for PROPERTY object - PUBLICATION ENABLED. This property indicates whether the property and its values should be copied to target publication instance during model publication or not. This is introduced mainly for performance reasons because in certain cases, properties in OCD are not required in published target model data. By default, new build sets this property to False for all properties stopping them being published to target instance. This is sudden change by Oracle in 31.9 build, which many customers are not aware of. This causes customers wonder by model not working correctly in target instance after publication and upgrade to 31.9. I have seen persons debugging a log around this for days finally to figure out properties are not copied in target instance. Thanks to Oracle that there exists a note that can help customer identify the issue quickly if anyone has searched metalink. 

After Upgrading To Build 31.9, Unable to Access Properties in Published Models (Doc ID 2084634.1)

Let's discuss about scenarios when this flag should be enabled.
  • Set Publication Enabled to True, when the property is used in UI or CX code. This means you are accessing property value in CX code OR have display/enable condition in UI based on property or have UI node caption based on property.
  • Set Publication Enabled to False, when property is used only in CDL Rules like property based rules Or property is imported in Configurator from BOM model catalog/APC and not used anywhere. This is most likely the case and is major concern in publication process performance for customers who use large amount of attribute based classification (from APC or Catalog or OCD created) for rule. Whenever you generate logic, all logic rule details are translated to rule engine language and stored in cz_lce% tables. Hence, actual rule texts and rule data are not required for rule execution in target instance.

Wednesday, April 24, 2013

Query to extract Oracle Configurator CX rule information - 2

Earlier post regarding CX query did not list method name. Following query can be used to find out all CX binding in the instance (you can filter by other parameters as required). Most important thing is to find all CX binding for postValueChange event for Global scope - These can cause performance issues and instance crash.

SELECT DISTINCT
  p.devl_project_id,
  p.name,
  RU.RULE_ID,
  RU.NAME,
  ev.NAME AS EVENTNAME,
  CLASS_NAME,
  mtd.name method_name,
  DECODE(EN.EVENT_EXECUTION_SCOPE, 1, 'Global', 2, 'Base Node SubTree', 4, 'Base Node', 'Unknown') AS SCOPE,
  EN.DATA_VALUE oncommandEventName
FROM CZ_RULES RU,
  CZ_EXPRESSION_NODES EN,
  CZ_SIGNATUREs EV,
  cz_signatures mtd,
  cz_devl_projects p
WHERE 1                       =1
  --AND p.DEVL_PROJECT_ID          IN (1097200) --for given devl_project_id
  AND RU.RULE_ID                =EN.RULE_ID
  AND ev.SIGNATURE_ID           =EN.ARGUMENT_SIGNATURE_ID
  AND RU.RULE_TYPE              =300       --for CX rules
  AND EN.ARGUMENT_SIGNATURE_ID IS NOT NULL --with valid event
  AND RU.DELETED_FLAG           =0         --ignore deleted nodes
  AND EN.DELETED_FLAG           =0
  AND p.deleted_flag            =0
  and ru.disabled_flag=0
  and en.expr_type=216
  and en.param_signature_id=mtd.signature_id
  and en.expr_parent_id is null
  AND EN.EXPR_PARENT_ID        IS NULL --definition is only on parent node of expression tree
  --AND ev.NAME                  = 'postValueChange'
  --and EVENT_EXECUTION_SCOPE=1  -- to check which all are global events
  --and mtd.name='myProcess' --- to check CX for given method
  AND ru.devl_project_id        =p.devl_project_id
  ;

Tuesday, November 27, 2012

Enable PLSQL Trace with bindings

Sql commands to enable/disable trace in Oracle plsql session.


ALTER SESSION SET sql_trace = true;

ALTER SESSION SET tracefile_identifier = 'pm_test1trace';

--enable trace with bindings and wait
ALTER SESSION set events '10046 trace name context forever, level 12';

--set of plsql blocks to be traced
select * from cz_devl_projects where name like 'PM 10';

ALTER SESSION SET sql_trace = false;

select * from v$parameter where name like '%user%dest%';

Saturday, March 24, 2012

Oracle: Find locking session and Kill

Usually you will see some query taking a lot of time and sometime never returns. Well, if it returns ever, you nee d to improve the explain plan of the query.
But if it never returns (usually update query) then it could be a deadlock in the system somewhere. To find out that particular session and query, following query will give more fruitful information for it.

I found if useful for debugging few issues in Oracle Configurator when some page does not return on Apply button click. Well, but in general following queries are not specific to oracle applications, you can use it anywhere to find locking sessions and eventually kill them.

SELECT sq.*, ses.*
FROM   v$sql sq, v$session ses
WHERE  sq.sql_id = ses.sql_id
 and ses.sid IN (SELECT sid
            FROM   v$lock
            WHERE  (id1,id2,TYPE) IN (SELECT id1,
                                             id2,
                                             TYPE
                                         FROM   v$lock
                                         WHERE  request > 0))
;

Find "BLOCKING_SESSION", analyze and kill if required.

select * from v$session where sid=310;


ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;


ALTER SYSTEM KILL SESSION '276,2323' IMMEDIATE;

Tuesday, January 3, 2012

Adobe Reader PDF launch performance

Recently I have observed that whenever I open any PDF file in Adobe Reader (Version 10.1), it takes lot of time to display PDF file.
Looks like it does some processing of document for loading plugins. I just renamed the plugin's folder under installation directory of Adobe (typically it is C:\Program Files\Adobe\Reader 10.0).
I found two folders for plugin in my machine.
   plug_ins3d
   plug_ins
Just renamed them to some other name.
Now the Adobe is launching PDF very quickly.

Now you will face problem while searching in pdf file - because you have disabled all plugins :(
So now selectively add plugin as you need by creating above folder and finding plugins from renamed folder. They are self explanatory by name, so should not be difficult to find out their usage.