PeopleSoft PUM Image Maintenance

The PeopleSoft PUM Image VMs seems to work pretty well once installed.  There is very little maintenance that I have had to perform on these environments and I can always start over by rebuilding the VM if I really break something.  Still, there have been some small issues recently that have required digging into the these environments so here are some notes to help.


Database Administration

The Oracle Database runs within the same VM and can be accessed using TNS with SQLPlus, SQL Developer, or most other Oracle-compatible tools.  However, I recently needed to make some adjustments to the SYSADM privileges.  For this I needed to connect as SYSDBA.

1. Login to the VM as root  (this account was setup when you installed the image)

2. Switch to the oracle account.  This is the database owner.


su - oracle

3. You then need to know the database name to connect to.  The easiest way is to look for the pmon process.  In the example below the database name would be CDBHCM.


ps -ef | grep pmon






You could also look at the listener to get the database name.  
First, get the listener name...

cat $ORACLE_HOME/network/admin/listener.ora






Then use the listener name to find the database names...

lsnrctl status <LISTENERNAME_from_above>












Note that the images now use Oracle 12c databases, so the database name above may not be what you have named your PeopleSoft instance, it is the "Container Database" that then contains the PeopleSoft "Pluggable Databases".

Next, you need to export the ORACLE_SID environment variable.

export ORACLE_SID=CDBHCM    ###this is the container identified above

Now you can login to the database.

sqlplus /nolog
connect / as sysdba

At this point you are in the container database.  Remember, Oracle 12c!  You need to switch to the PeopleSoft "Pluggable Database" before you can do anything to the PeopleSoft environment.  This will be the name you gave your database during the image installation.

alter session set container = <psdbname>;
-- ex. alter session set container = hrdmo92;


You should now be able to work with the PeopleSoft users, schemas, etc.


Restart Application Server, Process Scheduler or Web Server

You can do this a couple different ways.

1. Login to the VM, switch to psadm2 user then run psadmin

su - psadm2
psadmin


2. PUM Images includes services for the Application Server, Process Scheduler, PIA and database.  Look for these under /etc/inid.d, they they are named psft-*.
You can use the Linux services commands to control these.

sudo service psft-appserver restart

sudo service psft-prcs restart

sudo service psft-pia restart



PeopleSoft PUM Image Environment not Responding


The disk drives configured in the PeopleSoft PUM VMs are relatively small and can fill up quickly when there are issues.  I have noticed some of the recent images, especially Interaction Hub, creating quite a few core dumps in the Application Server directories.  These will quickly consume all available space on the Application Server volume and cause the application to stop responding.

The steps below will help to identify and cleanup these files.

1. Login to the VM

2. Check the available disk space.  You will probably see a volume with no free space.

df -h

3. Switch to the psadm2 user.

su - psadm2
cd $PS_CFG_HOME

4. Review the Application Server and Process Scheduler directories and remove any core dump files, or other log or trace files, as needed.

The default server names are APPDOM and PRCSDOM.  If you have changed these then adjust the commands below as necessary.

cd $PS_CFG_HOME/appserv/APPDOM
rm -f core.*

cd $PS_CFG_HOME/appserv/prcs/PRCSDOM
rm -f core.*


Note: If you are uncertain about the naming of the servers you can list the names using psadmin command line tools.

### returns application servers
psadmin -c list

### returns list of process schedulers
psadmin -p list

5. Restart the Application Server and Process Schedulers when you are done.


Another hint, if you wanted to script some of this you could...  In fact, there are some great new features available through the psadmin comand line.  The list command is one I find particularly useful.

### delete appserver coredumps
for DOMAIN in `psadmin -c list`;  do  rm -f $PS_CFG_HOME/appserv/${DOMAIN}/core.*;  done

### delete process scheduler coredumps
for DOMAIN in `psadmin -p list`;  do rm -f $PS_CFG_HOME/appserv/prcs/${DOMAIN}/core.*;  done


Change Connect ID Password 

You may want to change the Connect ID or password in your PeopleSoft image environment.  Maybe to run compares to existing environments or just to be able to use your already-installed Application Designer instance.

The basic steps involved are...

1. Login to VM

2. Update password in the database.  Substitute appropriate Connect ID and Password

su - psadm2
sqlplus sysadm@hrdmo92
alter user <connect_id> identified by <connect_password>;
exit

