Oracle 9.2 – New features in the SAP world

Slides:



Advertisements
Similar presentations
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
Advertisements

Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
Self-Managing Database: Easy Upgrade Tom Graves Consulting Member of Technical Staff Oracle Corporation Session id:
Basic Storage Concepts and Settings
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Installation – Lecture 2 Copyright System Managers LLC 2007 all rights reserved.
Oracle Online Features - Golfing Instead of Working on Weekends Oracle World 2003 – Session Sep 2003 Denny Wong Consultant Database Services.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
Harvard University Oracle Database Administration Session 2 System Level.
Harvard University Oracle Database Administration Session 5 Data Storage.
Managing an Oracle Instance
Oracle 10g Database Administrator: Implementation and Administration Chapter 14 Proactive Maintenance.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
INTRODUCTION TO ORACLE
RMAN Restore and Recovery
Backup and Recovery Part 1.
Oracle Database Administration Database files Logical database structures.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Database Advisors Automatic Database Diagnostic Monitor ( ADDM )
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
Database Administration TableSpace & Data File Management
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
7202ICT Database Administration Lecture 7 Managing Database Storage Part 2 Orale Concept Manuel Chapter 3 & 4.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
9 Storage Structure and Relationships. 9-2 Objectives Listing the different segment types and their uses Controlling the use of extents by segments Stating.
9 Copyright © 2007, Oracle. All rights reserved. Managing Data and Concurrency.
15 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Summary.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
8 Copyright © 2005, Oracle. All rights reserved. Managing Data.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
Week 3 Lecture 2 Basic Storage Concepts and Settings.
14 Copyright © 2006, Oracle. All rights reserved. Tuning Block Space Usage.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing Oracle Corporation.
10 Managing Rollback Segments Objectives Planning the number and size of rollback segments Creating rollback segments using appropriate storage.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
1 11g NEW FEATURES ByVIJAY. 2 AGENDA  RESULT CACHE  INVISIBLE INDEXES  READ ONLY TABLES  DDL WAIT OPTION  ADDING COLUMN TO A TABLE WITH DEFAULT VALUE.
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.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Data, Space and Transaction Processing
Table spaces.
How To Pass Oracle 1z0-060 Exam In First Attempt?
Database structure and space Management
Using Data Dictionary and Dynamic Performance Views
Oracle 10g Database Administrator: Implementation and Administration
Index Index.
Which new Oracle 9i features are helpful for a SAP customer?
Presentation transcript:

Oracle 9.2 – New features in the SAP world Jürgen Kirschner (Oracle) Senior Principal Technical Consultant Juergen.Kirschner@oracle.com

Who we are? Our group: We are working for Oracle’s ”Solution Center SAP Support and Services” Based at SAP Responsible for Development Support offers Advanced Product Services - APS (Workshops, Migration, Onsite Services) Customers: Dow Corning, Chevron, Shell, Hershey, Bristol-Myers Squibb, SAP, Schindler, Grainger, Black & Decker, Callaway, Wyeth, GPU, ...

Who we are? Paul Loos Contact person in the US: Sr. Principal Support Engineer SolutionSupportDelivery Paul.Loos@oracle.com Phone: 612.839.5957

Why should I upgrade? Performance Stability Company decision Nice presentation Features

Because you have to! Why should I upgrade? 8.1.7 will be desupported by the end of 2003. Please check SAP note #578113 and Oracle metalink note #148054.1. Whether or not there will be an Extended Maintenance Support (EMS) for SAP customers has not yet been decided. We recommend to start the evaluation process soon. Please check note #626172.

Features SAP note#598678 (at the moment released internally only) Describes the current features officially supported by SAP. Will be updated continuously during the next months to reflect changes. The following presentation is covering the features from the Oracle point of view and is only talking about such features where their usage makes sense in an SAP environment

Features (Part I) Automatic PGA tuning Automated undo management (AUM) Flashback query Parameter file (spfile) Online table redefinition Resumable session

Automated PGA tuning

Automated PGA tuning Automated PGA tuning Oracle 6/7/8 Oracle 9i Parameters which control memory allocation of EACH shadow process (sort_area_size, hash_area_size, …) Oracle 9i Parameters which control memory allocation of EACH shadow process (sort_area_size, hash_area_size, …) OR Automated PGA tuning

Automated PGA tuning Idea: Note: The memory will not be pre-allocated. Instead of each shadow process allocating private memory (and keeping it) for temporary operations like sorts, Oracle is providing a kind of ‘shared area’. If this workarea is no longer needed, the memory is freed against the OS and therefore can be used by all other shadow processes. Note: The memory will not be pre-allocated.

