We have a number of PeopleSoft test environments. I have written about my automated build process before, but I have not yet mentioned what we do to the database when we refresh.

My approach here is that I want as much as possible to build the environment from scratch. This means that we have a consistent build. There are also database fields that need to be changed. Recently a colleague and I reviewed the tables that needed changing and came up with the following.

Oracle Supplied Scripts

Oracle supply some data mover scripts in $PS_HOME/scripts which seem like a good start. We run these as part of the refresh process.

ScriptFunction
appmsgpurgeall.dmsPurge the Integration Broker tables (It seems this was called Application Messaging in the past)
perfmonpurgeall.dmsPurge the Performance Monitor tables (See Doc ID 2816396.1 and 660862.1)
prcsclr.dmsProcess Scheduler tables. See Oracle Doc ID 643499.1
rptclr.dmsClear Reports.
psrfclr.dmsClear Report Framework. See manual PeopleTools 8.60: Process Scheduler section Process Scheduler Table Maintenance.
grant.sqlGrants that need to be run after maintenance that may change tables by rename. We don’t need to worry about this as part of the refresh, because the grants come across with the database as noted below.

These do alter a lot of tables, but they don’t do everything. We find we still have to alter a lot more tables listed below.

Tables we Alter

These are additional tables we find we have to alter. There are also some noted in the Oracle Documentation that we don’t find we have to alter, which I also note below.

