SQL to find when PeopleSoft table was built and analyzed in Oracle

Ever wondered when a PeopleSoft table was last built / altered or when its database stats were gathered ?

Many times, you need to know that information to analyze what’s happening with a table. For example, your table may not be working correctly or the performance may be degraded.

You may want to check when was the last time changes were done to the table. Of course you can use several other tools to validate this but I find below SQL to be handy.

Here is all the information below SQL will pull for you:

  • PeopleSoft Record Name, Database table name, PeopleSoft Record description
  • Find when was the last time PeopleSoft table was built (for e.g. when you use application designer to build a table or run a SQL script to build it)
  • Find when was the last time stats were gathered and analyzed for PeopleSoft table

PS Basics Tip

PeopleSoft Record definition and corresponding database table are 2 different objects
-- Find when PeopleSoft table was built and analyzed
SELECT A.OWNER,
A.OBJECT_NAME AS TABLE_NAME,
B.RECNAME AS RECORD_NAME,
B.RECDESCR AS DESCRIPTION,
A.CREATED,
C.LAST_ANALYZED
FROM DBA_OBJECTS A, PSRECDEFN B, DBA_TABLES C
WHERE     A.OWNER = 'SYSADM'
AND A.OBJECT_TYPE = 'TABLE'
AND (A.OBJECT_NAME = B.RECNAME OR A.OBJECT_NAME = 'PS_' || B.RECNAME)
AND A.OBJECT_NAME = C.TABLE_NAME
AND C.NUM_ROWS > 0;

Above SQL will give you the data for all the PeopleSoft table but if you want you can filter it using C.TABLE_NAME OR A.OBJECT_NAME.

If you like this tip, just let us in the comment section. Share it with others too.

 

Related Posts you might find helpful

How To Change PS stylesheet using SQL
Stylesheets as the name suggests is the piece of code that adds style to your PeopleSoft application. When you log[...]
Learning Oracle SQL the Easy Way
If you plan to use Oracle - the most powerful database in the world, there is one skill you need[...]
SQL Monitoring in OEM 12c
SQL Monitoring was instrumented and available for command line use in the first release of the Oracle Database 11g. The[...]
Find PeopleSoft Navigation for a component using SQL
You can use below SQL to find PeopleSoft Navigation to a component. In below SQL replace the value of PORTAL_URI_SEG2[...]
Prashant
 

Click Here to Leave a Comment Below 0 comments