Automated PGA tuning Example: First peak: Sort by session A Second peak: Sort by session B Third peak: Sort by session A+B at the same time

Automated PGA tuning How to activate? Init.ora or spfile: WORKAREA_SIZE_POLICY = AUTO PGA_AGGREGATE_TARGET = <maximum amount of memory> Please check OSS note #180605 for SAP’s recommendations for BW systems.

Automated PGA tuning Restrictions (I): Each shadow process can by default only allocate up to 5% of the overall pga_aggregate_target value Parallel operations can allocate up to 30% of the overall pga_aggregate_target value Each shadow process can by default only allocate up to 200MB of memory. CKPT process is permanently checking/controlling the utilization and adjusting the memory allocation requests

Automated PGA tuning Restrictions (II): If not enough memory is available, space in the temporary tablespace will be allocated (as with the ‘old’ behavior)

Automated Undo Management (AUM)

Automated Undo Management (AUM) Question: How long would it take if I now leave the room and request from ALL of you to define a concept for a classic rollback segment layout to which EVERYONE agrees? Answer: Private opinion: Forever!

Automated Undo Management (AUM) With 9i, Oracle has introduced the Automated Undo Management (AUM). What is new in AUM? Oracle controls the number of undo segments (adding new if necessary) A special tablespace is introduced for handling only undo segments You can decide for how long the undo information SHOULD stay in the undo segments

Automated Undo Management (AUM) How to activate? Init.ora or spfile: UNDO_MANAGEMENT = AUTO UNDO_TABLESPACE = <tablespace name> Note: The tablespace must be created BEFORE switching to AUM. The default value for undo_management is ‘MANUAL’ (=classic rollback segment setup)

Automated Undo Management (AUM) How to create an undo tablespace? SQL: Create undo tablespace <name> <datafile>; Note: The TS will be created as a locally managed TS with autoallocate (OEM screenshot)

Automated Undo Management (AUM) Additional information: After startup, 10 undo segments are always active If more than 10 active concurrent DML operation are present, for every new concurrent DML operation, a new undo segment will be created/activated (automatically) You can create multiple undo tablespaces. However only 1 undo tablespace can be active at one time The name of the segments are: ‘_SYSSMU<n>$’ The segment type is: ‘TYPE2 UNDO’

Automated Undo Management (AUM) Parameter ‘undo_suppress_errors’ The default value for this parameter is false. If you set this parameter to true, errors regarding classic rollback segments will not be signaled. Mainly the Oracle error ORA-30019 will be suppressed. This parameter can help if you have scripts or optimized code for the classic rollback segment setup. Otherwise, after switching to AUM an error would be signaled.

Automated Undo Management (AUM) Example (I): SQL> set transaction use rollback segment prs_1; set transaction use rollback segment prs_1 * ERROR at line 1: ORA-30019: Illegal rollback Segment operation in Automatic Undo mode SQL> alter system set undo_suppress_errors = true scope=memory; System altered. SQL> set transaction use rollback segment prs_1; Transaction set.

Automated Undo Management (AUM) Example (II): SQL> create rollback segment RBS_NEW; create rollback segment RBS_NEW * ERROR at line 1: ORA-30019: Illegal rollback Segment operation in Automatic Undo mode SQL> alter session set undo_suppress_errors = true; Session altered. SQL> create rollback segment RBS_NEW; Rollback segment created. SQL> select * from dba_rollback_segs where segment_name = 'RBS_NEW'; no rows selected  ONLY THE ERROR WILL BE SUPPRESSED!!

Automated Undo Management (AUM) Parameter ‘undo_retention’ (I) The default value for this parameter is 900 (value is seconds). This parameters controls for how long Oracle is TRYING to keep read consistent information within the undo segments. If you set this to a large value, the number of ORA-1555 errors can be reduced, however, you may will need a lot of space.

Automated Undo Management (AUM) Parameter ‘undo_retention’ (II) If the undo tablespace does not have more free space but we have not yet reached the time specified with undo_retention, no error will be signaled. We are then reusing existing blocks. Advice: Create the undo tablespace with the same size as your current PSAPROLL and set undo retention to e.g. 12 hours. Then monitor the usage of undo segments by checking V$rollstat and V$undostat

Flashback query

Flashback query This is one of the really nice features with 9i. Let us have a look at an example: SQL> select * from flash_new; T1 T2 ---------- ---------- 1 xsdfsadf SQL> @get_scn This is the current SCN: 26214082 SQL> delete flash_new; 1 row deleted. SQL> commit; Commit complete. no rows selected SQL> create table flash_rescue as select * from flash_new as of scn 26214082; Table created. SQL> select * from flash_rescue; T1 T2 1 xsdfsadf

