33
Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009 © 2009 Atos Origin. Confidential information owned by Atos Origin, to be used by the recipient only. This document or any part of it, may not be reproduced, copied, circulated and/or distributed nor quoted without prior written approval from Atos Origin. projecten & beheer Jannes Arends, Rob Lasonder Dusseldorf, 21-03-2011 O9i VLDB datawarehouse migratie naar Exadata

Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

Embed Size (px)

Citation preview

Page 1: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009© 2009 Atos Origin. Confidential information owned by Atos Origin, to be used by the recipient only. This document or any part of it, may not be reproduced, copied, circulated and/or distributed nor quoted without prior written approval from Atos Origin.

projecten & beheer

Jannes Arends, Rob Lasonder

Dusseldorf, 21-03-2011

O9i VLDB datawarehouse migratie naar Exadata

Page 2: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

2 Custom presentation- or document control name

3 artikelen Oracle Optimize Magazine DWH/Exadata migratie project:

http://www.rob.lasonder.org/index.php/my-publications/

Page 3: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

3 Custom presentation- or document control name

0 Introductie: Snelcursus Duits

Die Datei Het bestand

Ein Patch einspielen Een patch inrollen

Page 4: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

4 Custom presentation- or document control name

Agenda

» Introductie

» Voorbereiding Exadata database machine» Inventarisatie bron databases» Inventarisatie Exadata machine» Instance mapping en aanmaken instances op Exadata» Resource management (AWR, instance caging, db resource management)» Aanmaken DBFS voor beheer (geen ACFS support voor exadata)

» De migratie» Migratie strategie» Partitionering en parallellisatie» Inregelen compressie (OLTP en EHCC)» Testing & Results

» Inregelen beheer» Backup en uitwijk» Monitoring

Page 5: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

5 Custom presentation- or document control name

0 Introductie: Aandachtspunten bij de migratie

» Oracle9i => Oracle11g» Connect role (connect_9i), default profile unexpire» Oracle10g + 11g new features» Oracle parameters» “Issues”: dbms_pipe, utl_file_dir, distributed transactions, database links

» Single instance database => RAC database» Instance mapping» Resource management: inter-instance level: AWM (services), » Resource management: instance level: instance caging» Resource management: intra-instance: database resource management» Diverse aandachtspunten: utl_file_dir, connectivity (scan listeners)

» Oracle VLDB aspecten» Migratie strategie» Partitionering en parallellisatie

» Oracle Exadata aspecten» Compressie (OLTP en EHCC)» Performance (query offload e.d.)» Backup en uitwijk» Beheer (storage cells en database servers) en monitoring

Page 6: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

6 Custom presentation- or document control name

0 Introductie: oude Oracle landschap

•All databases are configured as a non-RAC database, where a single instance is mapped to one database. The data is stored in storage devices that are attached to the servers via SAN.

•2 VLDB databases (18,7 TB en 13,0 TB) met grote gepartitioneerde tabellen

•Grootste database SGA 84 GB en PGA 35 GB, 48 CPU

•Backup voor 2 grote databases via afsplitsen mirrors. Kleine via rman

Page 7: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

7 Custom presentation- or document control name

0 Introductie: oude Oracle landschap

Database CPU PGA SGA TOT SIZE GB

DWHP01 48 (share with DWHKDP01) 24 GB 84 GB 108 GB 19.134 GB

DWHKDP01 48 (share with DWHP01) 13 GB 29 GB 42 GB 13.342 GB

DWHE01 4 2 GB 3,4 GB 6 GB 0,4 GB

SCOP01 2 1 GB 0,6 GB 2 GB 2,4 GB

CMCP01 8 4 GB 8,1 GB 12 GB 2,9 GB

CLMP01 8 (share with CLMD01/CLMD01) 3 GB 5,0 GB 8 GB 2,1 GB

CLMD01 8 (share with CLMP01/CLMC01) 2 GB 3,4 GB 6 GB 1,5 GB

CLMC01 8 (share with CLMP01/CLMD01) 0,6 GB 1,0 GB 2 GB 0,8 GB

Totaal 70 49,6 GB 134,5 GB 186 GB 32.486 GB

Page 8: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

8 Custom presentation- or document control name

0 Introductie: nieuwe Oracle landschap

PROD:1 Exadata machine (SAS-disks) , Pre-prod: ½ Exadata machine (SATA-disks)

Backup naar externe storage, 110 TB beschikbaar. Via infiniband (40 Gb/s) connectie

Externe storage gekoppeld aan tape devices

