• Save
Oracle 11g New Features Out-of-the-Box by Alex Gorbachev (from Sydney Oracle Meetup #5)
Upcoming SlideShare
Loading in...5
×
 

Oracle 11g New Features Out-of-the-Box by Alex Gorbachev (from Sydney Oracle Meetup #5)

on

  • 9,548 views

Learn some of the Oracle 11g gems that often gets unnoticed. Features that are not revolutionary in nature but can greatly simplify day-to-day life of any Oracle DBA....

Learn some of the Oracle 11g gems that often gets unnoticed. Features that are not revolutionary in nature but can greatly simplify day-to-day life of any Oracle DBA.

The presentation is based on the material presented by Christo Kutrovsky at the Oracle Open World 2007 and later used by me to produce content for this presentation at the IOUG Collaborate 2008.

Statistics

Views

Total Views
9,548
Views on SlideShare
9,217
Embed Views
331

Actions

Likes
24
Downloads
0
Comments
1

16 Embeds 331

http://www.pythian.com 191
http://knoworacle.wordpress.com 51
http://www.slideshare.net 37
http://oracle-gtmi-anz.blogspot.com 14
http://www.linkedin.com 12
https://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 9
http://www.ukocn.com 5
https://www.linkedin.com 2
http://www.oracloid.com 2
http://sys-as-sysdba.blogspot.com 2
http://www.google.com.mx 1
http://www.yatedo.com 1
file:// 1
http://oracle-gtmi-anz.blogspot.ch 1
http://www.techgig.com 1
http://oracle-gtmi-anz.blogspot.com.au 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Jurijs Velikanovs suggested Metalink Note 413484.1 (updated very recently as I see). There are limitations on cross-platform physical standby.

    So physical standby's platform can be different only very little. In particular, slide 21 is pretty much wrong. :-) No SPARC-Linux or Linux-Windows physical standby.

    The 32 bit and 64 bit seems to be supported for many platform. However, some PL/SQL incompatibilities needs to be taken care of.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • Pythian provides database services and consulting for Oracle, MySQL and SQL Server as well as EBS support and SA services. I’m been with the company for almost 3 years - in Sydney since September 2008 heading our operations in East Asia Pacific. We are a global company with main offices in Canada, the US, Europe and Australia. Over 12 years of operations, we have served 400+ clients and currently we have 100+ active clients world-wide. <br />
  • Ask your questions right away - too many different topics <br />
  • Not finished <br />
  • Not finished <br />
  • Not finished <br />
  • Association - warehouse <br /> Introduced in 10g and surprisingly stable <br /> <br /> Based on old technology <br />
  • INTRO - ASM and RDBMS - for ASM instances and for DB compatible init.ora parameter. ASM compat - metadata format. RDBMS compat - files content format. <br /> <br /> Default 10.1 - no new features. Defined per disk group. <br /> <br /> Case study - upgrade to 11g & downgrade, smooth upgrade path, transportable tablespaces. <br /> <br /> select i.ksppinm, v.ksppstvl from x$ksppi i, x$ksppcv v where i.ksppinm in ('_rdbms_compatibility','_asm_compatibility') and i.indx=v.indx; <br />
  • 1. start rolling migration <br /> 2. upgrade all instances one by one <br /> ASM provides limited services <br /> 3. stop rolling migration <br />
  • AU - smallest chunk of space that Oracle can allocate; coarse stripe size <br /> problem - inflexible physical layout + high overhead for VLDB <br /> 10g - underscore parameter - instance-wide + undocumented/unsupported <br /> 11g - official way to change AU size per diskgroup. AU 1-8 MB - compat 10.1 but 6-64 MB - compat 11.1. <br /> <br /> Fine striping is not changed! <br />
  • Fully automatic. Explain how it works. <br /> <br /> Main purpose - reduce overhead on disk mount and file open for huge files, sga overhead for extent maps. <br />
  • 10g - disk failure -> BROKEN & rebalancing <br /> 11g FMR - disk failure -> OFFLINE -> wait for disk_repair_time (3.6h default) -> rebalancing if too log or ALTER DISKGROUP DISK ... ONLINE; <br /> * can do manual ALTER DISKGROUP DISK ... OFFLINE; <br /> <br /> FMR - case study SAN firmware update, FMR - case study extended clusters <br /> FB - case study - rebalancing takes days and impacts performance but night can be offline <br />
  • Case study - extended clusters - in addition to Fast Mirror Resync <br />
  • cp - doesn’t work for controlfiles but works for datafiles and spfle; strange path copying to ASM <br /> remap - ASM detects corruption on read and re-allocates extent. remap causes ASM to read blocks and repair if needed. <br /> md_backup/md_restore - can re-create DG on disks and directory structure <br />
  • <br />
  • <br />
  • * lighter compression <br /> <br /> * multisection backup (max 256 sections) <br /> <br /> * UNDO backup optimization - CONFIGURE BACKUP UNDO OPTIMIZATION <br />
  • Use case - recovery window of 7 days + monthly for one year <br /> KEEP FOREVER - requires catalog <br /> <br /> Deletion policy shipped is new in 11g <br /> <br /> DB_NIQUE_NAME - useful for standby <br />
  • <br />
  • ADVISE - human language; REPAIR .. PREVIEW - script <br /> <br /> CHANGE - change priority, close <br />
  • <br />
  • FROM ACTIVE DATABASE - no UNTIL clause - time is chosen automatically based on the last datafile copy completed <br /> PASSWORD FILE - by default for standby and optional for normal duplicate. <br />
  • <br />
  • <br />
  • <br />
  • Use case for Active Data Guard - use DR for reporting without RTO impact, management is happy - DR hardware is utilized! <br /> RTO = Recovery Time Objective - how quick we can recover. <br /> <br /> Use case for snapshot - testing <br /> 1. convert to snapshot <br /> 2. test on it (database diverges) <br /> 3. convert to physical standby <br />
  • DB_UNIQUE_NAME - unsure that no standby has the same DB_UNIQUE_NAME as primary <br /> <br />
  • <br />
  • <br />
  • <br />
  • Invisible indexes are maintained as usual by all DML’s but not used by CBO by default. <br />
  • Old way - add NULL column, updated NULLs, change to NOT NULL <br />
  • Doc says 1000000=infinity. To test - wait 11+ days <br />
  • <br />
  • Can also do FK <br /> Redesign physical data and keep referential integrity <br />
  • I did a test in single process - no visible difference <br /> Behind the scene does the same! <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Laurent Schneider has interesting blog post about case-sensitive passwords <br />
  • Purge? <br />
  • <br />
  • <br />
  • <br />

Oracle 11g New Features Out-of-the-Box by Alex Gorbachev (from Sydney Oracle Meetup #5) Oracle 11g New Features Out-of-the-Box by Alex Gorbachev (from Sydney Oracle Meetup #5) Presentation Transcript

  • Oracle 11g New Features Out-of-the-Box Alex Gorbachev, Christo Kutrovsky Sydney Oracle Meetup, 1 June 2009
  • Who is that talking? • Vice President, East Asia Pacific • The Pythian Group - leading provider of 24x7 database management services and consulting • Blogger • http://pythian.com/blogs/alexgorbachev • Twitter • @alexgorbachev • Conference presenter • OOW, UKOUG, Hotsos, AUSOUG, COLLABORATE, ... © The Pythian Group
  • Agenda • ASM - the missing pieces • RMAN - easier then ever • Standby DBs - usability • Productivity boosters • Performance manageability • Security - out of the box ©The Pythian Group Company Confidential
  • Evolution ©The Pythian Group Company Confidential
  • Evolution • A lots of areas have been polished • Bug fix - 10g Release 3? ©The Pythian Group Company Confidential
  • Evolution • A lots of areas have been polished • Bug fix - 10g Release 3? • Developer’s feedback taken into account ©The Pythian Group Company Confidential
  • Evolution • A lots of areas have been polished • Bug fix - 10g Release 3? • Developer’s feedback taken into account • DBA feedback taken into account • Production engineers managing real data-centers ©The Pythian Group Company Confidential
  • Automatic Storage Management ©The Pythian Group Company Confidential
  • Automatic Storage Management ©The Pythian Group Company Confidential
  • ASM diskgroup compatibility • Default SQL> select name, compatibility, database_compatibility from v$asm_diskgroup; NAME COMPATIBIL DATABASE_C ---- ---------- ---------- DG1 10.1.0.0.0 10.1.0.0.0 • New features SQL> ALTER DISKGROUP dg1 SET ATTRIBUTE 'compatible.asm'='11.1'; Diskgroup altered. SQL> ALTER DISKGROUP dg1 SET ATTRIBUTE 'compatible.rdbms'='11.1'; Diskgroup altered. SQL> select name, compatibility, database_compatibility from v$asm_diskgroup; NAME COMPATIBIL DATABASE_C ---- ---------- ---------- DG1 11.1.0.0.0 11.1.0.0.0 ©The Pythian Group Company Confidential 6
  • ASM - rolling updates for RAC ALTER SYSTEM START ROLLING MIGRATION TO 11.2.0.0.0; • Limited services from ASM • Normal database operation • No diskgroup configuration changes • Mount / unmount diskgroups ALTER SYSTEM STOP ROLLING MIGRATION; ©The Pythian Group Company Confidential
  • ASM - variable AU size • Allocation Unit - 1/2/4/.../64 MB • 10g - 1MB (_asm_ausize) • Data sits closer together and can be read in bigger chunks • Can improve sequential IO • Reduces striping over SAN striped LUN’s • Configuring Oracle ASM hidden parameters for EVA8000, HP Knowledge Brief • Reduces SGA for metadata for large files • 11g - can be done per diskgroup ©The Pythian Group Company Confidential
  • ASM - variable extent size • 10g • 1 extent = 1 AU 1 TB = 1+ mil. extents  11g  1-20,000 extents 1 1MB AU: extent = 1 AU 1 TB = 53,572 extents  20,001 - 40,000 1 64MB AU: extent = 8 AU’s 1 TB = 16,384 extents  40,001 - ... 1 100 TB = 66,788 extents extent = 64 AU’s ©The Pythian Group Company Confidential 9
  • ASM - recovery from failures • Fast Mirror Resync • OFFLINE disks • disk_repair_time attribute • ASM extent change tracking • Suitable for transient failures and maintenance • Fast Rebalancing in restricted mount • Rebalancing => many lock/unlock extent map • Restrict mode rebalancing => no locks • Restricted mounted DG => service outage ©The Pythian Group Company Confidential
  • ASM - Preferred Mirror Read • For extended clusters • Storage mirrored across 2 or 3 datacenters • 10g • Read is first done on primary extent • 11g • Preferred read failure groups (to local disks) • asm_preferred_read_failure_groups in init.ora ©The Pythian Group Company Confidential
  • ASM - asmcmd • “cp” command • ASM <=> OS or ASM <=> ASM • Remote <=> local isntance • Does it work??? + slow • du command like on Unix • lsdsk - list disks (like lsdg for diskgroups) • remap - repairs blocks • md_backup / md_restore - for metadata • asmcmd -p - current directory in prompt ©The Pythian Group Company Confidential
  • R-MAN ©The Pythian Group Company Confidential
  • R-MAN ©The Pythian Group Company Confidential
  • R-MAN ©The Pythian Group Company Confidential
  • RMAN - backup performance • CONFIGURE COMPRESSION ALGORITHM ‘type’; • zlib - faster (11g, Advanced Compression) • Bzip2 - smaller (default, 10g) • BACKUP ... SECTION SIZE • single file parallel backup / restore • max 256 sections per file • Undo tablespace backup optimization • Committed undo not backed up • UNDO_RETENTION can be accounted for ©The Pythian Group Company Confidential 14
  • RMAN - usability (1) • Archival backup • makes backups not part of retention policy • archivelogs are only to make backup consistent • KEEP UNTIL / KEEP FOREVER • used in BACKUP and CHANGE • Archivelog deletion policy • applied/shipped on standby • DB_UNIQUE_NAME • remote configure for another DB ©The Pythian Group Company Confidential 15
  • RMAN - usability (2) • Substitution variables • Like SET UNTIL &TIMESTAMP; • Backup read only TTS • No need to read write after TTS import ©The Pythian Group Company Confidential 16
  • RMAN - Data Recovery Advisor • RMAN> list failure; • missing files • corrupted files or blocks • RMAN> advise failure; • RMAN> repair failure [preview]; • RMAN> change failure; ©The Pythian Group Company Confidential
  • RMAN - list failure RMAN> LIST FAILURE; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 142 HIGH OPEN 23-APR-07 One or more non-system datafiles are missing 101 HIGH OPEN 23-APR-07 Datafile 1: '/disk1/ oradata/prod/system01.dbf' contains one or more corrupt blocks ©The Pythian Group Company Confidential
  • RMAN - duplicate • FROM ACTIVE DATABASE • PASSWORD FILE • TO RESTORE POINT • SPFILE • PARAMETER_VALUE_CONVERT • SET parameter=value • TABLESPACE <list> • allows for some tablespaces to be duplicated • No need for standby controlfile backup ©The Pythian Group Company Confidential
  • Data Guard & Physical Standby ©The Pythian Group Company Confidential
  • Data Guard & Physical Standby ©The Pythian Group Company Confidential
  • Data Guard & Physical Standby ©The Pythian Group Company Confidential
  • Standby - different platforms • Different CPU architectures • SPARC <=> x86 • Operating Systems • Linux <=> Windows • “Bitness” • 32 bit <=> 64 bit ©The Pythian Group Company Confidential 21
  • Standby - more uses for DR site • Active Data Guard - Real-time Query • Open read only while redo apply is active • No impact on RTO • Snapshot standby database • Read write and still accepting logs • RPO is not impacted, only RTO • ALTER DATABASE CONVERT TO SNAPSHOT STANDBY; • ALTER DATABASE CONVERT TO PHYSICAL STANDBY; ©The Pythian Group Company Confidential
  • Standby - easier to manage • RMAN re-instantiate datafile over network rman target sys@standby auxiliary sys@prod BACKUP AS COPY DATAFILE 2 AUXILIARY FORMAT ‘...’; • On the fly compression for gap resolution • Redo transport response time histogram • NET_TIMEOUT based on V$REDO_DEST_RESP_HISTOGRAM • DB_UNIQUE_NAME • Better RMAN support • Sync between primary and standby ©The Pythian Group Company Confidential
  • Standby - off-host backups • Persistent configuration • Block change tracking • Fast incremental backups • Backups associated with primary database • Simplified restore • Controlfile backup on standby ©The Pythian Group Company Confidential
  • Manageability & Productivity ©The Pythian Group Company Confidential
  • Manageability & Productivity ©The Pythian Group Company Confidential
  • Read Only table • Read only tables now available • ALTER TABLE x READ ONLY; • ALTER TABLE x READ WRITE; • Simple, insignificant, but needed ©The Pythian Group Company Confidential
  • Invisible indexes • Can you drop a large index? • ALTER INDEX should_i_drop INVISIBLE; • Do you need a new index? • CREATE INDEX do_i_need INVISIBLE; • ALTER SESSION SET optimizer_use_invisible_indexes=t rue • USER_ ALL_ DBA_INDEXES.VISIBILITY ©The Pythian Group Company Confidential
  • Not null with default • Not null columns with default value are maintained in dictionary • No space taken • Instant add • Existing columns are NOT converted • What about indexes on the columns? ©The Pythian Group Company Confidential
  • DDL can now wait • All DDLs can wait • ddl_lock_timeout (default 0) • alter session set ddl_lock_timeout=5; • create index on busy_table… • 0 ... 1,000,000 seconds ©The Pythian Group Company Confidential
  • Virtual columns CREATE TABLE users ( display_name VARCHAR2(30), name AS (UPPER(display_name))); • Simplify SELECT’s • Easy to maintain • Simplify physical data re-design • Partition on virtual columns • Index virtual columns • CBO collects statistics ©The Pythian Group Company Confidential 30
  • Virtual columns for data integrity SQL> create unique index users_uk on users(name); Index created. SQL> insert into users (display_name) values ('Alex'); 1 row created. SQL> insert into users (display_name) values ('ALEX'); insert into users (display_name) values ('ALEX') * ERROR at line 1: ORA-00001: unique constraint (SYS.USERS_UK) violated ©The Pythian Group Company Confidential 31
  • PL/SQL - sequence in variable • 10g • SELECT seq.NEXTVAL INTO my_var FROM DUAL; • 11g • my_var := seq.NEXTVAL; ©The Pythian Group Company Confidential
  • Performance ©The Pythian Group Company Confidential 33
  • Performance ©The Pythian Group Company Confidential 33
  • Statistics granularity • 10g • DBMS_STATS.SET_PARAM • 11g • SET_GLOBAL_PREFS • SET_DATABASE_PREFS • SET_SCHEMA_PREFS • SET_TABLE_PREFS ©The Pythian Group Company Confidential 34
  • Non-published statistics • Gather table stats without applying DBMS_STATS.SET_SCHEMA_PREFS (’scott’,’publish’,’false’); ALTER SESSION SET optimizer_pending_statistics = TRUE; DBMS_STATS.PUBLISH_PENDING_STATS(...); ©The Pythian Group Company Confidential
  • Variable stale percent • 10g - fixed 10% • 11g variable with 10% default DBMS_STATS.SET_SCHEMA_PREFS (’scott’,’stale_percent’,’25’); ©The Pythian Group Company Confidential 36
  • Incremental statistics gathering • Gather stats on partitioned tables by scanning only changed partitions • SET_SCHEMA_STATS • incremental - true • estimate_percent - auto_sample_size • granularity - auto ©The Pythian Group Company Confidential 37
  • AUTO_SAMPLE_SIZE • Doesn’t just set estimate percent • Changes statistics gathering algorithm • Some statistics gather as precise as with 100% • See Wolfgang Brightling’s paper • Active Statistics ©The Pythian Group Company Confidential 38
  • Creating new database ©The Pythian Group Company Confidential 39
  • Real Time SQL Monitor • Much, much better then v$session_long_ops • SQL is parallel or 5+ seconds of CPU or IO • v$sql_monitor • v$sql_plan_monitor • *limited* stats (number of starts and output rows) • elapsed time and etc can be derived by joining with v$sql_monitor and v $active_session_history • Updated near real time - every second or so • Kept at least for a minute after completion ©The Pythian Group Company Confidential
  • Data Pump - obscure & compress • Sensitive columns in export dump • per column REMAP_DATA=schema.tbl.col:schema.package.function • Compress metadata and data • Advanced Compression option ALL DATA_ONLY METADATA_ONLY NONE ©The Pythian Group Company Confidential
  • Security ©The Pythian Group Company Confidential
  • Security ©The Pythian Group Company Confidential
  • Security - DBCA ©The Pythian Group Company Confidential 43
  • Security - passwords • New built in password check function • See utlpwdmg.sql • Password expiration in DEFAULT profile • Case-sensitive passwords • sec_case_sensitive_logon=true (init.ora) • DB upgrade / user import keep passwords • DBA_USERS.PASSWORD_VERSIONS • orapwd ignorecase=yes/no • Warning: db links to case-sensitive 11g ©The Pythian Group Company Confidential
  • Security - audit by default • AUDIT_TRAIL = DB ALTER ANY PROCEDURE CREATE EXTERNAL JOB ALTER ANY TABLE CREATE PUBLIC DATABASE LINK ALTER DATABASE CREATE SESSION ALTER PROFILE CREATE USER AUDIT ROLE BY ACCESS DROP ANY PROCEDURE ALTER SYSTEM DROP ANY TABLE ALTER USER DROP PROFILE AUDIT SYSTEM DROP USER AUDIT SYSTEM BY ACCESS EXEMPT ACCESS POLICY CREATE ANY LIBRARY GRANT ANY OBJECT PRIVILEGE CREATE ANY JOB GRANT ANY PRIVILEGE CREATE ANY PROCEDURE GRANT ANY ROLE CREATE ANY TABLE ©The Pythian Group Company Confidential 45
  • Security - other enhancements • Tablespace encryption • All blocks are encrypted • No need to search for columns • TDE feature (Advanced Security option) • Enterprise Manager enhancement • Only DB Control is available ©The Pythian Group Company Confidential
  • Security - Data Pump • ENCRYPTION ALL DATA_ONLY ENCRYPTED_COLUMNS_ONLY METADATA_ONLY NONE • ENCRYPTION_ALGORITHM AES128 AES192 AES256 • ENCRYPTION_MODE DUAL PASSWORD TRANSPARENT • ENCRYPTION_PASSWORD ©The Pythian Group Company Confidential 47
  • Q&A Thank you! gorbachev@pythian.com http://pythian.com/blogs/alexgorbachev http://twitter.com/alexgorbachev ©The Pythian Group Company Confidential 48