Flashback query Facts about flashback query: will work with AUM and classic RBS (but flashback query is designed to work with AUM – parameter undo_retention) prerequisite is, that the data is still in the undo segments (otherwise ORA-1555 will be signaled) you can use a time based or a scn based approach for LONG or LONG RAW columns, you have to create a view and then use PL/SQL to get the data. exp can also be used (FLASHBACK_SCN, FLASHBACK_TIME) maximum flashback time is 5 days (if the system is running the whole time – server uptime)

Flashback query Attention: If you create a new table, you can not immediately use flashback query. You have to wait several minutes before you can use this feature.

SPFILE

Spfile Spfile = Server parameter file Binary parameter file managed by the Oracle server Location: default: $ORACLE_HOME/dbs (Unix) %ORACLE_HOME%/database (NT) Default name: spfile<SID>.ora Search path (Unix): $OH/dbs/spfile$ORACLE_SID.ora $OH/dbs/spfile.ora $OH/dbs/init$ORACLE_SID.ora Search path (NT): same as above; just replace dbs with database

Spfile How to activate: SQL> create spfile from pfile; How to check if a spfile is active: SQL> show parameter spfile For the creation of a spfile, you need sysdba privileges If a parameter cannot be changed online, an error will be raised (ORA-02096 ) Advantages: no OS login necessary Changes can be made immediately (in memory) and in the spfile

Spfile Examples: - alter system set optimizer_index_cost_adj = 20 scope=spfile; - alter system set max_dump_file_size=unlimited scope=BOTH ; - alter system set max_dump_file_size=1000 scope=memory; - alter system reset user_dump_dest scope=spfile sid='*'; - alter system set optimizer_index_cost_adj = 20 comment = 'Changed on July/19/2002 - old: 10 new: 20 reason: advised by JK - Oracle‘ scope = spfile; - alter system set event = '10191 trace name context forever, level 1', '10181 trace name context forever, level 1' scope=spfile;

Spfile Advices: backup your spfile in regular timeframes SQL> create pfile=/../../../ from spfile; Be careful when you change parameters which can have multiple lines (events) If you switch to a spfile setup, you should rename your original init<SID>.ora Get familiar with V$parameter, V$parameter2, V$spparameter V$system_parameter Note: If you are using the Oracle Upgrade Assistant, a spfile will be created automatically!!!

Online table redefinition

Online table redefinition “OR” Online table reorganization Online redefinition is based on a PL/SQL package By default, a table which is planned to be redefined, needs a primary key constraint Tables which contain LONG or LONG RAW fields can NOT be redefined online Online table redefinition is based on the materialized view concept The target table can have a different layout than the source table. This is the reason for the wording ‘redefinition’ You are responsible for the creation of the target table and the correct settings for this table (default values)

Online table redefinition Walk through example: SQL> create table test_redef (t1 number, t2 varchar2(10)); Table created. SQL> alter table test_redef add constraint pk_test_redef primary key (t1); Table altered. SQL> begin for i in 1..10000 loop insert into test_redef values (i,'XXX'); end loop; end; / PL/SQL procedure successfully completed. SQL> create table test_redef_new as select * from test_redef where rownum < 1; Table created. SQL> exec dbms_redefinition.can_redef_table('SAPR3','TEST_REDEF'); PL/SQL procedure successfully completed. SQL> exec dbms_redefinition.start_redef_table('SAPR3','TEST_REDEF','TEST_REDEF_NEW'); PL/SQL procedure successfully completed.

Online table redefinition SQL> select count(*) from test_redef; COUNT(*) ---------- 10000 SQL> select count(*) from test_redef_new; COUNT(*) ---------- 10000 SQL> begin for i in 10001.. 50000 loop insert into test_redef values (i,'XXX'); end loop; end; / PL/SQL procedure successfully completed. SQL> commit; Commit complete.

Online table redefinition SQL> select count(*) from test_redef; COUNT(*) ---------- 50000 SQL> select count(*) from test_redef_new; COUNT(*) ---------- 10000 SQL> exec dbms_redefinition.sync_interim_table('SAPR3','TEST_REDEF','TEST_REDEF_NEW'); PL/SQL procedure successfully completed. SQL> select count(*) from test_redef_new; COUNT(*) ---------- 50000 SQL> begin for i in 50001.. 60000 loop insert into test_redef values (i,'XXX'); end loop; end; / PL/SQL procedure successfully completed.