Backup storage via 10 Gb verbinding gespiegeld naar uitwijk locatie

Voor externe files NFS filesysteem beschikbaar

Page 9: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

9 Custom presentation- or document control name

0 Introductie: nieuwe Oracle landschap

Met 1 ½ Exadata rack feitelijk al een heel server landschap in beheer:

Page 10: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

10 Custom presentation- or document control name

0 Introductie: Oracle Best Practises Exadata

V1 Best practices are usually applicable on V2

Note.757552.1 Oracle Exadata Best Practices:

Note.759429.1 Oracle Exadata Performance Best Practices:

Note.757553.1 Oracle Exadata Setup/Configuration Best Practices:

Note.760347.1 Oracle Exadata High Availability Best Practices:

Note.760383.1 Oracle Exadata Diagnosability Best Practices:

Note.760394.1 Oracle Exadata Hardware Diagnostics Best Practices:

Note.760399.1 Oracle Exadata Security Best Practices:

Note.760392.1 Oracle Exadata Manageability Best Practices:

Note.760390.1 Oracle Exadata Migration Best Practices:

Note.786615.1 Oracle Exadata Backup & Recovery Best Practices:

Note.787205.1 Setting up DCLI Utility on Oracle DB host:

Note.786616.1 Oracle Exadata Enterprise Manager Best Practices

Note 888828.1 Database Machine and Exadata Storage Server 11g Rel2 Supported versions

Page 11: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

11 Custom presentation- or document control name

I Voorbereiding: inventarisatie bron omgeving

* Parameter onderzoek database•Parameter onderzoek databases (sizing en config parameters, non default parameters) Zie doc inventarisatie.xls

•Top 20 tabellen per database opgeslagen. Zie doc top20 tabellen.xls. (top 3 grootste tabellen: DWHKDP:3,6 TB, DWHKDP: 2,9 TB, DWHP: 1,2 TB

•Van 2 VLDB databases statspack rapport uitgedraaid. 10:00 – 11:00 en 14:00 – 15:00). Zie sp_<SID>_*.txt

•2 VLDB databases bekeken met Lab128

•V$db_cache_advice en v$pga_target_advice van beide bekeken. (ivm nieuwe sga_target en pga_aggregate_target settings)

Page 12: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

12 Custom presentation- or document control name

I Voorbereiding: controleer exadata machines

* Parameter onderzoek database•Database machines worden als een “appliance” opgeleverd, met alle software geinstalleerd en geconfigureerd, met draaiende ASM instances en 1 voorbeeld database. Meestal door Oracle ACS.

•Oracle levert per database machine een opleverdocument aan de klant. Deze bevat alle specificaties. Zie 112_ExadataDeploymentSummary_v2 1_atos_cami.docx

•Klant had zelf aangepaste .profile geinstalleerd met allemaal foutieve en obsolete (oracle7, oracle8) settings.

•Controleer de patches m.b.v. Oracle Note 888828.1

•Database machine niet up-to-date met patches. Patchset 7 was uit, tot en met patchset 4 geinstalleerd, OWB patch missing. Zie patches.doc

•Versie 11.2.0.1.0 geinstalleerd i.p.v. 11.2.0.2.0. Bug bij gebruik huge pages.

•3 dagen na aanvang project dringende melding Oracle dat complete database machine firmware patch moet ivm +ASM diskproblemen. => PROD: 14 storage servers en 8 database servers en TEST 7 storage servers en 4 database servers.

•Foutieve datum-tijd op de storage servers: 5 uur te laat.

Oracle Exacheck

Extra eigen cheks

Page 13: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

13 Custom presentation- or document control name

I Voorbereiding: inventarisatie exadata machines

* Parameter onderzoek database•Samenvattend:

•Aanwezig: 8 database nodes met running +ASM instances.

•Aanwezig: 1 database (dbm) met 8 instances

•Geconfigureerde +ASM storage. Zie b.v. asmca info:

Page 14: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

14 Custom presentation- or document control name

I Voorbereiding: inventarisatie exadata machines

* Parameter onderzoek database

Al met al “bescheiden” hoeveelheid storage beschikbaar van 33 TB

Zonder compressie (OLTP,EHCC) past het datawarehouse er niet op.

Page 15: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

15 Custom presentation- or document control name

I Voorbereiding: instance mapping I

Database CPU PGA SGA TOT SIZE GB

DWHP01 48 (share with DWHKDP01) 24 GB 84 GB 108 GB 19.134 GB

DWHKDP01 48 (share with DWHP01) 13 GB 29 GB 42 GB 13.342 GB

