Вы находитесь на странице: 1из 11

Ora waiting for resource busy

Here is SQl I use on our Oracle DB when we get


contention problems:
--look at all current sessions running except SYSTEM
owned ones
SELECT s.sid,
s.serial#,
s.osuser,s.module,s.action,
s.program,s.status
FROM v$session s
where s.serial# <> '1' -- excludes system owned
and s.osuser = 'pblosser' --specific user id
(select distinct v.sid from v$access v where v.object
like 'MERCHANT') -- this is the table name, not really
necessary
order by s.osuser
--put in the 'sid,serial#' from the list generated by
above SQL -- sid = 81 serial# = 7588
alter system kill session '81,7588'

ROWSET, ROW, FIELD

Component Buffer Rowsets


Data Buffer Rowsets
Standalone Rowsets
Local Rowset &MYRS;

&MYRS = CreateRowset(RECORD.SOMEREC);
Fill Method
Local Rowset &MYRS;
Local String &EMPLID;
&MYRS = CreateRowset(RECORD.SOMEREC);
&EMPLID = '8001';
&MYRS.Fill("where EMPLID = :1", &EMPLID);

CopyTo Method
Local Rowset &MYRS1, MYRS2;
Local String &EMPLID;
&MYRS1 = CreateRowset(RECORD.SOMEREC);
&MYRS2 = CreateRowset(RECORD.SOMEREC);
&EMPLID = '8001';
&MYRS1.Fill("where EMPLID = :1", &EMPLID);
&MYRS1.CopyTo(&MYRS2);

To use the CopyTo method where there are no like-named records, you must specify the
source and destination records. The following code copies only like-named fields:
Local Rowset &MYRS1, MYRS2;
Local String &EMPLID;
&MYRS1 = CreateRowset(RECORD.SOMEREC1);
&MYRS2 = CreateRowset(RECORD.SOMEREC2);
&EMPLID = '8001';
&MYRS1.Fill("where EMPLID = :1", &EMPLID);
&MYRS1.CopyTo(&MYRS2, RECORD.SOMEREC1, RECORD.SOMEREC2);

Adding Child Rowsets


The first parameter of the CreateRowset method determines the top-level structure. If you pass
the name of the record as the first parameter, the rowset is based on a record. You can also base
the structure on a different rowset. In the following example, &MYRS2 inherits the structure of
&MYRS1:
Local Rowset &MYRS1, MYRS2;
&MYRS1 = CreateRowset(RECORD.SOMEREC1);
&MYRS2 = CreateRowset(&MYRS1);

To add a child rowset, suppose the following records describe a relationship. The structure is
made up of three records:

PERSONAL_DATA

BUS_EXPENSE_PER

BUS_EXPENSE_DTL

To build rowsets with child rowsets, use code like the following:
Local Rowset &rsBusExp, &rsBusExpPer, &rsBusExpDtl;
&rsBusExpDtl = CreateRowset(Record.BUS_EXPENSE_DTL);
&rsBusExpPer = CreateRowset(Record.BUS_EXPENSE_PER, &rsBusExpDtl);
&rsBusExp = CreateRowset(Record.PERSONAL_DATA, &rsBusExpPer);

Another variation is
&rsBusExp = CreateRowset(Record.PERSONAL_DATA,
CreateRowset(Record.BUS_EXPENSE_PER,

CreateRowset(Record.BUS_EXPENSE_DTL)));

TIPS:To improve the performance

Single Time
&REC = CreateRecord(Record.GREG);
&REC.DESCR.Value = "Y" | &I;
&REC.EMPLID.Value = &I;
&REC.Insert();
Bulk Insert use this

The following is an example using a SQL object to insert rows:


&SQL = CreateSQL("%INSERT(:1)");
&REC = CreateRecord(Record.GREG);
&SQL.BulkMode = True;
For &I = 1 to 10
&REC.DESCR.Value = "Y" | &I;
&REC.EMPLID.Value = &I;
&SQL.Execute(&REC);
End-For;

