604: peoplesoft for the oracle dba

57
604: PeopleSoft for the Oracle DBA [email protected] http://www.ubs.com [email protected] http://www.go-faster.co.uk

Upload: dwayne

Post on 11-Jan-2016

43 views

Category:

Documents


4 download

DESCRIPTION

604: PeopleSoft for the Oracle DBA. [email protected] http://www.ubs.com [email protected] http://www.go-faster.co.uk. Project Overview. HRMS 7.5 Local Swiss Payroll PeopleTools 7.59 45000 employees (33000 current) 127Gb Data, 147Gb Total DB size - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 604: PeopleSoft for the Oracle DBA

604: PeopleSoft for the Oracle DBA

[email protected]://www.ubs.com

[email protected]://www.go-faster.co.uk

Page 2: 604: PeopleSoft for the Oracle DBA

2

Project Overview

HRMS 7.5Local Swiss PayrollPeopleTools 7.5945000 employees (33000 current)127Gb Data, 147Gb Total DB size

3-tier clients (200-280 concurrent users)

Web clients (20-40 concurrent users)

Upgrading to HR8 + GP

Page 3: 604: PeopleSoft for the Oracle DBA

3

Technical Overview

HP-UX 11 64-bitClustered ServersHP Service GuardOracle 8.0.5 -> 8.1.6Multi-Processor Tuxedo DomainsWindows and Web Clients

Page 4: 604: PeopleSoft for the Oracle DBA

4

QA

Production

Development

Hardware Configuration

Page 5: 604: PeopleSoft for the Oracle DBA

5

System Specifications

Development System HP V-Class, Model E 9000/800

CPU: 8RAM: 12 GB

Quality Assurance System HP V-Class, Model E 9000/800

CPU: 10/10RAM: 8/8 GB

Production System HP V-Class, Model E 9000/800

CPU: 20/20RAM: 24/10 GB

Page 6: 604: PeopleSoft for the Oracle DBA

6

EMC Storage Arrays

Storage EMC

R1 256 disksR2 158 disksR3 84 disks ---------

Total 498 disks x 18 GB = 8.7 TB

Page 7: 604: PeopleSoft for the Oracle DBA

7

PS 7.5

PS 8

DEVP QUAL

UPGR8

HOTL

PROD

HOTL

ENG? ENG?

PLAY

DEVP8

EXP8

MIGR

QUAL8 PROD8

M

I

G

R

DEMO

Database Upgrade Path

Page 8: 604: PeopleSoft for the Oracle DBA

8

Challenges

Large HRMS implementationLots of customisationsPayroll is a ‘financial’ batchOracle bugsPerformance Problems

Page 9: 604: PeopleSoft for the Oracle DBA

9

DBA Team

Good Administrative PracticePerformance Tuning

Page 10: 604: PeopleSoft for the Oracle DBA

10

DBA Team

Good Administrative PracticePerformance Tuning

logical structure of the database SQL tuning I/O and physical structure Resource contention Bugs New Features in Oracle 8.1 Object Sizing

Page 11: 604: PeopleSoft for the Oracle DBA

11

Techniques

Who is logged in and what are they doing?

Specification of the data modelHow to SQL_TRACE PeopleSoftWhere does the code come from?Performance Metrics

Page 12: 604: PeopleSoft for the Oracle DBA

12

Who is logged in and what are they doing

Definition of ‘database’What happens at login

PT7.5 -v- PT8Session Registration

2-tier client Application Server Other Batches

Page 13: 604: PeopleSoft for the Oracle DBA

13

What happens when you connect to PeopleTools 7.x?

Connect=H75D/PS/EXECUTE :1 := SQLCQR_LOGINCHECK(:2)SELECT OWNERID FROM PS.PSDBOWNER WHERE DBNAME =

‘H75D’SELECT

OWNERID,TOOLSREL,TO_CHAR(LASTREFRESHDTTM,'YYYY-MM-DD HH24:MI:SS'), TO_CHAR(LASTCHANGEDTTM,'YYYY-MM-DD HH24:MI:SS'), SECURITY_OPTION FROM SYSADM.PSLOCK

SELECT VERSION, OPRTYPE, OPERPSWD, ACCESSID, ACCESSPSWD FROM SYSADM.PSOPRDEFN WHERE OPRID = ‘PS’

Connect=H75D/SYSADM/SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD

HH24.MI.SS."000000"') FROM PSCLOCKSELECT VERSION FROM PSLOCK

Page 14: 604: PeopleSoft for the Oracle DBA

14

What happens when you connect to PeopleTools 8.1?

Connect=GP81O81/PEOPLE/

SELECT OWNERID FROM PS.PSDBOWNER WHERE DBNAME = 'GP81O81'