DWHE01 4 2 GB 3,4 GB 6 GB 0,4 GB

SCOP01 2 1 GB 0,6 GB 2 GB 2,4 GB

CMCP01 8 4 GB 8,1 GB 12 GB 2,9 GB

CLMP01 8 (share with CLMD01/CLMD01)

3 GB 5,0 GB 8 GB 2,1 GB

CLMD01 8 (share with CLMP01/CLMC01) 2 GB 3,4 GB 6 GB 1,5 GB

CLMC01 8 (share with CLMP01/CLMD01) 0,6 GB 1,0 GB 2 GB 0,8 GB

Totaal 70 49,6 GB 134,5 GB 186 GB 32.486 GB

Resource Bruto per node Netto per node Total netto ( x 8)

Cpu 16 16 128

Memory 72 GB 60 GB 480 GB

Storage 39.118 GB

Page 16: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

16 Custom presentation- or document control name

I Voorbereiding: instance mapping II

Install instances op alle nodes en disable waar nodig.

•Voordeel: heel makkelijk een instance bij te schakelen of te switchen.

•Nadeel: REDO en UNDO voor alle instances. (UNDO TBS DWHP > 1 TB)

Page 17: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

17 Custom presentation- or document control name

I Voorbereiding: algemene db richtlijnen

•Oracle note 1094934.1 (Exadata Best Practises for DWH)

•Memory: 72 GB per node. 12 GB reserveren voor OS

•Linux Huge pages toepassen (default uit op exadata)

•Fileystemio_options op “setall”. (default op none)

•Bigfile tablespaces met auto allocate

•Recyclebin off ter voorkoming fragmentatie

•Geen memory_target maar sga_target/pga_aggregate_target (RA-04031: unable to allocate 4032 bytes of shared memory )

•CELL_PARTITION_LARGE_EXTENTS = true

•Online redo log files van 32 GB, 1 member per groep.

•Statistics: wel statistics, dictionary stats en v$ stats, geen system statistics

•SQLNet setup: per node in /etc/system/oracle_admin een tnsnames.ora en sqlnet.ora. In elke $ORACLE_HOME/network/admin een link

•Enable NFSmount op alle database nodes

Page 18: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

18 Custom presentation- or document control name

I Voorbereiding: aanmaken instances met dbca

After initial creation databases are configured:

Instance setup according to instance mapping document

Creation and sizing of user tablespaces

Configure specific init.ora parameters

@/dbfs_mounts/admin/create/pre_migrate_changes.sql

After migration some additional configuration steps

@/dbfs_mounts/admin/create/post_migrate_changes.sql

Configure backup settings: autobackup, force logging, etc.

Also database servers are configured: enable cron for oracle, configure sqlnet setup, enable NFS mounts, etc.

Page 19: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

19 Custom presentation- or document control name

I Voorbereiding: aanmaken instances met dbca

Aanmaken database m.b.v. DBCA. (8 minuten)

Page 20: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

20 Custom presentation- or document control name

I Voorbereiding: configuratie database

Na afloop m.b.v. scripts configureren database:

Sql> @/dbfs_mounts/admin/DWHKDP/resize_redo.sql

Sql> @/dbfs_mounts/admin/DWHKDP/resize_temp_DWHKDP.sql

Sql> @/dbfs_mounts/admin/DWHKDP/resize_undo_DWHKDP1.sql

Sql> @/dbfs_mounts/admin/DWHKDP/create_tablespaces_DWHKDP.sql

Sql> @/dbfs_mounts/admin/DWHKDP/set_parameters_DWHKDP.sql

$ srvctl stop database –d DWHKDP

$ srvctl start database –d DWHKDP {to enable parameter settings}

Sql> @/dbfs_mounts/admin/DWHKDP/resize_undo_DWHKDP2.sql

$ srvctl stop database –d DWHKDP

$ srvctl start database –d DWHKDP {om oude UNDO vrij te spelen}

Sql> @/dbfs_mounts/admin/DWHKDP/resize_undo_DWHKDP3.sql

Sql>@/dbfs_mounts/admin/DWHKDP/pre_migration_changes.sql

Page 21: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

21 Custom presentation- or document control name

I Voorbereiding: configuratie database

Voorbeeld 1: aanmaken UNDO tablespaces: iets meer dan 1 minuut voor 200 GB

SQL> create bigfile undo tablespace undotbs1

datafile size 204800M autoextend on next 672M maxsize 409600M;

Tablespace created.

Elapsed: 00:01:06.51

Ter vergelijking: “onze” Telco database:

SQL> create bigfile undo tablespace robb

datafile '+FRA_DISK' size 204800M autoextend on next 672M maxsize 409600M;

Tablespace created.

Elapsed: 00:15:30.39

NXP RAC (OTA). Met ons mooie AO SOD (storage on demand, business class storage)

SQL> create bigfile undo tablespace jannes datafile '+DG_OTA' size 204800M autoextend on next 672M maxsize 409600M;

Tablespace created.

Elapsed: 00:23:57.02

En op ons nieuwe USD stretched RAC cluster met HITACHI storage

SQL> create bigfile undo tablespace jannes datafile '+GTOE_DATA' size 204800M autoextend on next 672M maxsize 409600M;

Tablespace created.

Elapsed: 00:14:57.47

Page 22: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

22 Custom presentation- or document control name

I Voorbereiding: configuratie database

Voorbeeld 2: aanmaken tablespace 1,7 TB in minder dan 10 minuten

SQL> create bigfile tablespace ts_dat_kdm_large

datafile size 1776096M autoextend on next 672M maxsize 8880480M;

Tablespace created.

Elapsed: 00:09:54.40

Voorbeeld 3: aanmaken tablespace met default EHCC compression

create bigfile tablespace ts_dat_kdm_archive datafile size 592032M autoextend on next 672M maxsize 2960160M default compress for archive low;

Page 23: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

23 Custom presentation- or document control name

I Voorbereiding: EHCC compressie vaststellen

Page 24: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

24 Custom presentation- or document control name

Intermezzo: DCLI utility

•Distributed command line interface

•Doel: om 1 statement op meerdere nodes tegelijk uit te voeren.

•Voorbeeld:kopieren tnsnames.ora naar alle 8 nodes:•[oracle@camidb01 ~]$ dcli -g dbs_group -l oracle cp /dbfs_mounts/admin/tns/tnsnames.ora /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

•Zie documentatie voor meer info

Page 25: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

25 Custom presentation- or document control name

II Migratie: concept

Hoofdmethode: INSERT /*+ APPEND */ via migratie server.

=> Daarnaast: 1 DB via export/import en 1 DB via clone

Page 26: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

26 Custom presentation- or document control name

II Migratie: enkele findings

Locked statistics

Dbms_pipe in gebruik. Niet ondersteund door RAC

Tegenwoordig moet je als je naar buiten toe wilt met utl_smtp een access control list maken.

Dat is nieuw in 11g.

Page 27: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

27 Custom presentation- or document control name

II Migratie: EHCC compressie

select round(sum(bytes)/(1024/1024/1024) SIZE_GB_DBSEGMENTS

from dba_segments;

DWHKDP Before: 12.288 GB After 1039 GB Factor 11,8

COMPRESSION DWHKDP BY OBJECT TYPE

select segment_type, round (sum(bytes)/1024/1024/1024) from dba_segments

where segment_type like 'INDEX%' or segment_type like 'TABLE%‘

group by segment_type order by segment_type;

Compression factor objects => nog uitwerken.

DWHP Before: 16.567 GB DWHP After: 5.895 GB Factor 2,8

Page 28: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

28 Custom presentation- or document control name

II Migratie: doorlooptijden

Database DWHKDP: 8 uur

Database DWHP: 9 uur. => is 1,8 TB per uur

Page 29: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

29 Custom presentation- or document control name

Intermezzo: global awr reports

Zeer nuttig voor RAC: sql>@?/rdbms/admin/awrgrpt.sql

=> Een AWR rapport over alle instances heen.

Page 30: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

30 Custom presentation- or document control name

Tape

III: De Backup: landschap

Page 31: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

31 Custom presentation- or document control name

III: De Backup : configuratie

4 channels per actieve instance

Op de SUN OS per channel een mount plus een mount voor de archives.

Voorbeeld: CLMP heeft 2 actieve instances op node camidb03 en camidb04. De volgende channels worden gealloceerd bij een backup:

/oradata/CLMP/backup_13 t/m /oradata/CLMP/backup_20

Backup’s gescheduled in de cron van Oracle: L0, L1, archival. Enkele doorloopgegevens:

Page 32: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

32 Custom presentation- or document control name

III: De Backup : doorlooptijden

snelheid backup DWHKDP naar exadata zelf:

Database DWHKDP van 1 TB

Allocate 16 channels, 2 channel per database node

Maken van een multi-section backup

18 minuten !!

Contrast: compressed backup 3:20 minuten !!

Page 33: Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. October 2009

33 Custom presentation- or document control name

III: Failover concept