Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Which new Oracle 9i features are helpful for a SAP customer? Dr. Stephan Bühne.

Similar presentations


Presentation on theme: "Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Which new Oracle 9i features are helpful for a SAP customer? Dr. Stephan Bühne."— Presentation transcript:

1 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Which new Oracle 9i features are helpful for a SAP customer? Dr. Stephan Bühne Oracle SAP Solution Center Walldorf

2 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

3 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

4 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. pfile Spfile replaces traditional init.ora file Allows server to maintain parameter settings All members of RAC can use the same file Is maintained by the oracle server

5 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. pfile Binary file Is created with the command: „Create spfile from pfile;“ Alter system set parameter = value scope = Memory | Spfile | Both Example: Alter system set SORT_AREA_SIZE = 1048676 comment ´Temporary Change´ scope = spfile;

6 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. pfile Exporting spfile: „Create pfile from spfile;“ *.sort_area_size=1048676#Temporary change prd1. shared_pool_size=200m prd2. shared_pool_size=150m *.sessions=200

7 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

8 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA Oracle 8i Buffer Cache and Shared Pool are fixed Recycle Pool and Keep Pool are defined out of all DB_Block_Buffers

9 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP SGA Oracle 8i Default Shared Pool Keep Recycle Buffer Pool SHARED_POOL_SIZE = 10240000 DB_BLOCK_BUFFERS = 250000 BUFFER_POOL_RECYCLE BUFFER_POOL_KEEP Shared_Pool_Reserved_Size SHARED_POOL_RESERVED_SIZE

10 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA Oracle 9i Buffer Cache and Shared Pool can be dynamically changed No database restart necessary

11 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP SGA Oracle 9i Default Shared Pool Keep Recycle Shared_Pool_Reserved_Size SGA_MAX_SIZE = 2048M DB_CACHE_SIZE DB_KEEP_CACHE_SIZE DB_RECYCLE_CACHE_SIZE SHARED_POOL_SIZE

12 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA: Parameters If you want make use of the dynamic SGA resizing you MUST use new parameters: – DB_CACHE_SIZE (DB_BLOCK_BUFFERS) – DB_KEEP_CACHE_SIZE (BUFFER_POOL_KEEP) – DB_RECYCLE_CACHE_SIZE(BUFFER_POOL_RECYCLE)

13 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA: MONITORING Efficieny of the buffer cache can be monitored with View V$DB_CACHE_ADVICE Parameter DB_CACHE_ADVICE must be specified – OFF: Advisory is turned off – ON:Advisory is turned on – READY:Advisory is turned off, but needed memory is allocated

14 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA: V$DB_CACHE_ADVICE Cache Size (MB) BuffersEstd. Read Factor Physical Reads 303,80218.70192,317,943 607,60412.83131,949,536 9111,4067.3875,865,861... 30438,0201.0010,282,475 33441,822.939,515,878 36445,624.878,909,026... 60876,040.666,739,731 10 % 20 % 30 % 200 % 100 % 110 % 120 %

15 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA: Summary MAX_SGA_SIZE specifies the total amount of memory used for the oracle SGA Within this specified size all parts of the SGA can be resized dynamically KEEP and RECYCLE Buffers are specified additionally More flexibility to adjust SGA to the current needs

16 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Dynamic SGA: Summary View V$DB_CACHE_ADVICE can be used to estimate optimal buffer cache size Feature can be switched on/ off dynamically Partial analysis for specific workload is possible Dynamic SGA Resize is also possible in RAC environments

17 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

18 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Multiple Block Sizes Tablespaces within one database can have different Oracle Block Sizes Is setup on Tablespace creation Up to five different Sizes can be used Supported Block Sizes: 2k, 4k, 8k, 16k, 32k Each block size has an own buffer cache area

19 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Default Block Size = 8k Keep Recycle DB_CACHE_SIZE DB_CACHE_SIZE = 32K DB_RECYCLE_CACHE_SIZE Multiple Block Sizes DB_CACHE_SIZE = 32K DB_CACHE_SIZE = 16K DB_KEEP_CACHE_SIZE SGA_MAX_SIZE = 2048M

20 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Multiple Block Sizes: Monitoring View V$BUFFER_POOL displays information about specified buffer pools Block Size Current Size BuffersTarget Size Prev. Size 40963278683248 2048167570160 16384161013160

21 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Multiple Block Sizes: Summary A separate Buffer cache must exist, before a tablespace can be created System TS and Temp TS must have default blocksize Larger block sizes are useful for tables containing Long Raw fields BW-Application can benefit (FTS) Useful for SAP Cluster or Pool Tables