SELECT OWNERID, TOOLSREL, TO_CHAR(LASTREFRESHDTTM,'YYYY-MM-DD HH24:MI:SS'), TO_CHAR(LASTCHANGEDTTM,'YYYY-MM-DD HH24:MI:SS') FROM SYSADM.PSSTATUS

SELECT VERSION, OPERPSWD, ENCRYPTED, SYMBOLICID, ACCTLOCK FROM SYSADM.PSOPRDEFN WHERE OPRID = 'PS'

SELECT ACCESSID, ACCESSPSWD, ENCRYPTED FROM SYSADM.PSACCESSPRFL WHERE SYMBOLICID = 'SYSADM1'

Connect=GP81O81/SYSADM/

SET type=2012 program=pstools.exe

SET type=2 OprId=PS

SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD-HH24.MI.SS."000000"') FROM PSCLOCK

Connect=GP81O81/SYSADM/

Page 15: 604: PeopleSoft for the Oracle DBA

15

Session Registration

Problem: Everybody connects to the database as ‘sysadm’.

Oracle provides a PL/SQL package DBMS_APPLICATION_INFO writes string to

sys.v$session.client_info<Operator ID>,<OS user name>,<machine

name>,<domain ID>,<program name> above is PT8.1 string

eg.PS,david,GO-FASTER-1,PT81,PSSAMSRV.EXE,

PeopleSoft uses this package from 7.53 (Cobol from 7.54)

Page 16: 604: PeopleSoft for the Oracle DBA

16

Session Registration

Windows Client in 2-tier registers by default (7.53)

Application Server configuration parameter

EnableDBMonitoring=1

Cobol (from 7.54)

Not used with SQRSo we wrote a trigger

Page 17: 604: PeopleSoft for the Oracle DBA

17

Session Registration Trigger

When a process is started by the process scheduler it updates its own status

from 6 (initiated) to 7(processing) see this from process monitor

so, place a trigger on this transition works with Cobol and SQR does not work with PS/Query-Crystal, nVision,

DBAgentsbecause their status is updated by different

application server process - PSSAMSRV

Page 18: 604: PeopleSoft for the Oracle DBA

18

Session Registration Trigger

Prepends Process Instance to client_info

