Recommendations For Migrations Using Microsoft SQL Server

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

2020-10-15 1054852

1054852 - Recommendations for migrations using


Microsoft SQL Server
Version 20 Type SAP Note
Language English Master Language English
Priority Recommendations / Additional Info Category Performance
Release Status Released for Customer Released On 23.09.2020
Component BC-DB-MSS ( SQL Server in SAP NetWeaver Products )

Please find the original document at https://launchpad.support.sap.com/#/notes/ 1054852

Symptom

You want to perform a platform migration or a Unicode conversion on Microsoft


SQL Server using the R3load-based tools.

Other Terms

Heterogeneous migration, R3load, R3loadmss, sorting, logging, clustered,


nonclustered, Unicode, Unicode migration, Unicode conversion, performance,
unsorted

Reason and Prerequisites

We strongly recommend that you only make the changes to the standard migration
process that are mentioned in this note in collaboration with experienced
certified OS/DB migration consultants.
Experience shows that incorrect or incomplete changes can have serious
consequences. (Missing primary keys, for example, mostly result in data
inconsistencies.)

Solution

The topics that are explained are as follows:

1. Import of Unsorted exports


2. Primary key handling in relation to clustering and time of creation
3. Improving secondary index creation performance
4. Deactivation of logging on SQL Server
5. Information regarding sorting and Unicode conversion
6. Information regarding BW migration and sorting
7. Information regarding BW migration and partitioning
8. Information about SQL Server compression
9. Information about splitting when exporting or importing
10. General Guidance
11. Further information

1. Unsorted exports
As of SQL Server 2008 R2, the import of unsorted exports to SQL Server is
released without restriction.
2. Clustering and creation point of the primary key
The standard OS/DB migration tools create a clustered index for the primary
key, before the data are loaded into the table. This ensures that the data
are stored in a "sorted" format in the SQL Server tables. All tables in SAP
systems like ECC 6.0 are created in this way. Tables in BW systems may have

© 2020 SAP SE or an SAP affiliate company. All rights reserved 1 of 5


2020-10-15 1054852

no clustered index for the primary key.


Powerful modern hardware with high-performance disk systems do not benefit
much from the clustered index being generated only after the data is loaded.
While this is technically possible, we recommend that you make use of
Microsoft support resources or consult the hardware supplier to ensure that
there is no bottleneck in the infrastructure.
3. Improving performance when creating secondary indexes
SAP standard OS/DB migration tools create all secondary indexes in a R3load
package. This applies both for split tables (DTP package generates secondary
indexes) and also for non-split tables. Therefore, the indexes are created
one after the other: secondary index 1 is built, then secondary index 2 etc.
If a large table contains too many indexes, the import time will be much
shorter than the creation of all the indexes.
Only one index can be built at a time on a given table. But the degree of
parallelism can improve the performance.
It is thus worthwhile increasing the MAXDOP value globally. The default
value is 1. Check first the currently set value for MAXDOP by executing the
following TSQL command:
sp_configure 'max degree of parallelism
If the value is 1, you can increase the MAXDOP value for the entire server
with the following TSQL commands, for example to 4:
sp_configure 'max degree of parallelism', 4;
reconfigure with override
We recommend you to set the MAXDOP value to 4. In general, this value should
achieve a good improvement in runtime. If you want to improve the runtime
further, you can experiment with a higher MAXDOP value.
For a more detailed discussion on this topic refer to the Oracle to SQL
OS/DB Migration FAQ located here.
4. Deactivating the SQL Server logging
It is not possible to deactivate the SQL Server transaction logging
completely. However, you can minimize the logging during migrations (see SAP
Note 1241751 - SQL Server minimal logging extensions).
5. Information regarding sorting and Unicode conversion
For Unicode conversion, certain database tables must be exported in sorted
order. RFBLG and other cluster tables are examples of such tables. R3Load
will automatically export tables that require sorted export in the correct
mode even if the default export setting is set to "unsorted"
6. Information regarding BW migration and sorting
BW migrations should always be exported in unsorted order. The reason for
this is that the large fact tables either do not have any primary key at all
(for example, the F Fact tables on MS SQL Server or the E Fact tables on
ORACLE) or their primary key is not clustered (for example, the E Fact
tables on MS SQL Server). Due to a missing primary key, you must manually
sort the database later with many resources (CPU, I/O, tempdb). If the index
is not clustered by the primary keys (which is always the case with ORACLE),
the entire table must be read along the index. This involves an enormously
high I/O effort in comparison with an unsorted export.
7. Information regarding BW migration and partitioning
Table partitioning information for BW systems is created by the ABAP report
SMIGR_CREATE_DDL. We recommend that you import BW systems to SQL Server 2012
or higher to take advantage of a higher limit on the maximum number of
partitions per table. Refer to SAP Note 1593998 - SMIGR_CREATE_DDL for MSSQL
- and SAP Note 1494789 - Enabling 1000+ partitions support on SQL Server.
Maximum Partitions per Table:
SQL 2005, 2008, 2008 R2 = 1,000
SQL 2012, 2008 SP2+, 2008 R2 SP1+ = 15,000
SQL 2014 or higher = 15,000
8. Information about SQL Server compression
SAP uses PAGE compression by default for all SAP ABAP systems (ECC, BW, CRM,
and so on) for 100% of the tables and indexes without exception. SAP OS/DB

