11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have...

38
11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October

Transcript of 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have...

Page 1: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

11gThe Perfection of a Masterpiece

A presentation about new features of 11g you may not have noticedChristo Kutrovsky

The Pythian Group

2007 October

Page 2: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Who Am I

Joined Pythian in 2003 Became team lead for one of Pythian's service

delivery teams in 2006 Notable clients: Palm Coast Data,

Freshdirect.com Presented at Collaborate '06, '07, RMOUG Special interest in 11g, RAC, Disk IO

performance, and memory Pythian's delegate to the 11g beta, participated at

the camp level (two visits)

Page 3: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Who is Pythian

Provides turnkey global data architecture and operations teams on a linear-cost-to-effort basis

Founded in 1997, headquartered in Ottawa, Canada, with offices in India and Australia

Supporting almost 100 clients worldwide and more than 600 production databases

Almost 50 production engineers engaged in client service delivery

Broad data infrastructure expertise primarily focused on Oracle, Microsoft SQL Server, and MySQL on enterprise hardware

Page 4: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Agenda

11g – an Evolution ASM – the missing pieces RMAN – easier then ever Standby DBs – more usable SQL & PL/SQL – improvements out of

the box Security – out of the box

Page 5: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

An Evolution

A lots of areas have been polished User feedback taken into account DBA feedback taken into account

for the first time?

Page 6: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

ASM in 11g

Page 7: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

ASM – Rolling updates

Can upgrade or patch ASM RAC instances without shutting down all nodes ALTER SYSTEM START ROLLING

MIGRATION TO 11.2.0.0.0; Limited “services” from ASM

only mount/open

Page 8: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

ASM – Variable AU

The allocation units are variable size, like LMT tablespaces

Data sits closer together and can be read in bigger chunks

Reduces SGA memory for metadata for large files

Page 9: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

ASM - asmcmd

“cp” command including from ASM to OS including support for remote instances

find command essential for cleanup

remap – repairs blocks for non-raid disks

asmcmd -p – current directory

Page 10: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN in 11g

Page 11: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN – configure

CONFIGURE COMPRESSION ALGORITHM ‘type’; zlib – less cpu (faster) Bzip2 – more compression

Archivelog deletion policy applied/shipped on standby

DB_UNIQUE_NAME configure for another db

Page 12: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN - backup

section size can split big files into “sections”

keep until restore point parameter can keep only logs needed to make backup

consistent

Page 13: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN – repair failure

RMAN> list failure; missing files corrupted files or blocks

RMAN> advise failure; RMAN> repair failure;

Page 14: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

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 missing101 HIGH OPEN 23-APR-07 Datafile 1:

'/disk1/oradata/prod/system01.dbf' contains one or more corrupt blocks

Page 15: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN - duplicate

from active database no need for backup

to restore point for ease of use

password file, spfile for completeness, a single command

tablespace allows for only 1 tablespace to be duplicated

Page 16: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN – duplicate standby

Can use “backup controlfile” instead of “standby controlfile”

Page 17: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN - list

list failure; list restore point all; list recoverable to restore point;

Page 18: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

RMAN - other

recover …exclude flashback log backup optimization

committed undo is not backed up option available for enforcing

UNDO_RETENTION backup of read only tablespaces now

possible

Page 19: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Standby

Page 20: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Standby – running backups

Can have persistent configuration Can have block change tracking Can be associated with production

database On the fly compression for archived redo

only for gap resolution – need to verify

Page 21: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Standby – more uses

Can be open read only and updated in real time

Can be open read write, while still accepting logs from production ALTER DATABASE CONVERT TO

SNAPSHOT STANDBY ALTER DATABASE CONVERT TO

PHYSICAL STANDBY;

Page 22: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Standby – more uses 2

RMAN aware network copies from standby to production rman target sys@standby auxiliary sys@prod BACKUP AS COPY DATAFILE 2

AUXILIARY FORMAT ‘/prod_disk/file.dbf’

Page 23: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

SQL & PL/SQL

Page 24: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Read Only table

Read only tables now available alter table X read only; alter table X read write;

Simple, insignificant, but needed

Page 25: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Invisible indexes

alter index SHOULD_I_DROP invisible; alternative to dropping can be used for testing

alter session set optimizer_use_invisible_indexes = true;

Page 26: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Default columns

Default columns with not null maintained in data dictionary takes no space instant add

Page 27: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

DDL can now wait

All DDLs can wait ddl_lock_timeout

This is the new default default set to wait 0 seconds

alter session set ddl_lock_timeout=5; create index on small_but_busy_table…

Page 28: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Virtual Columns

create table users (display_name varchar2(30),name as (upper(display_name))

);insert into users (display_name)

values (‘test’);

Amongts other things, IOTs not supported

Page 29: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

PL/SQL – sequence in variable

declare

v number := a_sequence.nextval;

begin

end;

Page 30: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Statistics gathering

Can gather without applying DBMS_STATS.SET_SCHEMA_PREFS

(‘schema’,’publish’,’false’); alter session set

optimizer_pending_statistics = TRUE;

Page 31: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Statistics gathering

Automatically maintains history Can automatically roll back to a point in

time dbms_stats.restore*

Page 32: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Real Time SQL Monitor

Much, much better then session_long_ops v$sql_monitor

For queries running for more then 1 sec Real time

v$sql_plan_monitor includes stats for each step, real time

Page 33: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Security

Page 34: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Security – password complexity

Built in password check function in UTLPWDMG.SQL allows “standard” functionality

Built in default profile for password expiration

Page 35: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

Tablespace encryption

alter tablespace payroll encrypt; alternative to file system encryption

puts some vendors out of business

Page 36: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

DataPump Export/Import

Page 37: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

DataPump

use function to modify table data to hide sensitive data

compress both metadata and data requires “advanced compression option”

encrypt exports including passwordless from wallet

Page 38: 11g The Perfection of a Masterpiece A presentation about new features of 11g you may not have noticed Christo Kutrovsky The Pythian Group 2007 October.

The End

Thank you,

Questions?

[email protected] my blog at

http://www.pythian.com/blogs/kutrovsky/

http://www.pythian.com/