Prueba PDF
Prueba PDF
Prueba PDF
Implementation Instructions
Table of Contents
1 - Pre-installation Considerations...............................................................................................................................................................2
1.1 - Leverage Automatic Upgrade of Existing pscbo_stats Package....................................................................................................2
1.2 - Install and Configure AWR or StatsPack.......................................................................................................................................2
1.3 - Install the SQLT package...............................................................................................................................................................2
1.4 - optional - Alter Process Scheduler Timing Summary....................................................................................................................2
1.5 - Confirm Required Privileges.........................................................................................................................................................3
1.6 - Prepare for Statistics-Gathering Jobs Changes..............................................................................................................................3
1.7 - Review “Advice for the PeopleSoft Oracle DBA.”.......................................................................................................................3
1.8 - Review “pscbo_stats FAQs.doc.”..................................................................................................................................................4
1.9 - Consider Upgrading Oracle to Current Patchset............................................................................................................................4
2 - Package Installation and Configuration Steps........................................................................................................................................5
2.1 - Install the pscbo_stats package......................................................................................................................................................5
2.2 - Populate the Statistics Control Table.............................................................................................................................................5
2.3 - Run the Quick Configuration Procedure........................................................................................................................................5
2.4 - Reconfigure the AUTOSTATS_TARGET to be ORACLE...........................................................................................................6
2.5 - pscbo_stats v1 upgrade users only: Handle Previous Exclusion Exceptions................................................................................6
2.6 - optional: Configure Custom Preferences and Exceptions.............................................................................................................7
2.7 - Stop and Restart All Process Schedulers and Application Servers................................................................................................7
2.8 - Perform Initial Setup of Schema Statistics....................................................................................................................................8
2.9 - optional: GRANT access to the pscbo_stats package to non-SYSADM users.............................................................................8
2.10 - Schedule Statistics Gathering......................................................................................................................................................8
3 - Package Removal Instructions..............................................................................................................................................................11
3.1 - Restore MetaSQL Used to Collect Table Statistics to the Default Values...................................................................................11
3.2 - Restart All Process Schedulers and Application Servers.............................................................................................................11
3.3 - Remove the Package, Package Body, and Tables........................................................................................................................11
3.4 - Unlock Table Statistics as Appropriate........................................................................................................................................11
3.5 - Revoke GRANTS as Appropriate................................................................................................................................................12
3.6 - Reinstate Previous Statistics Gathering Processes.......................................................................................................................12
3.7 - Regather the Statistics Based on Previous Statistics Gathering Strategy....................................................................................12
All the tables and PL/SQL procedures associated with pscbo_stats are installed and/or upgraded by the
setup script. If tables associated with an earlier version of pscbo_stats are found, they and their contents
will be automatically upgraded to the current structures. It is safe to rerun the setup script over an
existing installation.
It is advantageous to have the SQLT package installed and current before testing since it will be able to
collect more information. The “SQLTxecute” method is helpful for extracting information “after the
fact” and is a very common report to provide Oracle Software Support.
SQLT does not require a separate license. For more information, refer to
SQLT (SQLTXPLAIN) - Tool that helps to diagnose a SQL statement performing poorly (Doc ID
215187.1)
Add/extend the following trace options to the psprcs.cfg file. See PeopleBooks for additional
information regarding these changes.
Note: Some customers have reported that the North American Global Payroll PayCalc process, and other
process with a large amount of looping, can be impacted using this TraceSQL setting. In that is the case,
then globally setting this value could be problematic. If that is the case, and you still want to trace a
specific set of processes, then refer to the follow note for details regarding tracing at the process level:
E-COB: How to Trace COBOL Processes Using the Process Definition (Doc ID 1470210.1)
Before you proceed with the installation process, ensure that these GRANTs do not compromise any
existing corporate security policies. Understand that each of these GRANTs must be in place for the
pscbo_stats package to function properly.
Additionally, if a user other than SYSADM needs to manipulate the pscbo_stats package, ensure that
he/she can be granted execute privileges to the pscbo_stats package. Depending on your security
configuration, the GRANTs listed above may also be necessary for that user.
Note: When a pluggable database is being used, alter the session to point to the correct container, e.g.
ALTER SESSION SET CONTAINER=<PDB>;
This step should run very quickly, typically completing in less than a minute.
This step should run very quickly, typically completing in a few seconds.
This step should run very quickly, typically completing in a few seconds.
Tables that in v1 were excluded need to be locked in v2. During the initial installation, the table names
listed in the exclusion exception table are written to the log table PSCBO_LOG. These names can be be
identified with the simple predicate, e.g.
SELECT TABLE_NAME
FROM SYSADM.PSCBO_LOG
WHERE LINE LIKE 'PSCBO_EXCLUDE_TABLES'
One easy way to lock tables that were previously excluded is to “write a script that writes a script.” The
following sample query will generate a SQL script that, when run subsequently, will lock tables that
were previously excluded. Modify and execute this script as appropriate for your installation.
It may be appropriate to not gather the statistics on extremely large objects or on those with complex
partitioning strategies. To prevent a given table from being processed by the pscbo_stats package, simply
lock the statistics using the dbms_stats package.
Procedure provided:
dbms_stats.lock_table_stats('SYSADM','PS_MYSTATS');
Another very common approach to improving the speed of statistics gathering is to run the statistics
gathering process with parallelism enabled. Increasing the table preference DEGREE - to some value
less than the number of CPU's available - is usually appropriate for larger objects. Override the table
preference using the dbms_stats package.
Note: see pscbo_stats FAQ document, question #10 for additional suggestions.
Procedure provided:
exec dbms_stats.set_table_prefs('SYSADM','PS_BIGTBL','DEGREE','8');
Limiting the scope over which statistics are gathered on partitioned tables can improve performance. For
partitioned tables where the default granularity is not desired, override the table preference to the
appropriate level using the dbms_stats package.
Procedure provided:
exec dbms_stats.set_table_prefs(
'SYSADM','PS_MANYPART','GRANULARITY', 'GLOBAL AND PARTITION');
2.7 - Stop and Restart All Process Schedulers and Application Servers.
To ensure that the updated DDL model syntax is used, it is necessary to stop and restart all Process
Scheduler and Application Server domains when it is convenient. While the domains are down, it is
recommended, but not necessary, that the CACHE directories be purged.
Procedure provided:
pscbo_stats.setup_schema_stats()
This process will take a significant amount of time - often several hours - depending on the size of the
database and modifications you've made in the previous steps.
Although no console output will generated until the procedure completes, it is possible to query the
SYSADM.PSCBO_LOG table to monitor activity during execution.
One easy approach is to use a job. An example is presented in the pscbo_stats FAQ document, question
#18.
pscbo_stats.sync_schema_stats();
In Steps 2.5 and 2.6, statistics were locked on tables excluded from the pscbo_stats package control.
Implement a custom approach to maintain these statistics as appropriate. For additional input:
• The recommended syntax is discussed in the pscbo_stats FAQ document, question #10.
• A sample job that could be easily adapted to gather the statistics of certain tables is discussed in
the pscbo_stats FAQ document, question #18.
Dictionary Statistics
The statistics related to the data dictionary are normally maintained by the AUTOSTATS gathering job,
and the target was changed to “ORACLE” during step 2.4. No further change should be necessary if the
task remains enabled and the target is “ORACLE”.
SPOOL OFF;
If data dictionary statistics do need to be gathered manually, i.e. if a large amount of changes have been
made to the Oracle data dictionary as the result of a major Application upgrade, gather the dictionary
statistics using the following command.
Workload Statistics
The merits gathering of workload statistics, and when they should be gathered, is beyond is the scope of
this document. Generally speaking, if a use case exists that demonstrates the value of explicitly
gathering them, then and only then they should be gathered. Normally, the default values are adequate.
3.1 - Restore MetaSQL Used to Collect Table Statistics to the Default Values
During installation, two rows were altered in the PSDDLMODEL table, specifically where
PLATFORMID=2 and STATEMENT_TYPE in ('4','5'). These need to be restored to the default values
before proceeding. There are several ways to restore this information:
• Have the PeopleSoft Administrator use DataMover to execute the script “ddlora.dms” provided
by PeopleTools to restore all of the default DDL syntax templates back into the PSDDLMODEL
table. The file is located in $PS_HOME/scripts/ddlora.dms.
• Copy the rows from a similar database's PSDDLMODEL table running an identical PeopleTools
release where pscbo_stats was not installed.
Identify the tables that need their statistics unlocked and then use a form of the following script to unlock those
statistics, edited to be appropriate for a given database
Note: Simply revoking all of the GRANTs from Step 2.1 may not be appropriate since some may have
been present before the installation of the pscbo_stats package. Additionally, these privileges may be
required by other packages installed after the pscbo_stats package was installed. Use care when
removing these GRANTS.
Remember to revoke any GRANTS to other accounts that had access to the pscbo_stats package. If any
other users were granted privileges during the installation of the pscbo_stats package, revoke those
privileges as appropriate.