© 2020 SAP SE or an SAP affiliate company. All rights reserved 2 of 5


2020-10-15 1054852

migration tools are configured by default so that tools use PAGE compression
for all tables and indexes. All customers should use PAGE compression, if
the database release is SQL 2008 or higher. Ensure that you have imported
SAP Note 1581700 with SNOTE or that it is contained in the Support Packages.
9. Information about splitting when exporting or importing
If the export runs on SQL Server with split tables, the R3load and R3ta
versions listed in SAP Note 1650246 must be used. This change was provided
for kernel release 7.0 and higher.
NOTE: The general method of splitting used in the 6.40 version of r3ta or
before does not work for SQL Server and will result in export times that are
much worse than an export which does not split any tables.
General guidelines can be given about how many table splits should be
generated in source systems (Oracle, DB2, MaxDB, and so on). Performance on
export and import varies considerably, depending on hardware resources, SAN
memory I/O functions and factors in relation to the table (data
distribution, data types, size, and so on).
Customers have successfully exported systems with table splits ranging from
2 to over 80.
WARNING: E-Fact and F-Fact tables in BW must not be split when the export
runs on SQL Server because they have no primary key constraint. For those
tables R3ta will revert to the older split method used prior to the change
of note 1650246. The splitting process itself will take a very long time,
and the export will take too long as well. Much longer than if these tables
were not split at all. DSO and PSA tables do have primary keys and can be
split efficiently just like normal tables.
The parallel import of split tables is fully supported under SQL Server 2008
R2 and higher. Older SAP documentation may specify restrictions, but these
restrictions are obsolete.
If you observe deadlocks when importing using SQL 2005 or 2008 (not R2),
reduce BCP_BATCH_SIZE.
10. General recommendations
The following is strongly recommended:
a) Use the latest R3Load.exe, dbmsslib.dll and r3ldctl.exe.
b) Use the latest SAP Software Provisioning Manager (SWPM).
c) Use the kernel DVD with the latest patch level.
d) Use the latest available SQL Server release.
e) Use the latest SQL Server Service Pack.
f) Import all SAP Notes required for SQL Server into the source system (even
if it executes UNIX/Oracle or DB2. By doing this, you ensure that no
problems will occur in the target system. SQL Server specific code in OSS
Notes will not be executed in the source system
g) Read SAP Note 888210 or 1738258 and check SAP systems with very old
Support Packages carefully, since SAP Notes that support compression or
other SQL Server function, may have to be imported with SNOTE.
11. Further information
Read the FAQ about OS/DB migration in the Microsoft blog located here.

Other Components

Component Description

BW-SYS-DB-MSS BW on Microsoft SQL Server

© 2020 SAP SE or an SAP affiliate company. All rights reserved 3 of 5


2020-10-15 1054852

This document refers to

SAP Note/KBA Title

991014 (Vardecimal) Compression for SQL Server 2005 SP 2

888210 NW 7.**: System copy (supplementary note)

879941 Configuration Parameters for SQL Server 2005

857081 Unicode conversion: downtime estimate

777024 BW3.0 and BW3.1 System copy (supplementary note)

771209 NetWeaver 04: System copy (supplementary note)

765475 Unicode Conversion: Troubleshooting

738858 R3load for Unicode conversion

548016 Conversion to Unicode

327494 Configuration Parameters for SQL Server 2000

2030518 MSS: Migration using unsorted unload/load

1650246 R3ta: new split method for MSSQL

1319517 Unicode Collection Note

1241751 SQL Server minimal logging extensions

This document is referenced by

SAP Note/KBA Title

879941 Configuration Parameters for SQL Server 2005

888210 NW 7.**: System copy (supplementary note)

765475 Unicode Conversion: Troubleshooting

1319517 Unicode Collection Note

2030518 MSS: Migration using unsorted unload/load

548016 Conversion to Unicode

857081 Unicode conversion: downtime estimate

© 2020 SAP SE or an SAP affiliate company. All rights reserved 4 of 5


2020-10-15 1054852
991014 (Vardecimal) Compression for SQL Server 2005 SP 2

771209 NetWeaver 04: System copy (supplementary note)

327494 Configuration Parameters for SQL Server 2000

777024 BW3.0 and BW3.1 System copy (supplementary note)

738858 R3load for Unicode conversion

1241751 SQL Server minimal logging extensions

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2020 SAP SE or an SAP affiliate company. All rights reserved 5 of 5

You might also like