Tuesday, July 29, 2008

Permission Lists Associated to a User

Here is the query to find the permission lists associated to a user:

SELECT A.OPRID, D.ROLEUSER, B.ROLENAME, B.CLASSID, C.ClASSDEFNDESC
FROM PSOPRDEFN A, PSROLECLASS B, PSCLASSDEFN C, PSROLEUSER D
WHERE A.OPRID=D.ROLEUSER AND B.CLASSID=C.CLASSID AND B.ROLENAME=D.ROLENAME AND A.OPRID= 'USER_NAME'
ORDER BY
B.CLASSID



Monday, July 28, 2008

Simple Example of Unix "sed" command

Replacing all occurrences of rakesh to raka in file tst

sed s/rakesh/raka/ tst-1


Replacing all occurences of "raka" in old file tst-1 to "rakesh" in new file tst-2

sed s/raka/rakesh/ < tst-1 > tst-2


$ echo rakesh | sed s/rakesh/raka/

raka


$ echo I am rakesh | sed s/rakesh/raka/

I am raka


$ echo I am rakesh | sed 's/rakesh/raka/'

I am raka


s: Substitute Command

/../../ : Delimiter

rakesh : Regular Expression Pattern Search Pattern

raka : Replacement String


$ sed 's/\/tmp\/rk/\/tmp\/rk\/1/' tst-1

hi rakesh parwal

here is the directory /tmp/rk/1


Wednesday, July 23, 2008

PSPRCSRQST, PSPRCSQUE and PSPRCSPARMS

In order to avoid various process scheduler related issues, three Process Scheduler tables PSPRCSRQST, PSPRCSQUE and PSPRCSPARMS must be in sync.

Execute below queries:

select count(*) from PSPRCSRQST;select count(*) from PSPRCSQUE;select count(*) from PSPRCSPARMS;

If these queries give different results, you should bring them in sync by executing below statements:

DELETE FROM PSPRCSQUE QUE WHERE NOT EXISTS (SELECT 'X' FROM PSPRCSRQST RQST WHERE RQST.PRCSINSTANCE = QUE.PRCSINSTANCE);

DELETE FROM PSPRCSPARMS PARMS WHERE NOT EXISTS (SELECT 'X' FROM PSPRCSQUE QUE WHERE QUE.PRCSINSTANCE = PARMS.PRCSINSTANCE);

Also, Column RUNSTATUS of any process instance in table PSPRCSRQST must have same value in table PSPRCSQUE for that process instance... below query will show check for it.

select R.PRCSINSTANCE, R.RUNSTATUS, Q.PRCSINSTANCE, Q.RUNSTATUS from PSPRCSRQST R, PSPRCSQUE Q
where R.PRCSINSTANCE=Q.PRCSINSTANCE and R.RUNSTATUS != Q.RUNSTATUS

*** Also, it is a good practise to delete the processes with delete, error or cancelled status from the PeopleSoft tables:

DELETE FROM PSPRCSRQST where RUNSTATUS = '2' --> 2 is the run status for delelted process. DELETE FROM PSPRCSQUE where RUNSTATUS = '2'

*** Key Point: Data in PSPRCSRQST, PSPRCSQUE and PSPRCSPARMS tables must be in sync.

Thursday, July 10, 2008

Process Run Status - PSXLATITEM

You can query PSXLATITEM table to know the value corresponding to a process run status.




SELECT XLATLONGNAME, FIELDVALUE FROM PSXLATITEM WHERE FIELDNAME = 'RUNSTATUS';




XLATLONGNAME ------------ FIELDVALUE

------------------------- ----------

Cancel ------------------------ 1

Not Successful --------------- 10

Posted ------------------------ 11

Unable to post --------------- 12

Resend ----------------------- 13

Posting ----------------------- 14

Content Generated --------- 15

Pending ----------------------- 16

Success With Warning ------ 17

Blocked ----------------------- 18

Restart ----------------------- 19

Delete ------------------------- 2

Error -------------------------- 3

Hold -------------------------- 4

Queued ----------------------- 5

Initiated ---------------------- 6

Processing -------------------- 7

Cancelled --------------------- 8

Success ----------------------- 9



19 record(s) selected.

OCI - Attach Block Volume to Windows VM

Tip: Although creating and attaching Block Storage to a Windows VM is pretty straightforward (OCI documentation is pretty good for that), th...