SAP DB2 Migration Preparation

Transcription

SAP DB2 Migration Preparation
Skill Ramp Up Session:
SAP DB2 Migration Preparation
IBM SAP DB2 Center of Excellence
Agenda – Day 1
ƒ
DB2 Overview
ƒ Product Overview
ƒ Architectural Overview / DB2 Objects
23 May, 2008
2
Agenda – Day 2
ƒ
ƒ
ƒ
ƒ
DB2 Administration
ƒ Backup / Recovery
ƒ RUNSTATS / REORG
ƒ Monitoring / Tuning
ƒ Problem determination
DB2 / SAP integration
ƒ DBA Cockpit
ƒ SAP DB2 Tools
Layout planning for SAP / DB2 databases
ƒ Table space concepts
ƒ Design recommendations
SAP migration overview
ƒ Terminology and concept
ƒ Available tools
23 May, 2008
3
Agenda – Day 3
ƒ
ƒ
Migration optimizations for DB2
ƒ Using DB2 load for SAP migrations
ƒ Data transfer using sockets
ƒ SAP incremental migration
ƒ SAP migration monitor
ƒ IDS to DB2 optimizations
ƒ DB2 optimizations for migrations
SAP BW migrations specifics
ƒ DB2 partition layout
ƒ Migration of partitioned tables
ƒ Post migration tasks
23 May, 2008
4
What are we speaking about?
SAP
System
SAP
System
SID
SID
Export
DB
Informix
MS SQL Server
ORACLE
....
TAB A
Migration
DB2
TAB A
TAB B
23 May, 2008
Import
TAB B
5
Workshop Migration Landscape
NetWeaver 04 (SRC)
NetWeaver 04 (TAR)
DB2 V8 FP12
on LINUX
DB2 9.1 FP0
on LINUX
kitkat
alete
Network
23 May, 2008
6
SAP Migration Overview – Terminology and Concepts
SAP Term being used
Change of
Change of
Operating System Database System
(DB)
(OS)
Homogeneous System Copy
No
No
SAP OS Migration
Yes
No
No
Yes
Yes
Yes
(heterogeneous system copy)
SAP DB Migration
(heterogeneous system copy)
SAP OS/DB Migration
(heterogeneous system copy)
23 May, 2008
7
SAP Marketplace - Informations
ƒ Quicklink: osdbmigration
ƒ FAQ-Section answers the most important questions about OS/DB
Migration
ƒ What is it all about?
ƒ Service Contract and Software Delivery
ƒ Service Session Delivery
ƒ Planning and performing the Migration
23 May, 2008
8
SAP OS/DB Migration Check
Request Migration via
OSS
SAP sends migration
materials to customer
Customer chooses
migration partner
Migration Test Run
Test the migrated
System
Analysis-Session
Contractual
arrangments with SAP
4-6 weeks
Going
Livebefore
check
Customer draws up
migration project
shedule together with
Migration Partner
Final Migration
on source system
Verification-Session
2-4 weeks
after
Going
Live check
on target system
SAP checks and
approves project plans
> 6 weeks
Going Live check
SAP ships migration
tools
23 May, 2008
Next
SAP - Upgrade
9
SAP Migration Questionaire
ƒ
ƒ
Prerequisite for the Remote Project Audit
SAP-Questionaire.pdf
23 May, 2008
10
Reasons for Copying a SAP System
ƒ Requirement
ƒ To copy a SAP System WITHOUT changing the OS or DB
ƒ To copy a SAP System WHILE changing OS and/or DB
ƒ Potential Solutions
ƒ Client transport?
(#96866 – Client copy tools not supported as system copy tools for productive
systems)
ƒ Backup/Restore?
(homogeneous or OS-Migration in some cases)
ƒ 3rd party tools for data unload/load?
Not supported by SAP
ƒ SAP system copy tools!
Should be used (since 3.0D)
23 May, 2008
11
Migration: The Backup / Restore process
ƒ With DB2 UDB Version 8, you can
use redirected restore to create a
Heterogeneous System Copy
between two systems running on
different platforms
Note 628156 - DB6: Cross-Platform System Copy
using Backup/Restore with V8
ƒ Document:
“Copying Your SAP/R3 System
Across Platforms Using DB2
Universal Database V8
Redirected Restore”
http://www-106.ibm.com/developerworks
/db2/library/techarticle/0308nesiem/0308nesiem.html
23 May, 2008
12
SAP Migration (Heterogeneous System Copy)
ƒ Must be done by a SAP Technology Consultant with a special
Certification for OS/DB-Migration (TADM70)
ƒ SAP OS/DB Migration Service must be ordered for every productive
system involved
ƒ Common reasons
ƒ Hardware enhancements
ƒ Performance improvements
ƒ Availability of new technologies
ƒ Administrative efficiency
ƒ Cost reduction
ƒ Standardization through group-wide platform strategy
ƒ UNICODE-Conversion
23 May, 2008
13
SAP Migration – typical challenges
ƒ Export
ƒ Long runtimes
ƒ Insufficient storage space in the export filesystem
ƒ Not enough temporary database space for sorting (PSAPTEMP)
ƒ Inconsistencies between ABAP dictionary and DB dictionary
(QCM-tables → SAP Note 9385)
ƒ Import
ƒ Long runtimes
ƒ Database space problems (tablespace, log space)
ƒ Not enough temporary database space for sorting (PSAPTEMP)
ƒ Permission problems on import files and directories
23 May, 2008
14
Migrating a System Landscape
ƒ Two different strategies
ƒ DEV, QAS, PRD are all migrated (PRD as much test migrations
as needed)
> 3 migrations
DEV
1x
QAS
PRD
1x
>1x
ƒ DEV and PRD are migrated, QAS is build up by homogeneous
system copy
> 2 migrations
DEV
1x
23 May, 2008
QAS
0x
PRD
system
copy
>1x
15
Basic Definitions and Relationships
DB
Definitions
Tables
Files
TABART
DDART
TA
TABART
SAPTA.STR
TSD
DD09L
TABART↔Tab.
TAB
(TA)
TSI
IND_P
IND_S
23 May, 2008
Package
TS<DBS>
DB Storage Units
SAPTA.EXT
SAPTA.TSK
TA<DBS>
IA<DBS>
TABART →TSD
TABART → TSI
TG<DBS>
IG<DBS>
Table Stor. Param.
Index Stor. Param.
16
Types of TABARTs
Type
TABART
Usage
Data
APPL0
APPL1
APPL2
USER, USER1
CLUST
POOL
SAUS
SDIC
SDOCU
SLDEF
SLEXC
SLOAD
SPROT
SSDEF
SSEXC
SSRC
DDIM
DODS
DFACT
Master data, transparent tables
Transaction data, transparent tables (big tables)
Organization and customizing
Customer data class
Cluster tables
Pool Tables
Exchange tables for Upgrades
ABAP Dictionary tables
Documentation
Repository switch (SAP Upgrade)
Repository switch (SAP Upgrade)
Screen and report loads
Spool and logs
Repository switch (SAP Upgrade)
Repository switch (SAP Upgrade)
Source of screens and reports
Dimension tables
ODS, PSA tables
Fact tables
Special
System
BW / BI
23 May, 2008
17
Excercise
ƒ
How many tables belong to which TABART?
select
tabart,
count(tabart) as "Tabs in TABART"
from sapsrc.dd09l
group by tabart
23 May, 2008
18
Excercise (continued)
ƒ
How many tables belong to which TABART?
select
tabart,
count(tabart) as "Tabs in TABART"
from sapsrc.dd09l
group by tabart
23 May, 2008
19
Excercise (continued)
ƒ
Same as before, but additionally
with tableclass
select d9.tabart,
d2.tabclass,
count(d2.tabclass)
from
sapsrc.dd09l d9,
sapsrc.dd02l d2
where d9.tabname=d2.tabname
group by d9.tabart,
d2.tabclass
23 May, 2008
20
Migration with R3load – Process Overview (< 6.x)
23 May, 2008
21
Migration with R3load – Process Overview (≥6.x or BW)
23 May, 2008
22
Migration Preparations (1)
ƒ Retrieve lastest SAP Notes
ƒ Homogeneous/Heterogeneous system copy
ƒ Installation
ƒ Operating System Level
ƒ Set up the migration file systems / directories
ƒ Install migration tools
ƒ De-schedule all OS/DB data backups
ƒ Shut down external interfaces
ƒ Make sure that the database is not being accessed during the
export
23 May, 2008
23
Migration Preparations (2)
ƒ Database Level
ƒ Run update statistics or other performance-relevant activities
ƒ SAP System Level
ƒ Delete unnecessary data (Spool, test clients)
ƒ De-schedule all SAP jobs and data backups
ƒ Release all repairs and corrections if changing SAP SID
ƒ DB02: Missing tables/indexes – compare?
ƒ Check for DB-specific modifications
ƒ Report SMIGR_CREATE_DDL (create <TABART>.SQL files)
ƒ Stop the SAP System
23 May, 2008
24
Create R3load CTL files
R3szchk
Tables
DDLOADD
ad
e
R rite
W
(check SAP Note 558746 if runtime is >> 2 hours)
some minutes
Read
DDLOADH
R3ldctl
up to several hours
W
r it
e
Files
DDL<DBS>.TPL
SAP<TABART>.STR
SAP<TABART>.EXT
DB
23 May, 2008
25
Excercise
ƒ
Run R3ldctl and put the files to /mig_exp/test, the logfile should be named
test.log
R3ldctl -l test.log -p /mig_exp/test
23 May, 2008
26
Excercise (continued)
ƒ
Run R3ldctl and put the files to /mig_exp/test, the logfile should be
named test.log
R3ldctl -l test.log -p /mig_exp/test
23 May, 2008
27
Create template for DB-Size
ƒ R3SZCHK generates DBSIZE.XML for SAPINST on target
ƒ R3SETUP generates DBSIZE.TPL for R3SETUP on target
ƒ step runs some minutes
23 May, 2008
28
Create R3load *.cmd and *.TSK Files
ƒ runs a few minutes
<PACKAGE>.cmd
DDL<DBS>.TPL
[tsk: .../<installation>/<PACKAGE>.TSK]
icf:
.../DATA/<PACKAGE>.STR
dcf:
.../DB/DDL<DBS>.TPL
dat:
.../DATA bs=1K fs=1000M
dir:
.../DATA/<PACKAGE>.TOC
<PACKAGE>.STR
<PACKAGE>.cmd
<PACKAGE>.TSK
23 May, 2008
≥ 6.10 only
29
Unload DB with R3load
ƒ This step can take from some to many hours!!
R3load
read
DDL<DBS>.TPL
<PACKAGE>.STR
read
write
<PACKAGE>.TOC
<PACKAGE>.nnn
<PACKAGE>.log
DB
read / write
23 May, 2008
STOP
Do not use
NFS (write)!
<PACKAGE>.TSK
30
File Transfer (1)
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
FTP
Tape
DVD
USB disk devices
Laptop with high capacity disk drive
NetApp device
Be sure to use a safe copy method!!!
23 May, 2008
31
File Transfer (2)
Directory
Filename(s)
<export_dir>
LABEL.ASC
<export_dir>/DB
DDL<target_DBS>.TPL
<export_dir>/DB/<target_DBS>
<PACKAGE>.EXT
DBSIZE.{TPL|XML}
<TABART>.SQL
<export_dir>/DATA
(if exists)
<PACKAGE>.STR
<PACKAGE>.TOC
<PACKAGE>.nnn
Do not transfer files from the <installation>-directory !! (*.cmd, *.TSK)
23 May, 2008
32
Create SAP Instance
ƒ Install Central Instance
ƒ Same procedure as in a standard SAP installation
ƒ Install latest backwards-compatible SAP kernel
ƒ Install the database software
ƒ Same procedure as in a standard SAP installation
ƒ Install the latest database patches
Check SAP product „platform / release“ combinations!
23 May, 2008
33
Get Migration Key
Logon to SAP Marketplace.
Use an S-User valid for the installation number of the
source system
Alias „migrationkey“
Accept migration key license agreement
Customer task
Select installation number of the SOURCE system
Provide migration parameters
Case sensitive!
Check migration key as soon as possible!
Note 338372 - Migration key does not work
Gives hints how to choose the right values for the fields
when acquiring a migration key.
23 May, 2008
34
Create DB
ƒ Determine the DB configuration
ƒ Size the table spaces
ƒ Distribute the table spaces (disk layout)
ƒ Configure the database logs (size, number, primary, secondary)
ƒ Adjust DBSIZE.{TPL|XML}
ƒ Create DB
ƒ May be very time-consuming when large databases are involved
(big table spaces)
ƒ Can take place in parallel to the unload of the source DB
23 May, 2008
35
Import Data with R3load
ƒ This step can take from some to many hours!!
R3load
read
DDL<DBS>.TPL
<PACKAGE>.STR
<PACKAGE>.EXT
write
<PACKAGE>.TOC
<PACKAGE>.nnn
<TABART>.SQL
DB
23 May, 2008
write
<PACKAGE>.log
read / write
<PACKAGE>.TSK
36
Migration Post Processing (1)
ƒ Operating System Level
ƒ ABAP / DB DDIC consistency check
ƒ SAP license
ƒ Copy external SAP system files (job logs, archives, external
spool files, interface data, etc.)
ƒ Access to transport directory
ƒ External interfaces
ƒ Perform file system backup
23 May, 2008
37
Migration Post Processing (2)
ƒ DB Level
ƒ DB backup
ƒ DB restore test
ƒ Update statistics or other performance-relevant activities
ƒ DB parameters
ƒ Delete old SAP system monitor and statistics data
23 May, 2008
38
Migration Post Processing (3)
ƒ SAP System Level
ƒ Transaction SICK
ƒ Initialize TMS if SAPSID has changed
ƒ Configure TMS
ƒ Regenerate ABAP Loads
ƒ Schedule Batch-Jobs (check if jobs are defined with target
server, change if necessary!)
ƒ Schedule data backups
ƒ Adjust printer definitions
ƒ Adjust RFC destinations, profiles and operation modes
ƒ Check that the install RFC reports have finished successfully
23 May, 2008
39
Migration Post Processing (4)
ƒ RS_BW_POST_MIGRATION
ƒ Variants: SAP&POSTMGR, SAP&POSTMGRDB (DB was
changed)
ƒ Connect all data source systems to the target system
ƒ Make sure that the data source systems will keep active while
the report is running
ƒ Run the report in background mode (may take several hours)
ƒ Check spool protocol carefully
23 May, 2008
40
Post Migration Test Activities
Functional tests (compare results to those in source system)
Typical transactions from day-to-day business
Critical transactions (runtime tests)
Performance tests under heavy load
Test month closing activities / reports
Verify communications to external systems (be sure not to mix test
and productive data)
ƒ Create a cut-over plan for the final migration
ƒ Include the end users into the test procedure (key users, normal
users)
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
23 May, 2008
41
Migration Scenarios
ƒ SAP Standard Migration Tool
ƒ Use R3setup / SAPinst dialogs and run R3load for export and
import without special options
ƒ IBM DB2 Fast Migration
ƒ Use unsorted export (Note 954268 - Optimization of export:
Unsorted unload)
ƒ Use R3load „fast LOAD“ option for DB2 to use DB2 Load API
instead of inserts
ƒ Use socket option if possible
ƒ Incremental Migration
ƒ Use if no other procedure is possible during downtime
Note 454173 - DB6: R3load migration accelerated with CLI LOAD API
Note 864861 - ORACLE DIRECT PATH LOAD SUPPORT IN R3LOAD 6.40 AND ABOVE
23 May, 2008
42
SAP Standard Migration Tool
ƒ
Source
Target
ƒ
DB
DB
ƒ
Ž
Import
ƒ
n
Export
o
Transfer
ƒ
ƒ
SAP migration tool needs
to be ordered
New license key required
for target system
Data unloaded into
database independent
format
Data transferred from one
system to another via flat file
(e.g. FTP)
Capacity: ~ 400 GB per
weekend
Source system needs to be
available until SAP approval
Capacity: ~ 400 GB/weekend
However: 800 GB achieved in 60 hrs (~13,5 GB/h)
incl. admin. tasks
23 May, 2008
43
IBM DB2 Fast Migration
ƒ
Source
DB
Target
noŽ
Unload
Transfer
Load
DB
DB2 LOAD
ƒ
ƒ
ƒ
Sockets
Capacity: 800 GB in 22 hrs (~ 36,5 GB/h)
Max. capacity depending on available
hardware
23 May, 2008
ƒ
Unload, Transfer & Load
done in parallel
ƒ Multiple processes,
multiple sockets
Use of DB2 Load vs. DB2
Insert
Use of sockets instead of files
Eligible SAP systems
ƒ Capable of using SAP
4.6c kernel
ƒ Detailed analysis
needed
SAP authorization needed
ƒ Currently only SAPinternal IBM migration
team authorized
44
Incremental Migration
Source
Target
ƒ
ƒ
Online
Initial Load
Apply Changes
Offline
Transfer Rest
ƒ
Migration happens in 3 phase
The 30 largest tables are
migrated while the productive
system is running
ƒ Create shadow tables
with additional columns
for timestamp and row
action for largest tables
to track changes
Remaining tables are
migrated on a weekend
during downtime
ƒ Approx. 20%
Capacity: no specified limit on total DB
size; process limited by size of largest
tables and change rates
23 May, 2008
45
Criteria for choosing the right method
SocketFastloader
DW < 48h
DB < 2TB
Fastloader
DW < 48
DB < 1TB
Incremental Migration
DW < 24h
DB > 2TB
Standard Process
DW > 60h
DB < 500GB
23 May, 2008
DW:
DB:
Downtime Window
Database Size
46
Directory Structure
/
TSK - cmd - log
<installation>
<sap-instance>/j2ee/sltools
<export>
/APPS
/DB
ADS
KM
PORTAL
*.SAR
(application data
stored in filesystem)
DDL<DBS>.{TPL|XML}
...
/DB6
...
SQL - EXT
/DATA
STR - TOC - nnn
/JDMP
XML – EXPDUMP.nnn
/SDM
23 May, 2008
EXPORT.STA
SDMKIT.JAR
47
Tools - Files - Directories
Tool
File
Directory
1
SMIGR_CREATE_DDL
<TABART>.SQL
(since 6.20)
<export>/DB/<DBS>
2
R3ldctl
DDL<DBS>.TPL
<Package>.STR
<export>/DB
<export>/DATA
3
R3ldctl / R3szchk
<Package>.EXT
[DBSIZE.{TPL | XML}]
<export>/DB/<DBS>
4
R3load
<Package>.TSK
(since 6.10)
<installation>
5
R3setup / SAPinst / MigMon
<Package>.cmd
<installation>
R3load
<Package>.TOC
<Package>.nnn
<Package>.log
<export>/DATA
<export>/DATA
<installation>
6
23 May, 2008
48
Questions ?
!
?
?
!
!
?
23 May, 2008
?
? !
?
!
?
?
49

Documents pareils