Select and SelectNew methods, like the ScrollSelect functions, enable you to control the
process of selecting data into a page scroll area. The Select method selects rows from a
table or view and adds the rows to either a rowset or a row. Lets call the record definition
of the table or view that it selected from the select record. Lets call the primary database
record of the top-level rowset object executing the method the default scroll record.
Local Rowset &BUS_EXPENSES_PER;
&BUS_EXPENSES_PER = GetRowset(SCROLL.BUS_EXPSNESE_PER);
&BUS_EXPENSES_PER.Select(RECORD.BUS_EXPENSE_VW,
"WHERE SETID = :1 and CUST_ID = :2", SETID, CUST_ID);

Chart FIELDS :-KAVi


PeopleCode Built-in Functions

ActiveRowCount
AddKeyListItem
ClearKeyList
CompareLikeFields
ComponentChanged

CopyFields
CopyRow
CurrentLevelNumber
CurrentRowNumber
DeleteRecord
DeleteRow
DiscardRow
ExpandBindVar
ExpandEnvVar
ExpandSqlBinds
FetchValue
FieldChanged
GetNextNumber
GetNextNumberWithGaps
GetNextNumberWithGapsCommit
GetRelField
GetSetId
InsertRow
IsDate
PriorValue
RecordChanged
RecordDeleted
RecordNew
RowFlush
SetComponentChanged
SetDefault
SetDefaultAll
SetTempTableInstance
StopFetching
TotalRowCount diff from ActiveRowCount as the activerowcount doesnt take deleted rows in to
account.
TreeDetailInNode
UpdateSysVersion
UpdateValue
ViewContentURL

%BINARYSORT
%Component
%Menu
%Mode
%OperatorClass
%Table
%TruncateTable
How do we do Application Engine trace?
Posted: 15 Jan 2007 at 12:46pm

Tracing an application engine program can be easily done without modifying the trace
settings in your application server. Here are some simple guidelines to follow to trace an app
engine program.
Go to the Application Engine's Process Definition under the menu item PeopleTools, Process
Scheduler.
1. Click on the override tab
2. On the Parameter list line select Append from the dropdown
3. In the edit box next to it, you can use any of the combination of trace settings listed
below:
-TRACE 7 -TOOLSTRACEPC 3596 -TOOLSTRACESQL 31
Once you enter your trace settings in the parameter list, save the App Engine Process
Defnition. Now, this program will be traced every time it is run, until these trace settings are
removed.
Dynamic views are not limited only to use %oprid (meta sql) in the views.
Dynmaic views are mainly used as prompt table.
Eg:- SBU table where SBG is not high order key.
on the page for a job record User enter SBG value first and then when promt for the SBU
value should prompt only the values corresponding to the SBG entered on the page.
This can be achieved by creating dynamic view on the SBU table where SBG is the high order
key in the dynamic view record.
Eg:SBG ---- Key
SBU ---- Key
DESCR
select
SBG
SBU
DESCR
from PS_SBU_TBL
make the this record as prompt for the SBU field.

We need not to do any thing further. peoplesoft automatically takes care to provide only valid
promt values for the SBU based on the entered the SBG above it.
am only aware of one thing that you can do in Dynamic views that could warrant the use of it.
That is you could put the meta-SQL %OperatorId anywhere in you SQL and the processor will
dynamically substitute this value with the currently logged userid.
Aside from the problem you mentioned, problems also arise when your SQL has two or more
tables joined by a field that is specified as a key in your record definition. In this case, the
processor dynamically appends an ORDER BY KEYFIELD, without the correlation id, which
makes your SQL invalid because KEYFIELD is ambiguous. Also another problem would be if
your SQL has a WHERE clause. When adding criteria, the processor will add an open "(" after
WHERE and a closing ")" at the end of your SQL. For most cases this won't be a problem, but
it will be if your SQL is complicated enough.

The SetEditTable method works with the ExecuteEdits method. It is used to set the
value of a field on a record that has it's prompt table defined as %PromptField value.
%PromptField values are used to dynamically change the prompt record

for a field.
There are several steps to setting up a field that you can dynamically change its
prompt table.
To set up a field with a dynamic prompt table:
Define a field in the DERIVED record called fieldname.
In the record definition for the field you want to have a dynamic prompt table, define
the prompt table for the field as %PromptField, where PromptField is the name of the
field you created in the DERIVED record.
For more information, see Creating a New Record.
Use SetEditTable to dynamically set the prompt table.
%PromptField is the name of the field on the DERIVED work record.
RECORD.recordname is the name of the record to be used as the prompt table.
&MSG.SetEditTable("%EDITTABLE1", Record.DEPARTMENT);
&MSG.SetEditTable("%EDITTABLE2", Record.JOB_ID);
&MSG.SetEditTable("%EDITTABLE3", Record.EMPL_DATA);
&MSG.ExecuteEdits();
Every field on a record that has the prompt table field %EDITTABLE1 will have the
same prompt table, such as, DEPARTMENT.