TableActionWhyTable purpose
PS.PSDBOWNERUpdateChange the OWNERID (sysadm) and DBNAME Database name. See 643499.1Owner id and database name.
PSACCESSPRFLN/APSACCESSPROFILE replaces PSACCESSPRFL beginning with PeopleTools 8.55 - see Doc ID 2107805.1. This table now contains no rows. Needs to be granted to the connect id as per grant.sqlAcess Profile
PSACCESSPROFILEUpdateIf there is to be a different access ID and/or password PSACCESSPROFILE must be updated. Also this need to be granted to the connect id as per grant.sql. This grant is expected to come across with the database, so isn’t done as part of the refresh. The Access ID (sysadm) password is updated using CHANGE_ACCESS_PASSWORD in datamover.Access Profile
PS_AERUNCONTROLTruncateClear down some run controls so jobs aren’t run with production parameters in test. We have another process that schedules batch processes in test environments.Application Engine Run Controls.
PSAPMSGDOMSTATUpdateContains production hostnames in MACHINENAME. Doc ID 1421339.1. >PeopleTools>Integration Broker>Service Operations Monitor>Monitoring>View Synchronous Details. This is cleared by appmsgpurgeall.dms, then rows inserted that pertain to this environment.Application Messaging (Integration Broker) Domain Status.
PSAPMSGQUEUESETTruncateContains hostname in MACHINENAME. We truncate this table.Application Messaging (integration Broker) Message Queue Set.
PS_CDM_DIST_NODEUpdateUpdate the distribution node i.e. the location to which the process scheduler posts reports.Content Distribution (Report) Node definition.
PSDOCSCMADFNUpdateContains URLs in IB_TGTLOCATION. These are updated to match PSIBSVCSETUPDocument Schema Managed Object
PSGATEWAYUpdatevia Doc ID 1421339.1 Contains URL in CONNURL.Integration Broker Gateway
PSIBFAILOVERTruncateContains hostname in MACHINENAME field. >Peopletools>Integration Broker>Service Operation Monitor>Administration>Domain StatusIntegration broker failover configuration.
PSIBHUBDATAUpdateFix the Integration hub page URLs. Contains URLs in: IB_TGTLOCATION, IB_SECTGTLOCATION, IB_ENDPOINT.Integration Broker Hub (Application Messaging) Node Data.
PSIBLBURLSUpdateContains the integration broker URL in CONNURL. There is a unique constraint on this field, so we need to ensure only one row exists with the correct URL.Integration Broker Load Balancer URLs
PSIBOAUTHN/AThis has hostnames in the MACHINENAME column, but we don’t think it’s necessary to update them. It is used to clean up “Access Tokens” that have potentially expired if the functionality is enabled (PIA navigation is People Tools > Security > oAuth2 Administration > Automated Expired Token). 2728992.1.OAUTH Tokens
PSIBSVCSETUPUpdateContains Integration broker URLs in the following columns: IB_SCHEMANAMESPACE, IB_TGTLOCATION, IB_SECTGTLOCATION, IB_RESTTGTLOC, IB_RESTSECTGTLOCIntegration Broker Service Setup data.
PSIBWSDLDFNN/AContains production URLs in IB_WSDLURL, but it appears unused, so we leave this alone.Integration Broker Web Services Description Language Managed Object Definition
PSMSGNODEDEFNN/AAs per 643499.1, but the URL fields aren’t populated, so we don’t alter this.Holds definitions for Message Node objects. Message Nodes represent databases in Application Messaging (Integration Broker).
PSNODEURITEXTUpdateSee 643499.1 Portal URI needs to be updated (Column URL_TEXT).Integration Broker Node URLs.
PSOPERATIONUpdateIB_RESTBASE_URL is reset for the some interfaces. In general we have different prod and non-prod interfaces set up, so most don’t need to change.Integration Broker Operations.
PSOPRDEFNUpdateNeeds to be granted to connectid as per grant.sql. Passwords need to be changed in here. Locked out status of accounts is also changed. Email addresses are changed to prevent accidental release of test emails.Defines Peoplesoft Users.
PSOPTIONSUpdate643499.1: For PeopleTools 8.44 and higher, blank out the GUID in the PSOPTIONS table, This will get regenerated when the new Application Server Domain is started. GUID is used for performance monitor, so can be preserved to prevent lots of environments appearing in performance monitor with the same name. Enable change control locking and history in dev: CHGCTL_USE_LOCKING='Y', CHGCTL_USE_HISTORY='Y'This is a single row table containing PeopleTools system options chosen.
PSOPTIONSADDLInsertChange background colour for a refreshed environmentPresumably for options that didn’t fit in the above table!
PSMCFRENURLIDTruncateContains server names in a number of URL columns.Real-time Event Notification Configuration.
PSPRCSPRFLUpdatedAllow users to update their own jobs. update sysadm.PSPRCSPRFL set RQSTSTATUSUPD = 2 where classid in (select Distinct PRCSPRFLCLS from sysadm.PSOPRDEFN)Process profile
PS_PRCSPURGELISTUpdateDisable the Purge ProcessProcess scheduler purge list
PS_PRCSSEQUENCEUpdateSet process sequence back to 1: update sysadm.PS_PRCSSEQUENCE set SEQUENCENO = 0, LSEQNO = 1Process scheduler sequence
PSPRDMCNTPRVN/AMentioned in 643499.1, but doesn’t seem to contain hostnames.Portal Content Provider
PSPRDMDEFNN/AMentioned in 643499.1, but doesn’t seem to contain hostnames.Portal Definition
PSPRSMDEFNUpdateSanitise all links. Point some to non-prod environments. PORTAL_URITEXT contains links - look for ones that start with http. Column PORTAL_URL_CHECKSUM also needs to match the URL. I make the change in the application then copy the checksum manually.Portal Structure Definition
PSPTPNEVTCLTTruncateDoc ID 2264459.1, Doc ID 2633972.1. Contains hostnames in the HOST column. Errors appear in the PIA servlet logs if this is not corrected. Also needs dummy rows. See document id 2992143.1. This is supposed to fix high webserver CPU.Push Notification Configuration
PS_PTSF_ES_STATDTLUpdateContains hostname of the search instance in PTSF_HOST_NAME and PTSF_KIB_HOST_NAME.Search framework
PS_PTSF_OPTN_SAVEDUpdateNumber of replicas updated to reflect the nodes in the current environment (Minus one) update sysadm.PS_PTSF_OPTN_SAVED set PTSF_SEARCH_PVALUE = 0 where ptsf_srch_provider = 'ES' and PTSF_SEARCH_PNAME = 'PTSF_NOOF_REPLICAS'Search Framework
PS_PTRTIHCOUNTTruncateContains process monitor server names in HOSTNAME.Search Framework Real Time Indexing
PS_PTSF_OPTN_LOADUpdateDefault number of replicas updated to reflect the number of nodes in the current environment. update sysadm.PS_PTSF_OPTN_LOAD set PTSF_OPT_DEFVAL = 0 where ptsf_srch_provider = 'ES' and FIELDNAME = 'PTSF_NOOF_REPLICAS'Search framework default options
PS_PTSF_RTI_PRCSTruncateField HOSTNAME contains production server. This appears to be something to do with index updates.Search Framework
PS_PTSF_SRCH_ENGNUpdateUpdate hostnames and URLs for search instances in columns PTSF_HOST_NAME, PTSF_ADMIN_SRV_URL, PTSF_QRY_SERV_URL, PTSF_SS_URL, PTSF_KIB_HOST_NAME Also contains ports, usernames and passwords.Search Framework
PS_PTSF_SRCH_NODESUpdateSearch nodes are updated to reflect the current environment. Contains a host name in PTSF_HOST_NAME.Search Framework Nodes
PSQRYTRANSTruncateContains host information in HOSTNAME and QRYMACHINENAME fields.Info on running queries
PSRENTruncateContains server names. Only an issue if Realtime Event Notification is used.REN Configuration
PSRENCLUS_OWNERTruncateContains server names if REN is being used.REN configuration
PSRENCLUSTERTruncateContains server names if REN is being used.REN configuration
PSRTNGDFNCONPRPUpdateUpdate Integration Broker routing properties for interfaces to point to development rather than production environments. PROPVALUE contains URLS (Where PROPNAME = ‘URL’) for (e.g.) UCASIntegration Broker routing properties
PS_SAD_UC_CONFIGUpdateChange the UCAS token in SAD_UC_ATTRT, username in SAD_UC_UCIDXML and password in SAD_UC_UCPWXML to the development onesUCAS Configuration
PS_SCHDLDEFNUpdatePause scheduled jobs (Set SCHEDULESTATUS = 2), so only processes that run as part of the refresh run during the refresh, and search indexes aren’t updated until they are first created.Schedule definition
PSSTATUSN/ANeeds to be granted to connectid as per grant.sql. Not needed. The grant should be bought across with the refresh.Peopletools System Control
PSTRUSTNODESN/AFrom 643499.1 This contains a node name, which we preserve in test environments. Not needed - Only contains node names.Message Node
PSURLDEFNUpdateReset performance monitor URL update sysadm.PSURLDEFN set URL = 'http://perfmon/' where URL_ID ='PPM_MONITOR' There may be other URLs in here.URL Definitions
PSUSEREMAILUpdateChange email addressesUser Emails
PSWEBPROFNVPN/A643499.1: Run the following SQL to check the webprofile Virtual Addressing settings: (Cookie domains). e.g. check select * from sysadm.PSWEBPROFNVP where propertyname in ('AUTHTOKENDOMAIN', 'PSWEBSERVERNAME'); Not needed in our system, but may be in others.Web Profile Configuration
PSXP_FILEURLTruncateContains process instance information. Database name in the DBNAME column, and a URL in the DOC_URL column. Truncate on refresh.Report file URLs.

Random Notes

Mail Catcher

In addition to changing all the email addresses, we configure development systems to send email to MailCatcher. We really don’t want to send mails from test systems to end up confusing people, so we use the mail catcher, but also change email addresses just in case emails somehow end up in the real mail system.

Everyone is Different

This works for our system, but the interfaces we have, the technologies we use etc will differ from others. For example we don’t use the Real-time Even Notification (REN) framework. We have the tables listed above because we did experiment with it for a while. We are in the UK, so we have an interface with the Universities and Colleges Admission Service (UCAS). Presumably in other countries there are other agencies which are we might not have set up. So this should not be treated as a complete list. But I think it is a good start.

We also have a number of processes that run after a refresh which also alter data. Our technical team takes care of those, so I don’t know about them. We have a number of custom tables, which I haven’t included above, as others won’t have the same customisations as us. It is worth checking those.

Lastly we use the Appsian Security Platform from Pathlock. I might make a list of tables we alter for that product in a later post.