ALM216
-
Upload
kalyan-chakravarthi -
Category
Documents
-
view
47 -
download
2
description
Transcript of ALM216
1
ALM216
Migrating SAP from Oracle to DB2
Andrew Juarez, Coca Cola Bottling Company Consolidated
October 15, 2009
© CCBCC 2009. All rights reserved. / Page 2
Agenda
1. About CCBCC
2. Why DB2?
3. Migration
4. Benefits
5. Post migration
6. Lessons learned along the way
7. Oracle vs DB2
8. Useful training, resources and info
9. Overall satisfaction
10. Contact information
2
© CCBCC 2009. All rights reserved. / Page 3
About CCBCC
Industry: Consumer products
Revenue: US$1.4 billion
Employees: 6,000
Headquarters: Charlotte, NC
Web Site: www.cokeconsolidated.com
Coca-Cola Bottling Co. Consolidated,
the second-largest Coca-Cola bottler
in the United States, is a leader in the
manufacture and distribution of soft
drinks, primarily Coca-Cola products.
It has operations in 11 states and a
consumer base of 19 million people.
© CCBCC 2009. All rights reserved. / Page 4
About CCBCC
R/3 4.7 Enterprise (7) MI/MAM NW2004 (5)
Solution Manager NW7.0 (2) BW 3.5 (6)
PI 7.1 (2) – installed with DB2 CE 7.1 (1) – installed with DB2
DEVR/3, BW, MI
TestR/3, BW, MI
DEVR/3, BW, MI
TESTR/3, BW, MI
ProdR/3, BW, MI
SandBoxR/3, BW
SolMan
7.0PI 7.1
CE 7.1
SAP landscape @ migration
3
© CCBCC 2009. All rights reserved. / Page 5
About CCBCC
Hardware @ migration
CI/DB’s run on IBM P560’s
with AIX5.3
Application Servers run on
Dell 2950 with SUSE 10
Linux
BW runs exclusively on Dell
and SUSE
EMC storage – All SAP
systems - 5 terabytes
© CCBCC 2009. All rights reserved. / Page 6
Why DB2 ?
Technical Upgrades to R/3 & BW systems
required Oracle Upgrades. Also considered a
possible R/3 Unicode conversion as well.
Needed additional Oracle licenses for new SAP
systems.
Early 2008 we learned about the SAP/DB2
offering from KO
Included the cost for DB2 as part of the SAP
user license
This offering allowed us to avoid purchasing
new Oracle licenses
Allowed us to reduce our overall Oracle
licenses and maintenance costs
SAP 4.7
BW 3.5
ECC 6.0
BI 7.0
Oracle 9.2
????
4
© CCBCC 2009. All rights reserved. / Page 7
Why DB2 ?
Hurdles with moving to DB2
Basis Team were Oracle experts.
Team Buy-in was key.
Getting a large enough outage window
Had no idea if DB2 would be more work in
the long run
© CCBCC 2009. All rights reserved. / Page 8
Migration
Project started in February 2008
R/3 Landscape migrated by April (7)
BW Landscape migrated by Aug (6)
SolMan Landscape migrated by Aug (2)
MI Landscape migrated by December (5)
2/1/2008 12/31/2008
4/1/2008 7/1/2008 10/1/2008
3/16/2008 - 4/18/2008
R/3 migrations6/17/2008 - 8/22/2008
SolMan
10/6/2008 - 12/8/2008
MI
5/12/2008 - 8/8/2008
BW
3/11/2008
SAP DB2 training
6/9/2008
OS/DB certfied9/5/2008
DR test
11/10/2008
Advanced DB2 recovery
2/8/2008
Sandbox
Timeline for the project
5
© CCBCC 2009. All rights reserved. / Page 9
Migration
Migration partner
Talked to both SAP and IBM about our project
Selected IBM as our migration partner for R/3, BW and MI landscapes.
Only used IBM for R/3 landscape
Sent Lead Basis Technician to SAP migration class and had him certified
for migrations.
CCBCC Basis team performed all other migrations.
© CCBCC 2009. All rights reserved. / Page 10
Migration
Migration of most systems
Recreated host on either a Virtual or Physical machine
If needed, performed Unicode pre-work 2 days prior to migration
Scheduled 3 day outage per system
Export overnight
Import next day
Finish installing SAP system
If needed, performed Post unicode work
If needed, export / import Java stack
Set database parameters
Backup system
Run stats
Run SGEN
Re-install any application servers
6
© CCBCC 2009. All rights reserved. / Page 11
Migration
Production migration process
Week before, failed HA cluster to
backup node and ran as a single node
cluster
Prepped the main node for DB2.
Unicode pre-work started 3 days prior to
migration
Scheduled 18 hour outage
Ran Export and Import at the same time.
Finish installing SAP system
Post UNICODE work
Set database parameters
Backup system
Run stats
Run SGEN twice (AIX, Linux)
Re-install application servers
PROD
(primary node)VIO
PROD
(HA)... VIO
HA-Cluster
SAP/OracleBCV copy
SAP/DB2BCV copy
Upgraded system Original system
© CCBCC 2009. All rights reserved. / Page 12
Migration
Results of the migration
Actual migration was completed in 23 hrs
Had issues with DBTABLOG table
EDI40 cluster table took longer than expected
A few minor performance issues that were fixed with indexes.
Issues generating explain plans
No real unicode issues encountered
Issues with SAP license key
DB2 learning curve was easier than expected.
7
© CCBCC 2009. All rights reserved. / Page 13
Benefits
Tangible and in-tangible benefits
An ROI of 8 months
DB2 is better integrated into SAP
DB2 requires less attention from the Basis DBA than Oracle
Experienced some performance gains on batch jobs
DB2 fixes are available for use immediately
Saved over 2 terabytes in storage
- Due to reorg and DB2 deep compression
- R/3 Production went from 950 GB to 575 GB even with the
Unicode conversion
© CCBCC 2009. All rights reserved. / Page 14
Benefits
SAPPRD Database Growth
677
718 5
30
571
631
718
743
767
781
760
779
793
810
842
880
912
560
587
610
627
645
659
676
692
706
721
690
701
724
110
110
160
160
160
160
160
160
160
160
160
160
160
160
160
160
1 1 1 1 1 1 1 1 1 1
1 1 1
1
1
1
1
1
1 1 1 1 1 1 1 1
1
1
1
208
208
206
207
202
203
199
205
198
194
349
348
3425
5
182
524
483
423
336
311
287
273
294
275
261
244
212
174
142 5
71
544
523
505
492
477
464
442
435
424
300
290
273
0
200
400
600
800
1000
1200
1400
1600
01/07
02/07
AIX
Mig
ratio
n
03/07
04/07
05/07
06/07
07/07
08/07
09/07
10/07
11/07
12/07
01/08
02/08
03/08
04/08
DB2
/Unico
de
05/08
06/08
07/08
08/08
09/08
10/08
11/08
12/08
01/09
02/09
ECC 6
.0 U
pgra
de
03/09
04/09
# G
IG
Free Filesystem Space
Free DB Space
Oracle Other used
PSAPPRD Used
8
© CCBCC 2009. All rights reserved. / Page 15
Post Migration
Post migration activities
Successfully completed two offsite DR tests (R/3, MI)
Completed SOX auditing
Migrated all DB2 9.1 DB2 9.5
Applied DB2 fixpacks to all systems
Recovered database after an EMC hardware issue from tape
Recovered database after a Data Center issue from DB2 backup
Completed technical upgrade to ECC 6.0 and BI 7.0
© CCBCC 2009. All rights reserved. / Page 16
Post Migration
R/3 performance
Oracle
(11/25/07 –
1/13/08)
[ Non-Unicode ]
DB2
(8/17/08 –
12/28/08)
[ Unicode ]
9
© CCBCC 2009. All rights reserved. / Page 17
Post Migration
BW
performance
Oracle
(1/27/08 –
6/08/08)
[ Unicode ]
DB2
(8/10/08 –
12/21/08)
[ Unicode ]
© CCBCC 2009. All rights reserved. / Page 18
MI performance
Oracle
(3/9/08 – 7/20/08)
[ Unicode ]
DB2
(12/07/08 – 4/19/09)
[ Unicode ]
Post Migration
10
© CCBCC 2009. All rights reserved. / Page 19
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 20
Don’t confuse DB2 with DB2!
SAP Name Used for
DB2 Mainframe
DB4 iSeries
DB6 Linux, Unix,
Windows
Lessons Learned Along the Way
11
© CCBCC 2009. All rights reserved. / Page 21
Archive anything that is easy to get to.
Table # records Export Import
DBTABLOG 151,868,251 Start: 2008-04-13 02:38
Ended: 2008-04-13 08:59
Elapsed: 7:21
Start: 2008-04-14 00:11
Ended: 2008-04-14 12:30
Elapsed: 12:19
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 22
Use virtualization to your advantage!
Allows you to quickly bring up a server
Can start all of the prep-work ahead of time
Allows you to test the export/import
Can quickly shift resources as needed
Leaves original system in tact for back out and reference
Lessons Learned Along the Way
12
© CCBCC 2009. All rights reserved. / Page 23
Would have migrated to 9.5 during upgrade
Direct install to DB 9.5 was not supported for our version of SAP
Migration only takes about 30 minutes
DB2 9.5 improved the backup administration
Additional ―automatic‖ tuning parameters
Use the DB2 CLI driver client
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 24
Lessons Learned Along the Way
Don’t forget to fix the transport systems as you go.
13
© CCBCC 2009. All rights reserved. / Page 25
Importing split tables
Choose appropriate import method
If using DB2 Load on import, then single thread imports!!
Benchmark your split table exports / imports
Type Option Lock type
DB2 LOAD -loadprocedure fast load Table lock
Insert -loadprocedure fast Row locks
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 26
EDI40 example (Total records – 7,631,961)
Lessons Learned Along the Way
14
© CCBCC 2009. All rights reserved. / Page 27
Plan for Backup window
Switching DB2 into logmode puts database in backup-pending status
You CANNOT connect to database in this status
Perform backup of database to clear status or use DB2DART cmmd
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 28
Database hints
Check custom ABAP code for Oracle hints
Hints will not work
Fix or remove and test with DB2
Lessons Learned Along the Way
15
© CCBCC 2009. All rights reserved. / Page 29
Check SAP data dictionary for custom indexes
Fix and transport changes prior to migration
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 30
Custom Tablespaces
Create custom tablespaces prior to export
If done after export then requires manually changing generated import files
Lessons Learned Along the Way
16
© CCBCC 2009. All rights reserved. / Page 31
Plan for the running of R3szchk
Produces dbsize.xml file needed for import
Extremely long runtime
Benchmark the runtime
Can change the run option to significantly speed up
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 32
Verify database shutdown
Found cases where database did not shutdown for cold backup
Added extra ―dbstop force‖ to backup scripts
Lessons Learned Along the Way
17
© CCBCC 2009. All rights reserved. / Page 33
Migrating Java stacks
Uses JLOAD to export / import
Required manual changes to fix paths pointing to Oracle software
Errors take considerable time to track down and fix
Recommend running complete export/import tests to shake out the issues.
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 34
Passwords
DB2 does not have user
accounts
Check password age settings
Must keep password
consistent on all CI/DB/App
servers for <sid>adm,
sap<sid> users.
System will lock up if the
password does not match
what is stored in dscdb6.conf
Central
Instance /
Database
server
Application
Server
Application
Server
dscdb6.conf
<sid>adm
sap<sid>
Lessons Learned Along the Way
18
© CCBCC 2009. All rights reserved. / Page 35
DB2 Backup parameters
Issue getting one of the parameters to work correctly
Backup administration easier with DB2 9.5
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 36
DB2 backup compression
Recommend using compression with backups
Averaging about 66% compression
Compression actually reduces run time
Type Size Time
uncompressed 715gb 7 hrs
compressed 241gb 5 hrs
Lessons Learned Along the Way
19
© CCBCC 2009. All rights reserved. / Page 37
1) Connect to DB
2) Issue write suspend
3) Split mirror
4) Issue write resume
Database
Mirror
copy
Using split mirrors backups
Must issue write suspend / resume
Lessons Learned Along the Way
© CCBCC 2009. All rights reserved. / Page 38
VS
Oracle vs DB2
20
© CCBCC 2009. All rights reserved. / Page 39
Terminology
Oracle DB2
Instance Instance
Database Database
initSID.ora OR
SPFILE
DBM CFG and DB CFG
Table spaces Table spaces
Data Blocks Pages
Data Files Containers
Redo Log Files Transaction Log Files
SGA Database Manager and
Database Shared memory
Data Dictionary Catalog
SYSTEM table
space
SYSCATSPACE table
space
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 40
Putting database into logmode
Database Procedure
Oracle Startup mount
Alter database archive log
Alter database open
DB2 db2start
Update db cfg for <sid> using logarchmeth1 disk:<dest>
Caution: DB2 goes into “backup-pending state” and will
not open until state is cleared.
db2 backup database <SID> to /dev/null
or db2dart <SID> /CHST /WHAT DBBP OFF
db2 activate db <SID>
Oracle vs DB2
21
© CCBCC 2009. All rights reserved. / Page 41
Growing out the database
Avoid rebalancing
Database Procedure
Oracle Add disk space at OS level to existing sapdata’s
Alter tablespace <tbsp> resize …
or
Create new sapdata’s at OS level
Alter tablespace <tbsp> add datafile <location> size …
DB2 Add disk space UNIFORMLY to all sapdata’s at OS level
or
Create new sapdata’s at OS level
Create new strip-set across the new sapdata’s to avoid
rebalance
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 42
Native backup / restore utilities
Database backups restore Status
Oracle Rman> backup database Rman> restore database
Rman> recover database
Database
views
DB2 Db2 backup database <sid>
to …
Db2 recover database <sid>
….
Db2 list utils
Oracle vs DB2
22
© CCBCC 2009. All rights reserved. / Page 43
Connecting to the databases
Database Differences
Oracle Configure lisenter.ora, sqlnet.ora, tnsnames.ora
Lsnrctl start
Install oracle client software on all app servers
DB2 Add port to /etc/services file
Db2 catalog database cmmds
Install DB2 CLI and share to all app servers
or
Install DB2 runtime client on each app server
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 44
User administration
Database Differences
Oracle User id’s are stored in the database
Use Oracle cmmds to maintain users
SAP uses ops$<user> to connect
DB2 Users maintained at OS level
SAP uses sap<sid> to connect
Oracle vs DB2
23
© CCBCC 2009. All rights reserved. / Page 45
Differences in starting and stopping the databases
Database Start Stop
Oracle Sqlplus /nolog
Connect / as sysdba
Startup
Sqlplus /nolog
Connect / as sysdba
Shutdown
DB2 Db2start
Db2 Connect to <dbid>
or
Db2 activate db <dbsid>
Db2shut
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 46
SAP Database administration and tools
Database Tools
Oracle Brtools
SQLplus
EM console
Toad for Oracle
DB2 /nDBACOCKPIT
DB2
Db2cc
Toad for db2
Oracle vs DB2
24
© CCBCC 2009. All rights reserved. / Page 47
Can centrally administer DB2 from one SAP system
Add entry to /etc/services
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 48
Restoring database from offline or split mirror backup
Database Offline Split Mirror
Oracle Restore files
Start database
Restore files
Start database
DB2 Restore files
Start database
Db2 activate db <sid>
Restore files
Start database
Db2inidb cmmd
Db2 activate db <sid>
Oracle vs DB2
25
© CCBCC 2009. All rights reserved. / Page 49
Lock escalations Too many row locks on a table can cause an escalation which results
in the table being locked.
Oracle vs DB2
© CCBCC 2009. All rights reserved. / Page 50
CCBCC write ups
SAP write up of DB2 migration
IBM write up of DB2 migration
Resources
DB2 Version 9.5 for Linux, Unix, and Windows
SAP SDN for DB6
Note 1086130 - DB6: DB2 V9.5 Standard Parameter Settings
Training
TADM56 – SAP Web AS DB operations (DB2 LUW)
IBM sponsored DB2 for Oracle DBA’s workshop
IBM DB2 9 for LUW Advanced Database Recovery
Useful Training, Resources and Info
26
© CCBCC 2009. All rights reserved. / Page 51
Overall Satisfaction
© CCBCC 2009. All rights reserved. / Page 52
To learn more about ASUG, visit the ASUG booth in the Community Clubhouse,
or visit our Web site at www.asug.com.
ASUG and SAP: Partners in Education
ASUG, Americas’ SAP Users’ Group, is the world’s largest, customer-run community
of SAP professionals and partners, with more than 50,000 individual members and
1,750 companies represented. ASUG delivers the highest value to member
companies, allowing them to maximize their SAP investments.
Some highlighted benefits include:
Access to a year-round community for SAP customers and partners
Diverse mix of educational topics and events through a variety of formats
Exclusive opportunity to influence SAP future product direction
Unparalleled networking opportunities with a dynamic professional network
Unprecedented partnership with SAP
Access to ASUG Special Interest Groups and Chapters
27
Contact
Andrew Juarez, Coca Cola Bottling Company Consolidated
Email: [email protected]
Contact information
Thank You!
28
ContactFeedback
Please complete your session evaluation.
Be courteous — deposit your trash,
and do not take the handouts for the following session.
© CCBCC 2009. All rights reserved. / Page 56
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warrant.
Copyright 2009 SAP AG
All Rights Reserved