Posts

Cleanup Oracle ADR trace files on Linux

Here's a nice loop cleanup the Oracle DB trace files on Linux with the adrci utility.

#!/bin/bash
#cleanup Automatic Diagnostic Repository (i.e trace files)

#set oracle_home (have a script with your home info)
source ~/OracleHomeScript.sh

#list current repo size
echo ""
echo "##############size before############"
du -shx /u01/app/oracle/diag

echo ""
echo "Listing diag directory homes..."
echo ""
ADR_HOMES=`adrci exec="show homes" |grep -v "ADR Homes:"`
adrci exec="show homes" |grep -v "ADR Homes:"
echo ""
echo ""

#Set-up loop for each home
#

for f in $ADR_HOMES
do
echo "purging $f older than 1 week"
#Slow ADRCI Execution When Purging Files After Upgrade to 12.2 (Doc ID 2335738.1)
adrci exec="set homepath $f; purge -age 10080 -nolog"
done

#list ADR repo size after
echo ""
echo "##############size after############"
du -shx /u01/app/o…

Cleaning up Oracle Recycle Bin

It is a good idea to keep tabs on the recycle bin in your Oracle database, especially after PeopleSoft upgrades. This info is in the dba_recyclebin view.

To check the size and number of objects
select count(*), sum(space)/1024/1024 AS "Size in MB" from dba_recyclebin;
To empty it purge dba_recyclebin

Monitoring Diskspace Usage on Linux

While I would always advocate to monitor OS metrics like disk space usage with an agent (i.e. Enterprise Manager/Zabbix/Prometheus) sometimes, that's not always an option. For a recent edge case I needed to drop in a crontab script and wanted something dynamic (no hard coding) and informative. Here's what I came up with that may be useful for others.

The output will look something like this:

Running low on space "/dev/sda1 (85%)" on server.domain.com as on Tue Jul  3 12:54:39 EDT 2018.  It is mounted at /u01.

To find large directories in the mount use the disk usage command, i.e. - du -ax /u01 | sort -n -r | head -n 10
  **This email was generated from a script run on server.domain.com**

PeopleSoft HCM and PS Query Performance

Recently during a PeopleSoft HCM upgrade to image 24, we noticed our PeopleSoft Query performance was very poor. Thanks to a tip from the psadmin.io podcast, we found a work around referenced in Oracle doc id  - Multiple PSQueries Having Performance Issues After 9.2 Upgrade (Doc ID 2146808.1).

The short version of the doc id, is to open Application Designer and switch the PERALL_SEC_QRY and EMPLMT_SRCH_QRY views from using the Oracle Specific SQL, back to the default SQL. It seems in Oracle's efforts to improve the performance of these views for their Oracle DB customers, they may have made it worse depending on your data.

Which Java version is my WebLogic server running?

While reviewing an Oracle CPU, I was asked to make sure we are running the current version of Java with our WebLogic servers. This should be an easy task, but Oracle's PeopleSoft DPK loads many version of Java, so it is not easy to know which one is in use. A quick Google, and I found a way to check the path of any running process. (in this instance, we're running Linux)
First find the PID for the process ps -ef | grep -i java | grep -i "weblogic domain"
      2. Check the path of the process against the /proc/ information
ls -l /proc/"PID"/exe
An the result will show the path to your java home. If you're not sure the version in the java home, just go to the directory and run  ./java --version
For PeopleSoft, if you ever need to change the JAVA_HOME path that your WebLogic domain will use. You just need to modify the file $PS_CFG_HOME/webserv/bin/setEnv.sh. In this file, is an option to override the default JAVA_HOME.

PeopleSoft login error STR_PCMINVPORTAL: Invalid portal name EMPLOYEE in request

Image
Recently I was alerted that after an upgrade, PeopleSoft SSO was no longer working. When users tried to access a trusted instance i.e. from FSCM->HCM, they were missing CSS on the page and it contained the error "STR_PCMINVPORTAL: Invalid portal name EMPLOYEE in request" on the page.

This was puzzling, because the only info on Oracle support was related to the Interaction Hub aka Portal. After talking with support, it turns out the issue was related to a PeopleTools upgrade. In PT853 you did not need to set the urls on the node tabs. Now this is mandatory. We also need to make 1 additional change to the webprofile because we are still using classic mode. Steps below:
You must set the node url on the portal tab for local AND remote nodes.  This is as of PT854 and newer. Any node that shows up under PeopleTools ->Security Objects->Single Signon must have the Context URI Text and Portal URI Text values set to point at the URL's for the remote systems.


You must set a…

Instant Reverse Proxy with Docker

Recently I have been using Docker to build out an Apache reverse proxy in development. The advantages of using Docker in this scenario are: Increased Security through isolation - Docker containers jail your application so that the main operating system hosting the container is protected. The containers are ephemeral and can be rebuilt in seconds. Some organizations rebuild their applications on a nightly basis.Fast Deployment - Once your docker file is setup you can deploy docker containers in seconds. This makes it very simple to graduate changes from development to production or rebuild infrastructure in DR scenarioCloud Friendly - Docker containers are very portable. If suddenly your organization wants to move to cloud infrastructure or hosting providers, it is a relatively simple task to move these containers. Additionally, cloud companies like Amazon, Azure are heavily invested in Docker and already have many of the tools in place for organizations using Docker.
What does this lo…