3. Reconfigure Application Server and Process Scheduler with new password

su - psadm2
psadmin


Scripting

We could also do some scripting to handle this type of task.  Again, some of the new psadmin command line parameters are very handy!  I may need to write up something focusing on those...

For now, this script will ask for the database name, the old password and the new password.  It will then update the password in the database then reconfigure the PeopleSoft servers.  This will shutdown the environments to perform the reconfigure so you will need to restart them afterwards.  See above for steps to do that.

#!/bin/bash
echo ""
echo "============================================================================="
echo "Change PEOPLE Password in Database, Application Server and Process Scheduler "
echo "============================================================================="
echo ""

  ### cleanup directories on PUM Image environments, otherwise update steps will fail
  for APP_DOMAIN in `psadmin -c list`
  do
    #cleanup
    rm -f $PS_CFG_HOME/appserv/$APP_DOMAIN/core.*
  done
  for PRCS_DOMAIN in `psadmin -p list`
  do
    #cleanup
    rm -f $PS_CFG_HOME/appserv/prcs/$PRCS_DOMAIN/core.*
  done

# get DBNAME
currdbname=
while [ -z ${currdbname} ]
do
    echo -n 'Enter Database Name: '
    read currdbname
    echo ""
done
echo ""
echo ""

# get old PEOPLE password
pwpeople=
while [ -z ${pwpeopleold} -o ${pwpeopleold} != ${pwpeopleold2} ]
do
    stty -echo
    if [ -z ${pwpeopleold} ] 
    then 
      echo -n 'Enter old PEOPLE Database Password: '
    else
      echo -n 'Retry old PEOPLE Database Password: '  
    fi
    read pwpeopleold
    echo ""
    echo -n 'Confirm Password: '
    read pwpeopleold2
    stty echo
    echo ""
done
echo ""
echo ""

# get new PEOPLE password
pwpeople=
while [ -z ${pwpeople} -o ${pwpeople} != ${pwpeople2} ]
do
    stty -echo
    if [ -z ${pwpeople} ] 
    then 
      echo -n 'Enter NEW PEOPLE Database Password: '
    else
      echo -n 'Retry NEW PEOPLE Database Password: '  
    fi
    read pwpeople
    echo ""
    echo -n 'Confirm Password: '
    read pwpeople2
    stty echo
    echo ""
done
echo ""
echo ""

if [ -z ${PS_HOME} ]
then
  echo "ERROR: Must be under the PeopleSoft user to run this script!  For DEMO images this is psadm2. "
else
  
  ### change PEOPLE password 
  sqlplus -s /nolog << EOF
  CONNECT PEOPLE/${pwpeopleold}@${currdbname};
  alter user PEOPLE identified by ${pwpeople};
  exit;
EOF
  echo ""
  
  ### iterate through domains using the psadmin list commands  (see psadmin --help for details)
  for APP_DOMAIN in `psadmin -c list`
  do
    echo "Processing Domain: ${APP_DOMAIN}"
    #reconfigure
    cp -p  ${PS_CFG_HOME}/appserv/${APP_DOMAIN}/psappsrv.cfg  ${PS_CFG_HOME}/appserv/${APP_DOMAIN}/psappsrv.cfg.$(date +%Y%m%d%H%M%S);
    psadmin -c configure -d ${APP_DOMAIN} -cfg [Startup]/ConnectId=PEOPLE#[Startup]/ConnectPswd=${pwpeople}
    echo "Domain ${APP_DOMAIN} Complete"
    echo ""
  done
  
  for PRCS_DOMAIN in `psadmin -p list`
  do
    echo "Processing Domain: ${PRCS_DOMAIN}"
    #reconfigure
    cp -p ${PS_CFG_HOME}/appserv/prcs/${PRCS_DOMAIN}/psprcs.cfg  ${PS_CFG_HOME}/appserv/prcs/${PRCS_DOMAIN}/psprcs.cfg.$(date +%Y%m%d%H%M%S)
    psadmin -p configure -d ${PRCS_DOMAIN} -cfg [Startup]/ConnectId=PEOPLE#[Startup]/ConnectPswd=${pwpeople}
    echo "Domain ${PRCS_DOMAIN} Complete"
    echo ""
  done
fi

echo "Done!"

Comments

Post a Comment

Popular posts from this blog

Getting Client IP Address in PeopleSoft

Records in a PeopleSoft Component