In my development environment, I had a request to create 30 new OPRID’s cloning an existing developer id template. I was not interested in logging into PeopleSoft, navigating to PeopleTools > Security > User Profiles > Copy User Profiles, and creating the clone 30 times. Hmm…

So here is what I did.

1.Create a dummy table

create table hx_clone_ids (oprid varchar2(30));

2.Insert all desired OPRID values. For example,

INSERT INTO HX_CLONE_IDS SELECT ‘HX_NPAI_’||ROWNUM FROM PSOPRDEFN WHERE ROWNUM < 31;

3.Execute below SQL’s (OPRID to be cloned is NPAI).

INSERT INTO PSOPRALIAS

SELECT

HX.OPRID,

OPRALIASTYPE,

OPRALIASVALUE,

SETID,

EMPLID,

CUST_ID,

VENDOR_ID,

APPLID,

CONTACT_ID,

PERSON_ID,

EXT_ORG_ID,

BIDDER_ID,

EOTP_PARTNERID

FROM PSOPRALIAS A, HX_CLONE_IDS HX WHERE A.OPRID = ‘NPAI’;

INSERT INTO PSOPRDEFN

SELECT

HX.OPRID,

VERSION,

OPRDEFNDESC,

EMPLID,

EMAILID,

OPRCLASS,

ROWSECCLASS,

OPERPSWD,

ENCRYPTED,

SYMBOLICID,

LANGUAGE_CD,

MULTILANG,

CURRENCY_CD,

SYSDATE,

ACCTLOCK,

PRCSPRFLCLS,

DEFAULTNAVHP,

FAILEDLOGINS,

EXPENT,

OPRTYPE,

USERIDALIAS,

LASTSIGNONDTTM,

LASTUPDDTTM,

LASTUPDOPRID,

PTALLOWSWITCHUSER

FROM PSOPRDEFN A, HX_CLONE_IDS HX WHERE A.OPRID = ‘NPAI’;

INSERT INTO PS_ROLEXLATOPR

SELECT

HX.OPRID,

DESCR,

HX.OPRID,

EMAILID,

FORMID,

WORKLIST_USER_SW,

EMAIL_USER_SW,

FORMS_USER_SW,

EMPLID,

ROLEUSER_ALT,

ROLEUSER_SUPR,

EFFDT_FROM,

EFFDT_TO

FROM PS_ROLEXLATOPR A, HX_CLONE_IDS HX WHERE A.OPRID = ‘NPAI’;

INSERT INTO PSUSERATTR

SELECT

HX.OPRID,

HINT_QUESTION,

HINT_RESPONSE,

NO_SYMBID_WARN,

LASTUPDDTTM,

LASTUPDOPRID,

MPDEFAULMP

FROM PSUSERATTR A, HX_CLONE_IDS HX WHERE A.OPRID = ‘NPAI’;

INSERT INTO PSUSEREMAIL

SELECT

HX.OPRID,

EMAILTYPE,

EMAILID,

PRIMARY_EMAIL

FROM PSUSEREMAIL A, HX_CLONE_IDS HX WHERE A.OPRID = ‘NPAI’;

INSERT INTO PSROLEUSER

SELECT

HX.OPRID,

ROLENAME,

DYNAMIC_SW

FROM PSROLEUSER A, HX_CLONE_IDS HX WHERE ROLEUSER = ‘NPAI’;

Posted by Nitin Pai
Comments (4)
October 1st, 2007

Comments (4)

Nitin Pai - October 19th, 2007

Hi This is a good question. I will create a new post as my response. Thanks Nitin

MM - October 19th, 2007

Hello Nitin Could you let me know the records and what fields i need to query in case a PS Message does not get subscribed or published properly? I follow ur blog regulary and have seen for Application Server(whether it is up or down) you poll the PSAPPSRV process via DB or Unix.So in the above case can we get something similar Basically working on a script to detect failed messages.. Thanks MM

Nitin Pai - October 16th, 2007

Hi I have not tried the Excel to CI method to load the OPRIDs. I know that it can be used to load data from Excel into PS. The post features steps for a DBA to understand what goes behind the scenes when we try to clone the OPRID in PS. The SQLs executed by PS can be replicated to quickly get the desired results (i.e. cloning OPRID's). Thanks Nitin

Vijayalakshmi C - October 15th, 2007

Hi, Did you try using Excel to CI for this.

Comments are closed.