create or replace trigger psprcsrqst_registerbefore update of runstatus on psprcsrqst for each rowwhen (new.runstatus = 7 and old.runstatus != 7and not new.prcstype IN('Crystal','PSJob','Database

Agent','nVision-ReportBook'))declare l_client_info varchar2(64);begin select client_info into l_client_info from v$session where sid = (select sid from v$mystat where rownum = 1);l_client_info:=SUBSTR(TO_CHAR(:new.prcsinstance)||','||

l_client_info,1,64); sys.dbms_application_info.set_client_info(l_client_info);exception when others then null;end;/

Page 19: 604: PeopleSoft for the Oracle DBA

19

Specification of the Data Model

Two Data DictionariesDefault IndexesUser Specified IndexesPT8.1: Platform Specific View

definition

Page 20: 604: PeopleSoft for the Oracle DBA

20

Tools Table -v- DB Catalogue

Table Description Oracle Table PeopleTools Table

Data Definition

1 row per table/view DBA_TABLESDBA_VIEWS

PSRECDEFN

1 row per column DBA_TAB_COLUMNS PSRECFIELD

1 row per distinct column name PSDBFIELD

1 row per view DBA_VIEWS PSVIEWTEXT

1 row per synonym DBA_SYNONYMS

1 row per index DBA_INDEXES PSINDEXDEFN

1 row per indexed column DBA_IND_COLUMNS PSKEYDEFN

Security

1 row per oprid DBA_USERS(PeopleTools <=7.x)

PSOPRDEFN

Grant for table access DBA_TAB_PRIVS

Page 21: 604: PeopleSoft for the Oracle DBA

21

Keys & Indexing

Implied from Record Definition Key Duplicate List (not Tools 8) Alternate Search Descending

User SpecifiedConstraintsSuppressing Index buildSparse Indexing

Page 22: 604: PeopleSoft for the Oracle DBA

22

Indexes Implied from Record Definition

Key Duplicate

List (not indexed in Tools 8)Alternate SearchDescending

Page 23: 604: PeopleSoft for the Oracle DBA

23

Suppressing Index build

In Application Designer Tools -> Data Administration -> Indexes ->

Change Record Indexes -> Edit Index

Page 24: 604: PeopleSoft for the Oracle DBA

24

User Specified Index

Page 25: 604: PeopleSoft for the Oracle DBA

25

Descending Key Index Bug

The following parameter must be added to the init.ora of an Oracle 8.1.6 instance

BEFORE you build descending key indexes.

EVENT='10612 trace name context forever, level 1’

_ignore_desc_in_index = TRUE

This takes care of several bugs found related to DESC INDEXES (errant ORA-3113s)

Page 26: 604: PeopleSoft for the Oracle DBA

26

Constraints

Unique Implied by Unique Key Indexes

Mandatory/Not NullReferential Integrity?

There aren’t any!

Page 27: 604: PeopleSoft for the Oracle DBA

27

Temporary Tablespaces

Create tablespace ‘ORATEMP’Alter tablespace TEMPORARY

can only contain temporary segment cannot contain any other object no redo logging alter temporary tablespace for all users

Don’t do this to PSTEMP

Page 28: 604: PeopleSoft for the Oracle DBA

28

Space Management

DDL modelsDefault -v- Override parametersFeeding back reality

Page 29: 604: PeopleSoft for the Oracle DBA

29

DDL Models

System-wide default storage options

Page 30: 604: PeopleSoft for the Oracle DBA

30

Parameters

PeopleSoft Parameters Square Brackets

TBNAME, TBCOLLIST, IDXNAME, IDXCOLLIST, TBSPCNAME

User Parameters ** delimited

Delivered (Oracle) INIT, NEXT, MAXEXT, PCT, INDEXSPC, BITMAP

Other possibilites COMPRESS, PREFIX LENGTH, PCTFREE,

PCTUSED, NOLOGGING, BUFFER POOL

Page 31: 604: PeopleSoft for the Oracle DBA

31

Default -v- Override parameters

Overrides in application designer

Page 32: 604: PeopleSoft for the Oracle DBA

32

DDL Model

PSDDLMODELField Name Type Length Attributes Description

STATEMENT_TYPE Nbr 1 Key Statement Type1 = Table2 = Index3 = Unique Index4 = Tablespace

PLATFORMID Nbr 2 Key Platform ID0 = SQLBase1 = DB22 = Oracle3 = Informix4 = DB2/Unix5 = ALLBASE6 = Sybase7 = Microsoft8 = DB2/400

SIZING_SET Nbr 3 Key Sizing Set

PARMCOUNT Nbr 3 Parameter Count

MODEL_STATEMENT Long 0 Model SQL Statement

Page 33: 604: PeopleSoft for the Oracle DBA

33

Default Parameters

PSDDLDEFPARMS

Page 34: 604: PeopleSoft for the Oracle DBA

34

Record Parameter Overrides

PSRECDDLPARM

Page 35: 604: PeopleSoft for the Oracle DBA

35

Index Parameter Overrides

PSIDXDDLPARM

Page 36: 604: PeopleSoft for the Oracle DBA

36

Two Data Dictionaries

Compare Database Catalogue

USER_TABLES, USER_INDEXES PeopleTools

PSDDLDEFPARMS, PSRECDDLPARM, PSIDXDDLPARM

Page 37: 604: PeopleSoft for the Oracle DBA

37

Retrofitting Sizing into PeopleTools Data Dictionary

NOT SUPPORTED BY PEOPLESOFT

Possible to copy the sizing information in USER_TABLES and USER_INDEXES back into the Tools tables

Why is this useful? An object is rebuilt during an upgrade Sizing information is preserved

scripts bundled with presentation or available from

http://www.go-faster.co.uk

Page 38: 604: PeopleSoft for the Oracle DBA

38

Limitations of the DDL Model

The following object cannot be created by the DDL Model

Index Organised Tables Partitions Global Temporary Tables Clusters

Maintained manually by the DBA outside of PeopleTools

Structure of column list still inside PeopleTools

Page 39: 604: PeopleSoft for the Oracle DBA

39

Global Temporary Tables

New Feature in Oracle 8.1Reduced Redo Logging

40%-50% I/O reduction unrecoverable

Definition is persistentContent is private & transient to session

not suitable for on-line processingUseful for temporary tables

Local Swiss Payroll Financial Batches No High Water Mark issues Even faster truncate

Page 40: 604: PeopleSoft for the Oracle DBA

40

SQL Tracing

ClientBatches (AE, SQR)Reports (Crystal, nVision, PS/Query)Tracing with TriggersWhere does the code come from

Page 41: 604: PeopleSoft for the Oracle DBA

41

SQL Optimisation

SQL_TRACE = TRUE;Embed commandTrigger on processes via process scheduler

PSPRCSRQSTSet trace in session

2-tier client is multithreaded Small Private Application server

Page 42: 604: PeopleSoft for the Oracle DBA

42

SQL_TRACE = TRUE;

Initialisation ParameterTIMED_STATISTICS = TRUE In current sessionALTER SESSION SET SQL_TRACE=TRUE; In another sessionEXECUTE

sys.dbms_system.set_sql_trace_in_session (<sid>,<serial#>,TRUE);

Page 43: 604: PeopleSoft for the Oracle DBA

43

Enabling Client Tracing

Page 44: 604: PeopleSoft for the Oracle DBA

44

Typical Trace Output (PT7.x)

1-2285 0.861 Cur#1 RC=0 Dur=0.000 COM Stmt=SELECT VERSION, FIELDVALUE, TO_CHAR(EFFDT,'YYYY-MM-DD'), EFF_STATUS, XLATLONGNAME, XLATSHORTNAME, TO_CHAR(LASTUPDDTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), LASTUPDOPRID, FIELDNAME, LANGUAGE_CD, EFFDT FROM XLATTABLE WHERE FIELDNAME = :1 AND LANGUAGE_CD = :2 ORDER BY FIELDNAME, LANGUAGE_CD, FIELDVALUE, EFFDT

1-2286 0.000 Cur#1 RC=0 Dur=0.000 Bind-1 type=2 length=6 value=ACTION

1-2287 0.000 Cur#1 RC=0 Dur=0.000 Bind-2 type=2 length=3 value=ENG

1-2288 0.111 Cur#1 RC=0 Dur=0.000 COM Stmt=SELECT VERSION FROM PSLOCK

Page 45: 604: PeopleSoft for the Oracle DBA

45

SQLCLEANUP.EXE

SELECT VERSION, FIELDVALUE, TO_CHAR( EFFDT, 'YYYY-MM-DD' ), EFF_STATUS, XLATLONGNAME, XLATSHORTNAME, TO_CHAR( LASTUPDDTTM, 'YYYY-MM-DD-HH24.MI.SS."000000"' ), LASTUPDOPRID, FIELDNAME, LANGUAGE_CD, EFFDT FROM XLATTABLE WHERE FIELDNAME = :1 AND LANGUAGE_CD = :2 ORDER BY FIELDNAME, LANGUAGE_CD, FIELDVALUE, EFFDT\ACTION,ENG/

Page 46: 604: PeopleSoft for the Oracle DBA

46

Mass Change/AE/SQR

What you see in the code is what you get

All PS programs can be traced

Page 47: 604: PeopleSoft for the Oracle DBA

47

Trigger for via process scheduler

PSPRCSRQST

create or replace trigger sysadm.set_tracebefore update of runstatus on sysadm.psprcsrqstfor each rowwhen (new.runstatus = 7 and old.runstatus != 7

and NOT new.prcstype IN('Crystal','PSJob', 'Database Agent','nVision-ReportBook') and ...)

)begin sys.dbms_session.set_sql_trace(true);end;/

Page 48: 604: PeopleSoft for the Oracle DBA

48

How developers can enable SQL_TRACE

Check the boxOnly the next execution of this process

is traced then the box will be unchecked

Log of traced executions

Page 49: 604: PeopleSoft for the Oracle DBA

49

Then what happens?

SQL trace is enabled by a triggerWhen the process terminates, the

trace file is processed with TKPROFTwo additional files produced

i) statements sorted by elapsed execution time