How to set sql trace in the pIA


"&trace=y" to the sign in URL

Or
Edit-Preferences-Configuration from an applications panel) and click on the "Trace" tab. There
are numerous trace settings that appear as checkbox items; the two that I find most useful
are "SQL statements" and "SQL statement variables
Now that the user is logged in with trace enabled, what needs to happen next? The user
should navigate to the component or page that is causing the problem, but should not yet
replicate the error. Why? Because the trace file can be rather voluminous at this point, so it is
best to delete it and get rid of all the unnecessary SQL executed to that point and make your
trouble-shooting task a little easier. Where do you go to delete the trace? In versions prior to
8.0, you know where the file is because you've entered the path for it (usually something like
c:\temp\sqltrace.log, which can be on the client machine or the server, depending upon
whether you're logged on in two- or three-tier mode). In versions 8.0 or higher, the trace file
is created on the application server in the {PS_HOME}\appserv\{DBNAME}\LOGS directory.
The name is normally a combination of the operator ID used to log in to the session followed
by the machine name or IPAddress and ".tracesql" (e.g., JSMITH_PSSERV.tracesql).

PEOPLESOFT INTERVIEW QUESTIONS


1.What is the use of process profile?

1. what are the important tables in PS-HRMS?


2. when a user logs in to PS, how will the system know in which region the user comes ?
3. How many Grids can we insert in a single component or page?
4. What is the difference between a Grid and a scroll?
5. How many types of ways you can run an Application Engine program?
6. What are the Important SQC are need to be attached?

setenv and stdapi are the two important and mandatory SQC that should be inculded in a
program (Specially when run from Process Scheduler)

7. What is the difference between people soft TECHNICAL,FUNCTIONAL and TECHNOFUNCTIONAL? What is Technical
8. How to use a Dynamic prompt table? what we need to do for it? what should be the length of
the field
9. What is a state record?
10. Why cant the SQL and call Section Actions be present simultaneously in a single step?
12. What are the think-time functions?
13. What are the main differences between PeopleSoft financial 8.4 And 8.8/8.9 version?
14. What happens if you don't specify a Search Record for a Component?
15. Which Table contains Login User Id & Password in Peoplesoft Database?

16. What the main differences between versions of the foll.Peoplesoft CRM 8.8 and CRM 8.9?
Peoplesoft HRMS
17. What are the functional differences for the BI / AR modules for versions 7.5, 8.4, 8.8 and
8.9?
18. Does SAVEEDIT saves first and then apply validations to all fields? OR does it apply
validations to all
19. Difference between Save PreChanges and Save PostChanges w.r.t saveedit?
20. How to test an application engine program in 8.8?
127.
158.

Meta-SQL where is it stored?


DDDAudit what is it?

RE: Performance tuning of SQR?

Performance tuning in SQR can be done using the following


1.Load-lookup cmd
2. Arrays
3.Multiple Reports
4.-Bnn flag
5.By running SQR progrm on server
6.By running SQT files
RE: Performance tuning of SQR?

Performance tuning in SQR can be done using the following


1.Load-lookup cmd
2. Arrays
3.Multiple Reports
4.-Bnn flag
5.By running SQR progrm on server
6.By running SQT files
setenv.sqc,setup02.sqc,prcsapi.sqc,prcsdef.sqc,curdttim.sqc,datetime.sqc are some of the SQC's that
should be present.

what i want exactly is the record formation should be directly IBM_ not that every
time i have to go in record type and make it IBM_ .So the question is still open.
Hi, Find my analysis below,
It is only possible if a name is mentioned in record type tab....
to attain ur requirement U can do the following steps
1.update the SQLTABLENAME with the RECNAME field value in PSRECDEFN table
b4 building the record.
2. Open the record in App Desg and check if u r getting ur recname in record type tab.
3. Build the record.
i hope this will solve ur requirement....
10/13/06

