Tuesday 25 September 2007

How to unleash the best of Oracle Features… Part I

In this series, I will cover some of the Oracle features that can be easily implemented to optimize our PeopleSoft environment.
Resumable Space
In todayworld, we will hardly find a database that is not monitored for space usage. But there is still a possibility for our process failing because it ran out of space in the UNDO tablespace or user defined tablespace or the DBA was too late to allocate the required space. Majority of PeopleSoft processes have restart capability. However, there might be instances where you just cannot afford to let the process fail and restart from the last commit/rollback step, example – data conversion during cutover.
The Resumable Space feature provides the facility to suspend transactions when they hit the space errors. The transaction will resume when the error is corrected.
Below are the steps to implement this feature for a SQR process.
1. Modify the SQR to include the following procedure which will be called at the start of the process.
begin-procedure SetResumable          ! Set RESUMABLE in current session
begin-SQL
ALTER SESSION ENABLE RESUMABLE;
end-SQL
end-procedure

2. Create an AFTER SUSPEND trigger to monitor any transactions which have been suspended
CREATE OR REPLACE TRIGGER resumable_alert_notifier
AFTER SUSPEND
ON DATABASE
BEGIN
– LOG ERROR
INSERT INTO RESUMABLE_ERR_LOG (
SELECT SQL_TEXT, ERROR_MSG, SUSPEND_TIME
FROM USER_RESUMABLE
WHERE SESSION_ID = (SELECT DISTINCT(SID) FROM V$MYSTAT));
– Send Email notification using UTL_SMTP
– Code not shown
END;
You can determine the best strategy (notification or timeout or abort or log error) when transaction is suspended by coding in the AFTER SUSPEND trigger.
Summary
Resumable Space is a cool feature and I recommend it be considered for implementation in your production environment to avoid business critical processes from failing when it encounters space issues. As with any implementation the mantra is “Understand > Plan > Implement in non-production db > Test > Test > Test > implement in production > relax”.
Read More About  Oracle Features

Monday 17 September 2007

PSADMIN and Remote Desktop


Ever had problems connecting to your server hosting the NT process scheduler or App Server using Remote Desktop and not being able to use“psadmin” to perform administrative tasks?

Here is what happens when you connect to the server using remote desktop and invoke psadmin.


You will receive the above message when you try to check the status of process scheduler.
So, how do you determine if you NT process scheduler is running? There are multiple ways to determine if your process scheduler is running.
1.Look at the task manager
2.Look at the log files
3.Check status using psadmin
In this post, I will cover the last method since the other two are straighforward.
Here is how you can use psadmin when connected using remote desktop.

1.Ensure that the “Telnet” service is started on the server

2. Go to Start > Run > Telnet <servername>

3.You will get a command prompt window

4.From this prompt, go to your PS_HOME/appserv

5.Invoke psadmin

Now, you should be able to use the “psadmin” utility for monitoring, configuring, start, stop, etc.

Read More: PsAdmin

Tuesday 11 September 2007

PeopleCode Properties???

Sometime back, I had this question from my team mentioning – How do we determine when and who had customized this particular Record PeopleCode? The compare report showed that the PeopleCode was customized but there were no comments (bad practice!) in the code to show who touched it last.
In Application Designer the properties button is grayed out when you open the peoplecode. Also, the properties at the record level will not answer this question. Here is the SQL you can use to determine who last updated the code and when.
SELECT A.OBJECTVALUE1 RECORD, A.OBJECTVALUE2 FIELD, A.OBJECTVALUE3 EVENT, TO_CHAR(A.LASTUPDDTTM,’YYYY-MM-DD-
HH24.MI.SS.”000000″‘),
A.LASTUPDOPRID
FROM PSPCMPROG A
WHERE A.OBJECTVALUE1 = ‘&RECNAME’
AND OBJECTVALUE2 = ‘&FIELDNAME’
AND UPPER(OBJECTVALUE3) = UPPER(‘&EVENTNAME’)
/
RECORD FIELD EVENT TO_CHAR(A.LASTUPDDTTM,’YYY LASTUPDOPRID
——— ————— ——— ————————– ————
VOUCHER BUSINESS_UNIT RowInit 2006-11-13-18.25.23.000000 PPLSOFT
VOUCHER BUSINESS_UNIT RowInit 2006-11-13-18.25.23.000000 PPLSOFT
Read More about PeopleCode Properties

Thursday 6 September 2007

Good Practice for executing PSBUILD scripts

I have had change control call me several times in the past to restore a table because it was accidentally dropped when executing the SQL script generated using Application Designer. Whenever you use Application Designer to generate a script with “Alter by Table Rename” option checked, the script will have the following SQL’s
– Start the Transaction
– Create temporary table
– Copy from source to temp table
– CAUTION: Drop Original Table
– Rename Table
– Done
The risk of running this script As-Is is that if any of the above SQL encounters an error then the script will still proceed to run the next SQL in the script. So if there is an error while running any SQL prior to dropping the original table then we would have lost the table and all the data.
Hence the best practice for running any scripts created using Application Designer is to include ‘WHENEVER SQLERROR EXIT’ at the beginning of the script. This will ensure that the script will abort anytime there is an error. Making this part of our Change Control checklist has ensured that there is no reoccurrence of this issue.
Note:
Scripts generated using Change Assistant automatically have ‘whenever sqlerror exit’ at the beginning of the script.
Read More about  PSBUILD Scripts

Monday 3 September 2007

Not able to view record in PeopleSoft Query Manager!!

Sometime back, I was approached with a request from a developer who had created a new record in Application Designer but was not able to view this record in Query Manager. So in this post, I will demonstrate the steps required to view a new or existing record in Query Manager. Below steps are from Tools version 8.47.02.
  1. New record HX_TEST has been created and we would like to use it in our PS Query.
  2. Navigate to PeopleTools > Security > Query Security > Query Access Manager
  3. Search for the Tree which should have access to this record.

  1. Click on the hyperlink and add the record HX_TEST
Query_sec1
  1. Open the appropriate Permission List which has access to HX_TEST_TREE and click on the Query tab
Query_sec2
  1. Click on Access Group Permissions
Query_sec3
  1. Verify the access
Query_sec4
  1. Open PeopleSoft Query Manager and you should have access to this new record.
Query_sec5

Query_sec6 
Note that this activity is the realm of PeopleSoft Security Administrator since it needs careful analysis of the question