22 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

23 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management Simplifies and improves memory allocation SQL working areas can be adjusted automatically and dynamically – Ease of memory tuning – Reduction of time to tune memory – Better throughput – Improved query response time

24 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management Process PGA Untunable Memory Tunable Memory Process PGA Untunable Memory Tunable Memory Process PGA Untunable Memory Tunable Memory Untunable Memory+Tunable Memory<= PGA_AGGREGATE_TARGET Process Code Heap Memory SORT_AREA_SIZE HASH_AREA_SIZE BITMAP_MERGE_AREA_SIZE CREATE_BITMAP_AREA_SIZE Untunable Memory Tunable Memory

25 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management: Standard R/3 95 %+5 %<= PGA_AGGREGATE_TARGET Untunable Memory Tunable Memory Process PGA = SORT_AREA_SIZE

26 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management: BW R/3 5 %+95 %<= PGA_AGGREGATE_TARGET Untunable Memory Tunable Memory Process PGA SORT_AREA_SIZE HASH_AREA_SIZE BITMAP_MERGE_AREA_SIZE CREATE_BITMAP_AREA_SIZE

27 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management New Oracle Parameters introduced: – PGA_AGGREGATE_TARGET 10 MB – 400 GB – WORKAREA_SIZE_POLICY MANUAL (Default) AUTO (Default if PGA_AGGREGATE_TARGET is set)

28 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management The AUTO Mode ensures: – The overall size of the PGA memory never exceed PGA_AGGREGATE_TARGET – A Single process never runs out of memory

29 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP PGA Management: Monitoring New Statistics in V$SYSSTAT: NameValue work area memory allocated (KB)0 Work area executions – optimal size2683 Work area executions – one pass size153 Work area executions –multipasses size10

30 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic PGA Management V$SYSSTAT – WORK_AREA_MEMORY_ALLOCATED Total amount of PGA allocated either by a single process or overall – WORK_AREA_EXECUTIONS_OPTIMAL Optimal size: No write to disk necessary – WORK_AREA_EXECUTIONS One Pass Query could executed with a single disk pass – WORK_AREA_EXECUTIONS MULTIPASS Multiple pass runs were necessary

31 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP PGA Management: Monitoring New View V$PGASTAT: NameValue aggregate PGA auto target5242880 global memory bound41812992 total expected memory2621440 total PGA inuse5969920 total PGA allocated8924160 maximum PGA allocated17680384 total PGA used for auto workareas939008 maximum PGA used for auto workareas0 total PGA used for manual workareas0 maximum PGA used for manual workareas0 estimated PGA memory for optimal0 maximum PGA memory for optimal0 estimated PGA memory for one-pass0 maximum PGA memory for one-pass0

32 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

33 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic UNDO Management Simplifies management of undo data No reasons for create, drop, alter rollback segments UNDO segments can be managed either manual or automatic Data is managed by a single UNDO-tablespace

34 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic UNDO Management System TBS System Rollback Segment System Rollback Segment Auto Manual _SYSSMU1$ _SYSSMU2$ _SYSSMUn$ UNDO TBS RBS1 RBS2 RBSn RBS TBS System TBS

35 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Automatic UNDO Management UNDO_MANAGEMENT Switches automatic UNDO management on/off UNDO_TABLESPACE Defines which automatic UNDO tablespace is used UNDO_SUPPRESS_ERRORS Supresses errors if invalid UNDO command is issued UNDO_RETENTION Specifies the time in seconds Read Consistency should be guarenteed

36 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP UNDO Management Monitoring V$UNDOSTAT Displays the UNDO usage in 10 Minutes intervals Begin_TimeEnd_TimeUNDOBLKSTXNCOUNTMAXCON 17.09.02 12:0117.09.02 12:11135363 17.09.02 12:1117.09.02 12:21255556 17.09.02 12:2117.09.02 12:31198484.... Undo space = (UR x UPS) + Overhead UR = Undo Retention Parameter UPS = Undo Blocks per second

37 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

38 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation Resumable operation are suspended under „Out of space“-errors (e.g. ORA-1653, ORA- 1631, ORA-1562, ORA-1628,...) A session running in one of these error conditions is not aborted, but waits for a specified amount of time to proceed

39 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation 1. Resumable space operation is enabled 2. Transaction starts 3. Out-Of Space error occurs 4. Error is written to alert.log 5. Error is fixed (e.g. Datafile added) 6. Suspended operation resumes automatically 7. Operation ends successfully