ii) statements sorted by elapsed fetch timeTop 10 Statements onlyExecution plans

Page 50: 604: PeopleSoft for the Oracle DBA

50

Processed Trace Files on Web

3 files per process, .log, .exeela, .fchela

Page 51: 604: PeopleSoft for the Oracle DBA

51

Page 52: 604: PeopleSoft for the Oracle DBA

52

Set trace in session

2-tier client is multithreadedSmall Private Application server

EXECUTE sys.dbms_system.set_sql_trace_in_session (<sid>,<serial#>,TRUE);

Page 53: 604: PeopleSoft for the Oracle DBA

53

Where does the code come from (PeopleTools 7.x)?

Application Engine no bind variables - literal values

PS/Query table aliases A, B, C, A1, B1 …

Panel Processor mostly upper case SQL

PeopleCode (scroll functions) upper case select and from clause lower case where clause with litteral values

SQR mixed case with bind variable :1, :2 … three character table aliases

Page 54: 604: PeopleSoft for the Oracle DBA

54

Performance Metrics

Process Scheduler Table - PSPRCSRQSTTrigger to capture history into an archive table

CREATE OR REPLACE TRIGGER SYSADM.psprcsrqst_archivebefore delete on SYSADM.psprcsrqstfor each rowbegin insert into SYSADM.ps_prcsrqstarch (PRCSINSTANCE , ... ) values (:new.PRCSINSTANCE , ... );EXCEPTION WHEN OTHERS THEN NULL;end;/

Page 55: 604: PeopleSoft for the Oracle DBA

55

Summary

Identified SessionsSynchronised sizing information in

dictionariesTrace individual processesIdentify where the SQL comes fromPerformance TuningControl index creation without altering

applicationPerformance Metrics/History

Page 56: 604: PeopleSoft for the Oracle DBA

56

Questions?

Page 57: 604: PeopleSoft for the Oracle DBA

604: PeopleSoft for the Oracle DBA

[email protected]://www.ubs.com

[email protected]://www.go-faster.co.uk