Online table redefinition SQL> commit; Commit complete. SQL> comment on table test_redef is 'This is the original table'; Comment created. SQL> comment on table test_redef_new is 'This is the new table'; Comment created. SQL> select count(*) from test_redef_new; COUNT(*) ---------- 50000 SQL> select count(*) from test_redef; COUNT(*) ---------- 60000

Online table redefinition SQL> alter table test_redef_new add constraint 2 pk_test_redef_new primary key (t1); Table altered. SQL> create index i_test_redef_new on test_redef_new (t2); Index created. SQL> analyze table test_redef_new compute statistics; Table analyzed. SQL> exec dbms_redefinition.finish_redef_table('SAPR3','TEST_REDEF','TEST_REDEF_NEW'); PL/SQL procedure successfully completed.

Online table redefinition SQL> select table_name, substr(comments,1,29) from dba_tab_comments 2 where table_name like 'TEST_REDEF%'; TABLE_NAME SUBSTR(COMMENTS,1,29) ------------------------------ ----------------------------- TEST_REDEF This is the new table TEST_REDEF_NEW This is the original table  Tables are automatically renamed SQL> select table_name, index_name from dba_indexes 2 where table_name like 'TEST_REDEF%‘ 3 order by table_name; TABLE_NAME INDEX_NAME ------------------------------ ------------------------------ TEST_REDEF PK_TEST_REDEF_NEW TEST_REDEF I_TEST_REDEF_NEW TEST_REDEF_NEW PK_TEST_REDEF

Online table redefinition Summary: Based on a step by step implementation, the DBA always has full control over the procedure Based on the materialized view implementation, this is not a completely new concept You can perform ALL tasks on the ‘shadow’ table before performing the final switch (statistics, index creation) If you decide to terminate the reorg, you simply execute: exec dbms_redefinition.abort_redef_table ('SAPR3',‘orig_tab ,‘new_tab'); The original table will not be dropped automatically after the switch

Resumable session

Resumable session Example: SQL> create tablespace test datafile 'D:\ORACLE\ORADATA\V92\test.dbf' size 5M; Tablespace created. SQL> create table test_resumable (t1 number) 2 tablespace test storage (initial 10M); create table test_resumable (t1 number) * ERROR at line 1: ORA-01659: unable to allocate MINEXTENTS beyond 4 in tablespace TEST

Resumable session SQL> alter session enable resumable; Session altered. SQL> create table test_resumable (t1 number) 2 tablespace test storage (initial 10M); The session is waiting! V$session_wait will show us: “statement suspended, wait error to be cleared”

Resumable session In the alert file we will find: Thu Apr 17 09:43:52 2003 statement in resumable session 'User SAPR3(62), Session 13, Instance 1' was suspended due to ORA-01659: unable to allocate MINEXTENTS beyond 4 in tablespace TEST In the view dba_resumable will find additional information about this suspended statement!

Resumable session Summary: ‘alter session resumable’ is setting statements, which are running into SPACE errors, ‘on hold’ Errors which are covered are (for example): ORA-1536, ORA-1653, ORA-1659, ORA-30036 The suspend time is by default 7200 seconds The suspend time can be also set: SQL> alter session enable resumable timeout 10; To activate for all sessions, a logon trigger is necessary You can also setup an ‘AFTER SUSPEND’ trigger on database level, where you can define actions depending on the kind of error

Resumable session Attention: ‘alter session resumable’ does NOT work in combination with database links: SQL> create database link to_my_own_database 2 connect to sapr3 identified by sap using 'V92'; Database link created. SQL> alter session enable resumable; Session altered. SQL> select * from dual@to_my_own_database; select * from dual@to_my_own_database * ERROR at line 1: ORA-30044: Resumable cannot be enabled with distributed transactions

Features (Part II)

Features (Part II) Alter system suspend holds all I/O Dynamic SGA dynamic increasing/decreasing of different areas of the SGA CBO Index skip scan Dynamic sampling New first_rows hint CBO Parameter changes Bind variable peeking

Features (Part II) Different Oracle block sizes for tablespaces Automated Space Management also called Bitmap Managed Blocks (BMB) new method of block dispatching for insert operations and handling of re-usage of blocks (pctused will not work anymore) Two pass recovery Merge statement (upsert) combination of insert/update for synchronization of two tables RAC (Real Application Cluster) Compress for tables …

There is a lot for you to learn! Summary 9.2 offers a lot of helpful and good features for the daily work of a DBA. There is a lot for you to learn!

Information At 12:30 PM, there will be a Round Table Lunch – “Oracle SIG” If you have time, you are welcome to join. We will meet after this presentation at the Oracle booth at the vendor fair.

Thank you for attending! Please remember to complete and return your evaluation form following this session. Session Code: [902A]