praxisbericht sap datenbank (oracle) upgrade nach … checklist to upgrade the database to 11g r2...
TRANSCRIPT
www.messe.de
Praxisbericht
SAP Datenbank (Oracle) Upgrade nach 11gR2
Andreas Ellerhoff, DBA Deutsche Messe
Seite: 2
Can this work … ? Yes it can … !
Seite: 3Seite: 3
Agenda
• Wer ist die „Deutsche Messe “? … CeBIT ?• SAP Landschaften bei der Deutschen Messe• SAP Hinweise + Oracle Notes für das Upgrade• Upgrade nach 11.2• Vergleich 10.2 zu 11.2 im SAP BW (System QS)• Bewertung und Ausblick
Seite: 4
Top 10 der weltweit größten Messen
495.265345.000321.754284.000263.888248.141230.837227.380213.813206.000
HannoverMilano (Rho/new site)
Frankfurt (Main)
Cologne
Düsseldorf
Chicago
Valencia
Paris expo
Moskau (Crocus Expo IEC)
Paris – Nord Villepint
Quelle: AUMA 04/08
DEIT
DE
DE
DE
USA
ES
FR
RUS
FR
Messeplatz
• Hannover Messe (60 Jahre)
• CeBIT (25 Jahre)
• EXPO 2000• IAA (Nutzfahrzeuge)
• EMO (Maschinenbau)
• Agritechnika (Landmaschinen)
• EuroTier (Landwirtschaft)
• Ligna (Holzmaschinen)
• Domotex (Bodenbeläge)
• CeMAT (Logistik)
• EuroBLECH (Blechverarbeitung)• ...
internationale LeitmessenHallenflächein m²
Seite: 5
CeBIT2011 preview and CeBIT2010 Review
Seite: 6Seite: 6
AgendaAgenda
• Wer ist die „Deutsche Messe “? … CeBIT ?• SAP Landschaften bei der Deutschen Messe• SAP Hinweise + Oracle Notes für das Upgrade• Vorbereitung der Oracle Datenbank für das Upgrade • Upgrade nach 11.2• Vergleich 10.2 zu 11.2 im SAP BW (System QS)• Bewertung und Ausblick
Seite: 7Seite: 7
SAP Systemlandschaft BW
SAP Landschaften (ERP, CRM, BW, RM)
Oracle SAP Datenbanken:• ERP: 4DBs• CRM: 4DBs• BW: 4+4DBs• RM: 3DBs• SM: 1DB• ZBV: 1DB• Trex: 1DB
Seite: 9Seite: 9
• Wer ist die „Deutsche Messe “? … CeBIT ?• SAP Landschaften bei der Deutschen Messe• SAP Hinweise + Oracle Notes für das Upgrade• Vorbereitung der Oracle Datenbank für das Upgrade • Upgrade nach 11.2• Vergleich 10.2 zu 11.2 im SAP BW (System QS)• Bewertung und Ausblick
Agenda
Seite: 10Seite: 10
SAP Hinweise
• SAP Hinweis zu init.ora Parametern• 1431798 Oracle 11.2.0: Einstellungen der Datenbankparameter • 1171650 - Automatisierter Oracle DB Parametercheck
• SAP Hinweise zur Datenbank Features (Compression, etc.)• 1436352 - Oracle 11g: Advanced Compression für SAP-Systeme
• SAP Hinweise zu BR Tools• 1430669 - BR*Tools Unterstützung für Oracle 11g• 1464156 - Unterstützung für Index-Komprimierung in BRSPACE 7.20
• SAP Hinweise zum Upgrade (insbes. SAP Upgrade Guide)• 1431793 - Oracle 11.2.0: Upgrade-Skripte• 1431794 - Oracle 11.2.0: Instant Client• 819829 - Oracle Instant Client: Installation/Konfiguration unter Unix
• SAP Hinweise zur Durchführung des Upgrade• 1431800 - Oracle 11.2.0: Central Technical Note
• SAP Hinweise zur Komprimierung/Kompaktierung• 701235 - Verwendung der Oracle-Komprimierung und BW • 1109743 - Komprimierung von Indexschlüsseln für Oracle-Datenbanken
Oracle Notes – Reorganisation/ Upgrade
• Oracle Notes zur Reorganisation der Datenbank• How To Gather and Display The Workload System Statistics? [ID 1148577.1]• ORA-01426 Identify the Object/Extents at the End of the Datafile Before Reclaiming Space [ID 742760.1] • How to Resolve ORA-03297 When Resizing a Datafile by Finding the Table Highwatermark [ID 130866.1] • Oracle Demantra Shrink vs. Rebuild Schema Fragmentation/Chaining Elimination [ID 1109438.1] • Master Note for OLTP Compression [ID 1223705.1] • List of Critical Patches Required For Oracle 11g Table Compression [ID 1061366.1] • 11g new features:Advanced Compression overview and advantages [ID 785787.1]
• Oracle Notes zum Upgrade• Oracle Database 11g Release 2 Information Center [ID 988222.1]• Release Schedule of Current Database Releases [ID 742060.1] • How to Download and Run Oracle's Database Pre-Upgrade Utility [ID 884522.1] • Maximum SHMMAX values for Linux x86 and x86-64 [ID 567506.1] (max. 4GB für LINUX-64)• Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration
Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1] (ab 11.2 min. 4GB) • Complete checklist to upgrade the database to 11g R2 using DBUA [ID 870814.1] • Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1] • NOTE:785351.1 - Oracle 11gR2 Upgrade Companion
• Oracle Upgrade Workshops (Dietrich)• http://www.oracle.com/technetwork/database/upgrade/upgrade11gr2-2day-workshop-173044.pdf
Release Schedule of Current Database Releases [ID 742060.1]
Seite: 13
Konsolidierung der 10.2 Datenbanken
• Reorganisation und Drücken der HWM (->DataPump)• aktuelle 10g-DBs mit PSU5 und SAP Bundle PatchSet
bestücken? da sie unterschiedliche Patch Stände haben ? (??? notwendig ???)
• INIT.ORA Parameter werden bei den vorhandenen DB-Typen ( OLTP10g / OLAP10g ) angeglichen und entsprechend den Vorgaben der SAP justiert. (??? vor Upgrade sinnvoll ???)
• komplexe SAP Skripte für INITORA EmpfehlungenParameterempfehlung zu 10.2 + 11.2 . beachten – viele Hinweise beachten
• Für PSU existieren eindeutige Zuordnungen für Parameter. Warum sind konsistente spfile- Skripte zur Zeitersparnis nicht möglich?
Vorbereitungen
• Reorganisation der alten 10g DB (HWM drücken)• Defragmentierung der Objekte und Plazieren in neuen TBS ist bei voluminöser DB
schwierig.• selektives Vorgehen der Online Reorganisation war praktisch nicht umsetzbar. Es gab zu viele Objekte
im oberen Bereich der HWM, so dass die Datafiles nicht reduziert werden konnten. • Versuch wurde aufgegeben. ( Reorg-Skript PL/SQL über 250 Objekte > 10MB )
• Komplettreorganisation mit DATAPUMP• Löschen von user „SAPDMA“ und Neuanlage. (mehrere Stunden)• vollständige Reorganisation + niedrige HWM (Dauer: wenige Stunden)
• Datenbank wurde mehrfach mittels RMAN duplicate Restored/Recovered• Dauer < 2h bei Nutzung der PARALLEL Option• auch über Inkarnationen hinweg• Sicheres Restore+Recover !!!
• SAP Pre-Upgrade Skripte ausführen:• create_restore_point.sql• pre_upgrade_checks.sql• pre_upgrade_status.sql• pre_upgrade_tasks.sql• utlu112i.sql• utlu112i_sap.sql
Zurück auf LOS - Die Datenbank bei neuer Inkarnation
• run {• allocate channel oem_backup_disk1 type disk;• allocate channel oem_backup_disk2 type disk;• allocate channel oem_backup_disk3 type disk;• set until time "to_date('Nov 04 2010 21:00:00','Mon DD YYYY HH24:MI:SS')";• restore database;• }
• run {• allocate channel oem_backup_disk1 type disk;• allocate channel oem_backup_disk2 type disk;• allocate channel oem_backup_disk3 type disk;• set until time "to_date('Nov 04 2010 21:00:00','Mon DD YYYY HH24:MI:SS')";• alter database mount;• reset database to incarnation 4918834;• recover database;• }
• List of Database Incarnations• DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time• ------- ------- -------- ---------------- --- ---------- ----------• 4918833 4918929 CQ3 2041987175 PARENT 1006343944 01-SEP-09• 4918833 4918834 CQ3 2041987175 PARENT 1006648029 03-SEP-09• 4918833 6325714 CQ3 2041987175 CURRENT 1313846992126 10-NOV-10
Neue 11gR2 Parameter
• Quantität / Anzahl init.ora Parameter: • 10.2.0.4=259• 11.1.0.7=296• 11.2.0.2=344
• Einstellen der Parameter nach SAP-Hinweis 1431798 + 1171650 mit Parametercheck
• init.ora Parameter sind in 11g noch überschaubar – verglichen mit 10g.
Seite: 17Seite: 17
Agenda
• Wer ist die „Deutsche Messe “? … CeBIT ?• SAP Landschaften bei der Deutschen Messe• SAP Hinweise + Oracle Notes für das Upgrade• Upgrade nach 11.2• Vergleich 10.2 zu 11.2 im SAP BW (System QS)• Bewertung und Ausblick
Seite: 18
(warum, wie , womit) Upgrade zur Version 11g
• warum: Gründe für den Upgrade nach 11g• wie: Vorbereitungen (SAP Upgrade Guide als roter Faden)• womit: Aufruf des OUI und Korrektur von check-Fehlern ?• womit: Oracle Base+PSU+SBP Installation für Binaries etc.• womit: DBUA – nun das Datenbank Upgrade
Gründe für den Upgrade nach 11g
• Gute Erfahrungen mit 11g Datenbanken• Technische Neuerungen
• Komprimierung• Tuning• Monitoring• Management im Grid
• „reguläre Wartung“ für Oracle10g endet 07/11
SAP UPGRADE GUIDE 11g Release 2 (11.2)
nur „50 Seiten“,aber viele Verweise auf Hinweise
Aufruf des OUI - was passiert mit den check-Fehlern ?
• Bei OS Parameterfehlern helfen Fix-Skripte• Deinstallation von ORACLE_HOME
kallisto:oracq3 89> /oracle/CQ3/102_64/oui/bin/runInstaller –silent -detachHome ORACLE_HOME="/oracle/CQ3/112_64"Starting Oracle Universal Installer...'DetachHome' was successful.
Oracle Base Installation mit OUI (+PSU) + SAP BundleSet MOPatch
SAP Bundle Patch Set:/bin/sh $ORACLE_HOME/MOPatch/mopatch.sh-v -s SAP_112020_201011_LINX8664.zip
Oracle Base Installation:/stage/database ./runInstaller.sh
Patch Inventory Status:Patches installed in Oracle Home /oracle/CQ3/112_64:69040688507266 (sql)
+ 9458152 (sql)9539440
+ 9584028 (sql)9770451
+ 9930151 (sql)9930315100581951015740210217100
Online Patche:
cd SAP_112020_201011/9930315/online $ORACLE_HOME/OPatch/opatch apply -silent –connectString $ORACLE_SID::
DBUA – nun das Datenbank Upgrade
Oracle Upgrade Assitant:
.../dbua
Agenda
• Wer ist die „Deutsche Messe “? … CeBIT ?• SAP Landschaften bei der Deutschen Messe• SAP Hinweise + Oracle Notes für das Upgrade• Upgrade nach 11.2• Vergleich 10.2 zu 11.2 im SAP BW (System QS)• Bewertung und Ausblick
Vergleich 10.2 zu 11.2 im SAP BW (System QS)
• Reorganisation der Tabellen/Indizes• Speicherverhalten (Backup, Platte)• Performance (SQL)
Reorganisation der Tabellen/Indizes
• Einsatz von Datapump (export/import) mit Reorganisation
• Für die Parallelisierung benötigt die Instanz genug Resourcen.
• TBS PSAPDATA PSA Tabellen wurden entfernt.
• 10g: ursprünglich 321,210GB wegen HWM • 10g: 190,704GB (reorganisiert)• 11g: 188,505GB (reorganisiert)
BW - Komprimierung
• Was kann komprimiert werden:• PSA Tabellen,
• wird bei uns regelmäßig truncated, daher wenig Potential
• historische Cubes• Aggregate ohne Navigationsattribute• ODS mit 3 phys. Tabellen
• Change Log kann uneingeschränkt komprimiert werden
• Indizes
• Was nicht nicht komprimiert werden darf:• Tabellen mit >255 Felder• Pool / Cluster / IOT / ABAP / Verbucher / RFC –Tabellen (reorg_excl_tab )
• Wie (gut) kann komprimiert werden ?• existiert Package: dbms_compression• SAP Support ( Zauberwort bei SAP: brspace )
BW – Komprimierung - konkret
• Was kann komprimiert werden ? (TBS hat 188,5GB)
• 72GB werden von 18 Objekten belegt. ( >1GB )• 87GB werden von 42 Objekten belegt. ( >500MB )
• Wie (gut) kann komprimiert werden ?• Info Package: exec dbms_compression.get_compression_ratio()
• TBS: Datensegmentkomprimierung • ALTER TABLESPACE "PSAPDMA_C" DEFAULT COMPRESS FOR ALL OPERATIONS;
• SAP Support: ( BRTOOLS - BRSPACE )• Indizes ( Hinweis 1464156 - mit konkreten Beispielen/ Skripten )• neuen LOB Typ konvertieren ( Hinweis 1431296 – mit konkreten Skripten )
• >70 SAP Tabellen mit LONG Typ identifiziert• Tabellen ( Hinweis 1431296 – mit konkreten Skripten )
brspace Beispiele: Datentypkonvertierung (LONG nach LOB)
brspace -u / -f tbreorg -a long2lob -o sapdma -s PSAPDMA -t allsel -n PSAPDMA_C -c ctablob -lc medium –SCT
-u system (oracle) user internal / -f Funktion tbreorg
-a Aktivität long2lob -o sap (schema) user sapdma -s TBS quelle PSAPDMA -n TBS neu PSAPDMA_C -t Tabellenauswahl allsel -c Komprimierungsoption ctablob -ic IndexKomprimierung Auswahlfunktion ora_proc -p Parallelität 4
brspace Beispiele: Indizes komprimieren
brspace -u / -c force -f idrebuild -o sapdma -s PSAPDMA -n PSAPDMA_C -t allsel -c cind_only -ic ora_proc -p 4
-u system (oracle) user internal / -f Funktion idrebuild
-o sap (schema) user sapdma -s TBS quelle PSAPDMA -n TBS neu PSAPDMA_C -t Tabellenauswahl allsel -c Komprimierungsoption cind_only -ic IndexKomprimierung Auswahlfunktion ora_proc -p Parallelität 4
BR0280I BRSPACE thread 4: time stamp: 2010-12-08 17.00.09BR1158I 2 of 1821 indexes processed - 51125312 of 3399470650 rows doneBR0204I Percentage done: 1.50%, estimated end time: 20:15
brspace Beispiele: Tabellen komprimieren
brspace -u / -p reorgEXCL.tab -f tbreorg -a reorg -o sapdma -s PSAPDMA -t allsel -n PSAPDMA_C -c ctab -SCT -p 4
-u system (oracle) user internal / -p Profil mit Ausnahmetabellen reorgEXCL.tab-f Funktion tbreorg
-o sap (schema) user sapdma -s TBS quelle PSAPDMA -n TBS neu PSAPDMA_C -t Tabellenauswahl allsel -c Komprimierungsoption ctab -ic IndexKomprimierung Auswahlfunktion ora_proc -p Parallelität 4
BW – Komprimierung – konkret (mit 32-Bit SW auf 64Bit OS)
• Welche Resultate werden erzielt ? (TBS hat 188,5GB)
• Data Pump (Option compression) –Abbruch mit Parallel=4• unkomprimiert: 75GB / komprimiert: 13,5GB / mit gzip: 12,5GB
• BRSPACE – Abbruch bei tbreorg• BR0301E SQL error -2133 at location BrOraThrEnable-1, SQL statement: 'ENABLE
THREADS‘ => brspace stand nicht zur Verfügung• Umgebungsparameter genau prüfen: z.B.
• „TBS Segment Komprimierung“ ohne Wirkung• vorher=nacher : 188,5GB
• Spezielle Objektkomprimierung schwach (Tabelle)• z.B. Tabelle RSMONMESS: 2,75GB zu 1,70GB (Faktor 0,62)
• Indexkomprimierung ohne Wirkung (Faktor 1,0)
BW – Komprimierung – konkret (mit 64-Bit SW auf 64Bit OS)
• Welche Resultate werden erzielt ? • BRSPACE ( – 3 Kommandos – „+X“ )• Ausgangsposition0 (exist. 10g Datenbank): 287,896GB• Ausgangsposition1 (reorg. Datenbank ohne PSA): 192,197GB• Ausgangsposition2 (InitExt Problem Index gefixt): 174,757GB• BRSPACE Funktion long_to_lob (10Min): 174,634GB• BRSPACE Funktion Tabellen Komprimieren (10h): 167,726GB• BRSPACE Indizes Tabellen Komprimieren: 167,344GB• BRSPACE InitExt v. Tabelle "/BI0/ASD_O0500" runter: 165,688GB• BRSPACE InitExt v. Index "RSMONMESS~TIM" runter: 163,702GB• ...• Schätzung <100,000GB
„Komprimierung“ und „Initial Size“
Seite: 35
Zusammenfassung und Bewertung
• Viele „selbstverschuldete Probleme“ wurden erkannt. (Initial Extents bei Indizes/Tabellen, Blockgrößen, IO-System mit schwachen mount Optionen, initora-Parameter justiert)
• Das Upgrade lässt im Prinzip kaum Fehler zu. Der DBUA arbeitet sehr zuverlässig. Probleme gab es bei der Plattform Auswahl (32Bit) und dem OEM Agent. X$DIAG Tabellen wurden blockiert. Da verblüffend viel funktionierte, ist dies ersteres erst spät aufgefallen.
• Prinzipielle Funktionen der Datenbank sind gegeben.• Sie arbeitet „gefühlt“ erheblich schneller. Für ausgiebige
Tests fehlte noch die Zeit.• BRTOOLS fallen positiv auf, wenn man sich intensiver mit
ihnen befasst. (Kommandozeilenorientiert – mit großer Erfolgsgarantie)
Interaktion mit SAP DBUA
--ActionConfigure Security UpdatesDo not select the checkbox.The runInstaller issues a warning.Choose OK and then Next.
--Select Installation OptionConfirm the default selections by choosing Next.
--Grid Installation OptionsConfirm the default selection Single Instance Installation and then choose Next.
--Select Product LanguageConfirm the default option English and then choose Next.
--Select Database EditionConfirm the default option Enterprise Edition and then choose Next.
--Specify Installation LocationThis screen displays the value for ORACLE_BASE which is set in the environment. It also displays the
value for ORACLE_HOME, which should be /oracle/DBSID/112_64.Select this option and then Next.
--Privileged OS GroupsThis screen displays the operating system groups for the DBA and the operator. Normally, these are dba
and oper.--Perform Prerequisite Checks
This screen checks if all the required system prerequisites for installation of the database software