40 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation But: Must be activated on session level „Alter session enable resumable timeout nn“ ; How to activate in SAP environments ?

41 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation But: Must be activated on session level „Alter session enable resumable timeout nn“ ; How to activate in SAP environments ? => Logon Trigger

42 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation Logon Trigger: CREATE OR REPLACE TRIGGER RESUMABLE_TRANSACTION after logon on SAPR3.SCHEMA BEGIN execute immediate ´alter session enable resumable timeout 14400´; END; / Must be created with SYDBA privileg Can be enabled/ disabled as needed

43 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation Resumable statements are: – Queries (Sort Area, Hash Area) – DML statements (max. Extents, TBS full, Rollback) – SQL*Loader operations – Import and Export operations – DDL statements (Create Index, Index rebuild, CTAS) Status can be monitored with DBA_RESUMABLE

44 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Resumable Space Allocation SessionStatusTIMEOUTSTART_TIMESUSPEND_TIME 7NORMAL 1440011/12/02 00:03:59....... DBA_RESUMABLE:

45 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

46 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Identifying Unused Indexes Monitoring is done during Parse Time Helps to identify unused indexes in the system to save space and resources Only Parsing Step is monitored, not the execution

47 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Identifying Unused Indexes Alter index monitoring usage – Switches Monitoring on for the specified index Alter index nomonitoring usage – Switches Monitoring off for the specified index Switching monitoring ON/ OFF forces reparsing on all SQl statements on the table

48 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Identifying Unused Indexes A new DBA View V$OBJECT_USAGE exists to view the monitoring results: Index NameTable Name MonUsageStartEnd MSEG~Z01MSEG YESNO28-10-2002 14:37:00 30-10-2002 08:14:00 MSEG~Y01MSEG YES 28-10-2002 14:37:05 30-10-2002 08:14:01

49 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Initialisation: spfile vs. Pfile SGA: Dynamic Resizing Multiple Block Size Support PGA: Automatic Memory Management Automatic UNDO Management Resumable Space Allocations Identifying unused indexes Online-Reorganisation

50 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation Tables can be converted: – Non-Partitioned  Partitioned – Columns can be dropped – Columns can be renamed – New Columns can be added – LOB are supported BUT: Long Raw fields are not supported

51 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation Transform Source Table Result Table Store Updates Transform Updates

52 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation For the reorganisation the following steps must be performed: 1. Dbms_redefinition.can_redef_table (´Owner´, ´Table´); PL/SQL procedure successfully completed ORA-12089 cannot online redefine table with no primary key An error is reported, if the table can not be online reorganized. Please note: For tables with Long Raw field no error is reported!

53 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 2. A Primary Key must be created on the table. Alter table SAPR3.MSEG add Primary Key (MANDT,.....) Enable Novalidate;

54 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 3. A Temporary object must be created, having the same attributes as the source table. You can use sapdba to create the correct table syntax or directly SQL e.g.: Create table SAPR3.MSEG_TEMP Tablespace PSAPMSEGD AS Select * from SAPR3.MSEG Where 1 = 0;

55 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 4. Save the Default Constraints from the existing table be either using sapdba or by using exp/imp command. – Export table without data – Import with option indexfile= – Use resulting File to recreate Default constraints later

56 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 5. Run the PL/ SQL Procedure to start Redefinition: Exec Dbms_redefinition.start_redef_table (´SAPR3´,´MSEG´,´MSEG_TEMP´);

57 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 6. Create all indexes on the Temporary Table with different names with the same definition as they exist on the Original table Create Index SAPR3.“MSEG~M_TEMP“ On SAPR3.MSEG_TEMP (MANDT,...) Tablespace PSAPMSEGI

58 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 7. To synchronize tables Run intermediate Exec Dbms_redefinition.sync_interim_table (´SAPR3´,´MSEG´,´MSEG_TEMP´);

59 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 8. To finish synchronize tables Run Exec Dbms_redefinition.finish_redef_table (´SAPR3´,´MSEG´,´MSEG_TEMP´);

60 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation 9. Apply the Default constraints on the new table if needed 10. If an abort is needed, you MUST call the procedure dbms_redefinition.abort_redef_table (´SAPR3´,´MSEG´,´MSEG_TEMP´)

61 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Online Reorganisation Prerequisites: – Table must have Primary Key ! – Must Not have Long Raw fields – LOB are supported

62 Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Questions ?


Download ppt "Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Which new Oracle 9i features are helpful for a SAP customer? Dr. Stephan Bühne."

Similar presentations


Ads by Google