component's information will be stored in PSPNLGRPDEFN


Q How to
write
efficient
AE
program.
1.In short
how to use
set base
processing
?
2.how to
use
temporary
table?
3.how to do
SQL
tunning?
10/19/06

1ANS) plz refer this link

http://eiswbfspb.admin.unt.edu/PSOL/htmldoc/eng/psbooks/tape/chapter.htm?File=tape/htm/tap
Venkatesh
2ANS)
1: Temporary tables are basically used for the parellel processing and for better performance

2: Defines the record definition as a temporary table. Temporary images of the table can be creat
the PeopleTools Options Page. Temporary tables are used for running Application Engine batch
Temporary tables can store specific data to update without risking your main application table.

3: Temp tables are mainly used for Parrellel processing. Also you take the data you want for man
Temp table, and you can play with that. Finally when you get the desired data, you can update th

4: One important thing, when dealing with temp tables. When you use PeopleCode to call the ap
synchronously and also it doesn't use any temporary table instances created for batch processing
instances created for online processing which by default is 3.

5: We use temp records for batch processing.This temp table can store specific data to update wi
main application table.

6: Temporary tables used by the AE to store and manipulate data before writing it back to the ma
10/19/06

3ANs

Venkatesh

1. Replpace unnecessary Full(large)-Table Scans(FTS) with index scans


FTS causes unnecessary I/o that can drag down an entire database.
2.Cache small-table full table scans
In Oracle7 ,an alter table XXXx cache command can be issued .IN Oracle8 and beyond,the smal
cached by forcing it into the KEEP pool.
3.Verify optimal index usage
It improves the speed of queries with multiple WHERE clause predicates.
4.Verufy optimal JOIN techniques
Some queries 'll perform faster with NESTED LOOp joins,some with HASH joins,while others
joins.
5.Tuning by Simplifying SQl Syntax
.Rewrite the Query into a more effcient form
.Use the WITH clause
.Use Global temporary Tables
.Use Materialized Views
10/20/06

3rd answer.
Venky, Since u havent asked a question, i thought id fill up some more lines as answers to the th
optimisation techniques...
Anonymous
1) From peoplecode, there r many ways to selct from a table. You can use SelectByKay, SqlExec
and you can create an SQL object.
When using SelectByKey(), Fill() or select(), you should be aware of which fields are contained
which you are selecting.These functions will fetch each fields in the record. So if the record con
Long fields which you do not want in the result,you should use a view which is built over the sa
which does not contain the 2 columns.
Or in this case use on SqlExec by defining the fields required.

2)The fields OPR_DEF_TBL_RB.BUSINESS_UNIT and OPR_DEF_TBL_RB.SETID are used


as the default value for BUSINESS_UNIT or SETID fields. If these fields are empty in OPR_DE
the current user id, it can end up executing many SQL that will never return any values.

The way tools defaults the value from a RECORD.FIELD is to look first if this field exists in the
If it does, it will use that value and will not have to fetch it from the db. When the field is not on
tools will generate sql to fetch the value from the database. If the value in db is not empty, it wil

and wont have to fetch it again. But, if the value is empty, it will try to fetch it the next time that
will always return an empty value.
To solve this problem, there is a secondary page that you can add at level 0 of your component th
to fetch the value from OPR_DEF_TBL_RB for the current user and store the value in the buffe
will not generate multiple SQL whenever the fields from OPR_DEF_TBL_RB are empty.

3) When an SQL is called multiple times with only one parameter that has changed you might w
the calls into one sql, by creating an IN list for each value that needs to b loaded
tht was my first Q of this thread!!!
anyway, if there is situation like this :
Field= X Record= Y Component= Z
Y.X.Fieldchange code (Record Field level)
Y.X=10;
Z.Y.X.Fieldchange code(Component Record Field level)
Y.X=20;
Once the component is built and in the page, if I change the value of the Field X from 100 to 200. What will
be the new value and how?

Narendra

Accessing XML files


you can access XML files through XMLDoc API...
Sqlexec disadv
2.it bypass the component processor and interact with database directly
3.Only single row of information pass to the output varibable to pass more rows of
information we have to go for get sql method
4.sql exec on be written in field change event . we can access any record in the
compoenet which is not part of the componenet buffer....

Вам также может понравиться