Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
-
Upload
karthiekchowdary -
Category
Documents
-
view
214 -
download
0
Transcript of Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 1/22
Microsoft SQL Server 2008 R2
Technologies for SAP Solutions
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 2/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 2 of 22
Applies to NetWeaver 7.00 (SR3) and 7.10 based products
Summary This white paper provides an overview of the key features of Microsoft SQL Server 2008 R2 and the key
features of SQL Server 2008 that are relevant to SAP NetWeaver 7.00 (SR3) and 7.10 based products.
Author Jürgen Thomas, Principal Program Manager
Company Microsoft Corporation
Author Bio Jürgen Thomas, Microsoft, Principal Program Manager
Technical Reviewer Cameron Gardiner, Microsoft, Senior Program Manager
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 3/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 3 of 22
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by
SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and
anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code
sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered
by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of
publication. Because Microsoft must respond to changing market conditions, the information presented herein should not be interpreted to be
a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.
This white paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE
INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this
document may be reproduced, stored in, or introduced into a retrieval system, or transmitted in any form or by any means (electronic,
mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this
document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events
depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person,
place, or event is intended or should be inferred.© 2011 Microsoft Corporation. All rights reserved.
Microsoft, the Microsoft logo, Azure, BizTalk, Excel, SharePoint, SQL Server, and Windows are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
All other trademarks are property of their respective owners.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 4/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 4 of 22
Table of ContentsExecutive Summary ................................................................................................................................................................................................ 5
Who Should Read this White Paper ........................................................................................................................................................... 5
Topics Covered in this White Paper ........................................................................................................................................................... 5
SQL Server 2008 R2 Release ............................................................................................................................................................................... 6
New Features in SQL Server 2008 R2......................................................................................................................................................... 6
UCS-2 Compression for Unicode Data Type ..................................................................................................................................... 6
Support for Machines with 256 Logical Processors ........................................................................................................................ 7
Support for Up to 15,000 Table Partitions .......................................................................................................................................... 7
SQL Server 2008 Release ..................................................................................................................................................................................... 8
Key Features in SQL Server 2008 ................................................................................................................................................................. 8
Features Actively Leveraged by SAP NetWeaver ............................................................................................................................. 9
Transparent Features of SQL Server 2008 .............................................................................................................................................. 14
Backup Compression ................................................................................................................................................................................. 14
Audit ................................................................................................................................................................................................................ 15
Transparent Data Encryption ................................................................................................................................................................. 16
Encrypt Connections using Secure Sockets Layer ......................................................................................................................... 16
Lock Escalation Granularity ..................................................................................................................................................................... 17
Minimal Logging Enhancements .......................................................................................................................................................... 17
Query Plan Freezing .................................................................................................................................................................................. 18
SQL Server Database Mirroring Enhancements – Compression .............................................................................................. 19
SQL Server Database Mirroring Enhancements – AutoRepair .................................................................................................. 19
Changed Autogrowth Behavior ............................................................................................................................................................ 20
Appendix .................................................................................................................................................................................................................. 21
SAP and SQL Resources ................................................................................................................................................................................ 21
SAP Notes ........................................................................................................................................................................................................... 21
Microsoft Blogs................................................................................................................................................................................................. 22
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 5/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 5 of 22
Executive Summary
Microsoft and SAP have been working together closely for more than 15 years to ensure that the Microsoft
platform and SAP solutions work well together. SAP certification of Microsoft Windows Server® 2008 and Microsoft
SQL Server®
2008 R2 is the technical stamp of approval of the joint work between Microsoft and SAP. Worldwide,
the number of developers proficient in these technologies and the number of organizations adopting SQL Server
for SAP continue to grow.
Who Should Read this White Paper This white paper is intended for IT professionals and technical decision makers looking for a database solution to
run their SAP application.
Topics Covered in this White Paper This white paper discusses some of the feature enhancements to SQL Server 2008 and SQL Server 2008 R2 that
solidify the position of SQL Server as an enterprise-ready platform for SAP. Key highlights of the Microsoft and
SAP partnership include:
SQL Server and SAP offer a reduced total cost of ownership (TCO) for database platforms through lower
pricing, reduced administration overhead, built-in high availability, and scalability.
Microsoft Windows® and SQL Server run on powerful new Intel and AMD processors that (as of an April,
2011 benchmark) recorded at 73,970 SAPS and 13,550 benchmark users on a standard HP ProLiant BL680c
G7, 4 processor commodity server for the SAP ERP Sales and Distribution (SD) benchmark.i
SAP and Microsoft fully support SQL 2008 and SQL 2008 R2 in virtual environments. For more information
on Windows Virtualization, see SAP note 1409608. SAP and Microsoft now support up to 15,000 table partitions for SQL Server 2008 SP2 and SQL Server 2008
R2 SP1.
This white paper is organized in two sections. The first section discusses enhancements to SQL Server 2008 R2 and
the second section discusses enhancements to SQL Server 2008.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 6/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 6 of 22
SQL Server 2008 R2 Release Microsoft released SQL Server 2008 R2 for SAP NetWeaver 7.0-based systems in September, 2010. This release
offers two major feature enhancements to make SAP run efficiently on SQL Server. This section provides a detailed
explanation of the new features in SQL Server 2008 R2 and what it means for a SAP installation.
Note: SAP treats the SQL Server 2008 R2 release more as a service pack than as a separate release. As a result there
will not be an explicit entry for SQL Server 2008 R2 in the SAP Product Availability Matrix (For more details, see SAP
note 1076022). Instead, the SQL Server 2008 entries automatically include both SQL Server 2008 and SQL Server
2008 R2 support.
New Features in SQL Server 2008 R2
SQL Server 2008 R2 includes the following three major features:
UCS-2 compression for Unicode data type
Support for machines with 256 logical processors (an increase from 64 to 256)
Support for up to 15,000 table partitions with SQL Server 2008 R2 SP1 and SQL Server 2008 SP2
UCS-2 Compression for Unicode Data Type
A new feature in SQL Server 2008 R2 is UCS-2 compression for Unicode data type. SQL Server uses UCS-2 (instead
of UTF-8) to encode Unicode characters. Unicode compression is an improved algorithm to store Unicode
characters when using row/page compression and not a new compression type. SQL Server 2008 R2 stores row or
page compressed UCS-2 characters more efficiently than SQL Server 2008. This feature is called UCS-2 compression
or simply Unicode compression.
UCS-2 compression significantly reduces the disk space needed to store the Unicode characters. The amount of
disk space that gets reduced by UCS-2 compression varies by installation type. Figure 1 illustrates compression
ratios achieved on a 5 terabyte customer database for a SAP ERP Unicode system. Index fragmentation did not
have any impact since the database was completely reorganized before the compression.
Figure 1. Compression Ratios
Compression Type Percentage of
Original
No compression 100 percent
Row compression on data (clustered index) using SQL Server 2008 83.35 percent
Page compression on data (clustered index) using SQL Server 2008 46.36 percent
Row compression on data (clustered index) using SQL Server 2008 R2 64.28 percent
Row compression on data and index (clustered and non-clustered index) using
SQL Server 2008 R2
54.75 percent
Page compression on data and index (clustered and non-clustered index) using
SQL Server 2008 R2
24.88 percent
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 7/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 7 of 22
Note: For a detailed discussion on database compression for SAP, see the “Using SQL Server Database
Compression with SAP NetWeaver” white paper athttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50c5de8f-282a-2e10-cb8a-
a5859a0994a4?QuickLink=index&overridelayout=true.
Support for Machines with 256 Logical Processors
SQL Server 2008 R2 increased the number of physical and logical processors it supports. SQL Server 2008 R2
Enterprise edition x64 now supports up to 8 physical processors and 256 logical processors. SQL Server 2008 R2
Datacenter x64 supports more than 8 physical processors (as an option).
Note: For more information about processor support, see
http://blogs.msdn.com/b/saponsqlserver/archive/2011/04/18/how-many-logical-processors-does-sql-server-2008-r2-enterprise-edition-support.aspx.
Support for Up to 15,000 Table Partitions
Customers running the SAP Business Warehouse (SAP BW) who have encountered the 1,000 partition limit with
previous versions of SQL Server can take advantage of the new 15,000 partition limit with SQL Server 2008 SP2 and
SQL Server 2008 R2 SP1.
After installing the service back, you need to enable the feature by issuing the following Transact-SQL command
against your specific database:
exec sp_db_increased_partitions '<database-name>', 'ON'
Running this command increases the schema version for the database. This has implications when upgrading from
SQL Server 2008 SP2 to SQL Server 2008 R2 SP1. To complete the upgrade process, follow these steps:
Detach the database
Upgrade the instance to SQL Server 2008 R2
Apply Service Pack 1 for SQL Server 2008 R2
Attach the database
Note: SAP has published the correction instructions for SAP BW in SAP note 1494789, “Enabling 1000+ partitions
support on SQL Server”. For more information, see
http://blogs.msdn.com/b/saponsqlserver/archive/2011/03/18/increased-partition-support-of-sql-server-in-sap-
bw.aspx.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 8/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 8 of 22
SQL Server 2008 ReleaseMicrosoft released SQL Server 2008 for SAP NetWeaver 7.0-based systems in January, 2009. This section introduces
major new features in SQL Server 2008 that will benefit SAP customers. These features are divided into the
following:
Features that require adaptations to be completed with SAP coding
Features that are transparent to SAP application stacks
To take advantage of these features, you need to run SAP applications based on NetWeaver 7.0 and meet the
requirements specific to the basis support packages. For more information, see SAP note 1152240.
Key Features in SQL Server 2008
SQL Server 2008 provides the following features that are actively used by SAP coding:
New Open Database Connectivity (ODBC) client interface
Data compression
Star join optimization for business intelligence (BI) only
The following features are helpful when running a SAP system:
Backup compression
Auditing
Transparent data encryption
Encrypt connections using Secure Sockets Layer (SSL)
Lock escalation granularity
Logging enhancements Resource Governor
Query Plan freezing
Database mirroring enhancements
Changed Autogrowth algorithms
The features are transparent to SAP applications and need no further changes in SAP coding.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 9/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 9 of 22
Features Actively Leveraged by SAP NetWeaver
ODBC Client Interface
With SQL Server 2008, SAP re-implemented the database interface and switched from OLE DB to ODBC. The main
reasons for this switch are:
ODBC is the industry standard for database interfacing and the most widely-used and optimized
technology.
The former OLE DB interface has a ten-year history starting with SQL Server 7.0. Since more features are
offered by newer database releases and functionality moves from the interface into the database server, a
significant amount of code becomes obsolete but still has to be maintained for compatibility reasons.
The new streamlined ODBC client improves the database performance from a client perspective by 3 to 5
percent.
ODBC opens SQL Server access for non-Windows SAP application servers. SAP has postponed official
support of using ODBC for non-Windows SAP application servers.
Data Compression
Data compression in SQL Server 2008 includes:
Storing numeric data more efficiently, such as int, bigint, float, and decimal data types
Shrinking the size of tables that have primarily numeric data while optimizing the storage of default values
Providing improved query performance in input/output (I/O) bottleneck scenarios
Reducing hardware requirements and operation costs for storage and backup infrastructure
Enabling compression at the table level
With SQL Server 2008 there are two types of data compression available:
Row Compression –
A newly defined row format to optimize storing numeric values. ROW compression, asdelivered in SQL Server 2008, is an extension of what was delivered for the specific decimal case in SQL
Server 2005 SP2.
Page Dictionary Compression – Works on a per page level to store common prefixes and values only once
on the page.
Figure 2 shows row compression with SQL Server 2008, which extends the variable length storage format of a
decimal data type to other data types such int, bigint, and float. Other optimizations also reduce the space
needed to store values like 0 or 0.0. Instead of consuming two bytes as in vardecimal, such a value will only
consume four bits in SQL Server 2008.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 10/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 10 of 22
Figure 2. Row Compression with SQL Server 2008
The row compression feature provides a new storage format for a table that saves space without using a
compression algorithm. A new row format has been introduced to help save more space, but it is not related to
compression algorithms trying to compress a row on a page.
Figure 3 shows page dictionary compression in SQL Server 2008, where a prefix list is stored in the page for
common prefixes. Individual values are replaced by a token for the prefix, and a suffix for the value.
Figure 3. Page Dictionary Compression with Individual Values in SQL Server 2008
DateID CarrierTracking OfferID PriceDisc
20070601 4911-403C-98 10 0.00
20070601 4911-403C-99 10 0.00
20070602 6431 10 0.00
20070602 6431-4D57-83 10 0.00
20070602 6431-4D57-84 10 0.00
20070602 6431-4D57-85 10 100.00
20070603 4E0A-4F89-AE 10 0.00
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 11/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 11 of 22
Page dictionary compression has two optimizations, which apply to the data/index page of SQL Server. The first
optimization helps find prefixes which are common in different rows. For example, the DateID column, which
represents the way SAP stores dates in a varchar column, has a common prefix of 2007060 for all the values in thecolumn DateID. SQL Server page compression stores this prefix value separately on the page and places a 1 –2 byte
token as a placeholder pointing to the shared prefix.
Figure 4 shows page dictionary compression in SQL Server 2008, where a common value dictionary is stored in the
page. Common values are replaced by tokens.
Figure 4. Page Dictionary Compression with Common Values in SQL Server 2008
In the second optimization the common values are replaced by a token, but only if space can be saved.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 12/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 12 of 22
Data Compression in SQL Server 2008 and 2008 R2 Compression Recommendations
All customers are advised to implement SQL Server page compression on tables and secondary indexes on
development, QAS, and production systems. Modern Intel and AMD-based servers are powerful enough to
process the compression algorithms without any observed latency, and the reduction in I/O and improved cache
hit ratios results in a performance benefit for end users. It is therefore recommended to enable page compression
for all tables and secondary indexes on all SAP ABAP-based systems. New SAP installations have already been
defaulted to use page compression for all tables and secondary indexes.
SAP has changed the default compression type from row to page compression with the following results with SQL
Server 2008 R2:
Up to 80 percent reduction in database size on ECC Unicode Systems
Approximately 70 percent reduction in database size on ECC Non-Unicode Systems
Generally 80 percent reduction in database size on SAP components such as BW, CRM, and SCM
Approximately 70 to 80 percent reduction in database size for customers moving from Oracle to SQLServer
Virtually all customer deployments have shown significant improvement in performance ranging from 5 to
35 percent
Negligible amount of measurable higher CPU consumption and in some cases a reduction in CPU
consumption
For more information on page compression, see the “Running Sap Applications on SQL Server” blog at
http://blogs.msdn.com/b/saponsqlserver/archive/2010/10/08/compressing-an-sap-database-using-report-
msscompress.aspx and the “Data Compression: Strategy, Capacity Planning and Best Practices” white paper at
http://msdn.microsoft.com/en-us/library/dd894051.aspx.
Star Join Query Processing
SQL Server 2008 introduced a new way to build query plans around star or snowflake schemas. SQL Server joins
dimensions with the fact table or the intermediate result set of the former join result, one dimension at a time.
However, SQL Server rarely analyzes several dimension tables first, overlaying the matching rows and then
accessing the fact table to perform a first join.
This is demonstrated in the next sequence. A typical plan as observed today looks like joining the dimensions. This
helps reduce the optimal number rows as with the fact table, and then takes the intermediate result set and joins
that with the next dimension.
Figure 5. Star Join Query Processing
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 13/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 13 of 22
SAP 7.0, SQL Server 2000, and SQL Server 2005 build one dynamic bitmap filter, which is usually used for the first
join.
Figure 6. Star Join Query Processing with One Dynamic Bitmap Filter
SQL Server 2008 allows you to build multiple dynamic bitmap filters.
Figure 7. Star Join Query Processing with Multiple Dynamic Bitmap Filters
These dynamic bitmap filters can be moved and overlaid before accessing the fact table. This means a combined
filter of multiple dimension tables is applied in one step.
Figure 8. Star Join Query Processing with Moving Dynamic Bitmap Filters
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 14/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 14 of 22
Star join query processing can only be utilized with a maximum degree of parallelism greater than 1 (that is, star
join requires at least a maximum degree of parallelism of 2). The standard recommended global maximum degree
of parallelism must always be set to 1 for SAP systems. Microsoft and SAP have implemented a new parallelization
setting that can be switched on for specific BW queries on cubes. These changes are implemented in SAP support
packs or SAP note 1126568. For more information, see
http://blogs.msdn.com/b/saponsqlserver/archive/2010/12/03/sap-bw-7-and-sql-server-2008-star-join-
optimization.aspx.
Transparent Features of SQL Server 2008
Backup Compression
Customer demand for backup compression is very high. So far, there have been only third-party solutions for SQL
Server backup compression. Motivation for most of the customers asking for such a feature is the fact that backups
should be kept on disk and/or that such backups should be transferred to centralized backup infrastructures. With
SQL Server 2008, the capability of compressing any type of SQL Server backup comes out of the box.
SQL Server 2008 offers the following advantages:
Has WITH COMPRESSION clause to BACKUP backup database E61 to DISK = N'D:\E61full_compress.bak'
with COMPRESSION
Less storage required to keep backups online
Backups run significantly faster, with less I/O
Restore automatically detects compression and adjusts accordingly
Integrated into Resource Governor to throttle CPU consumption Can be used by SQL Server log shipping functionality
Tests so far reveal parity with LiteSpeed® for SQL Server (from Quest Software)
Usable by all third-party backup vendors through a VDI or VSS interface
Unlike LiteSpeed for SQL Server, SQL Server 2008 backup compression does not have any compression grades to
configure. It is one grade only, which is possible with SQL Server. A comparison between different grades of
LiteSpeed for SQL Server and SQL Server 2008 backup compression with a 5.5 terabyte SAP Unicode ERP shows the
following:
SQL Server 2008 backup compression provides a better compression rate with slightly more CPU
consumption than LiteSpeed for SQL Server (which is configured for compression grade 1)
LiteSpeed for SQL Server provides a slightly better compression rate with compression grade 11 and
significantly more CPU resource consumption than SQL Server 2008 Backup Compression
The transaction log compression rate is between 2.0 and 2.5.
The compression rate on SAP ERP is between 4.0 and 5.0.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 15/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 15 of 22
Audit
Auditing, a new feature in SQL Server 2008, addresses the auditing of user activity, including compliance and
auditing concerns for unapproved SAP users who are accessing the database directly. It helps to monitor the
activities of system operators and SAP database administrators (DBAs). To achieve this, the new audit functionality
was created with a first-class server object. This means the auditing is not done using SQL Server Profiler, but by
defining audit sessions and audit rules through simple T-SQL statements. No additional tools are necessary. This
functionality is completely integrated into the SQL Server relational engine.
Figure 9. Capabilities of Different Tools Moved into one SQL Server Engine Functionality to Audit Activities
To make auditing of non-SAP motivated database accesses successful in a SAP landscape, you should adhere to
the following guidelines:
Never keep the log on the database server
Do not give SAPServiceSID and SIDAdm access to the share on the server where the log resides
Do not give any DBAs access to the share on where the log resides
Delete the BUILTIN\Administrator Login in SQL Server
SQL Server should run in the context of an account, which is not allowed to login interactively
While it is not always possible to prevent a system administrator from disabling the audit session or changing its
definition, you can build an audit session that tracks:
Who logged into SQL Server and got mapped into the system administrator role
What changes were done to the audit session with that logged in session
Although the very same person does not have access to the audit log, it should not be possible for that person to
manipulate the results of the audit log showing manipulations.
Figure 10. Simple Audit Session and its Specifications Defined
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 16/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 16 of 22
Transparent Data Encryption
SQL Server introduced the encryption of columns within a database with SQL Server 2005. However, this encryptionfeature was not transparent to applications. In the case of some applications, significant changes were required to
leverage this feature. It also had the disadvantage of not being able to leverage index searches on such columns. In
SQL Server 2008, a new functionality has been introduced called Transparent Data Encryption. With this the scope
of encryption is now extended to the whole database. The encryption itself will be transparent to an application
since accessing or not accessing an encrypted database is now at the SQL Server instance. That means that once a
SQL Server instance opens an encrypted database, every application or user can access the data in this database.
This also means that encryption is not a mechanism to control user access or to prevent some users from accessing
the content. This is an important difference from the column-level encryption introduced with SQL Server 2005
which allows such access controls. The encryption/decryption of transparent data encryption is done in the I/O
path. This means that the data is in a non-encrypted state in the SQL Server buffer pool and can fully be leveraged
for indexing and index searches.Transparent data encryption includes the following capabilities:
Four different encryption algorithms, including AES_128, AES_196, AES_256, and TRIPLE_DES
Encryption of all new pages written to disk and triggering of background threads to encrypt the rest of the
database
Improved throughput and reduced overhead with AES algorithms
Not recommended to use TRIPLE_DES since it is the weakest encryption algorithm and is not as efficient in
resource consumption as the AES algorithms
Overall impact hardly measurable
Backing up an encrypted database will automatically provide an encrypted backup
Negligible backup compression achievable on an encrypted database using SQL Server backup
compression or LiteSpeed for SQL Server Transparent data encryption and SSL can be used in conjunction (For more information, see SAP note
1570930)
Transparent data encryption, backup compression, SSL, database compression and other technologies can
be used in conjunction (For example, SQL Server fully supports a Transparent Data Encryption database
that is fully PAGE compressed to use backup compression and SSL.)
SAP specific white paper will be released before SQL Server 2008 RTM (For more details, see OSS note
1380493.)
Encrypt Connections using Secure Sockets Layer
Customers in the defense, security, public safety, government, and financial industries sometimes require additionalprotection from “man-in-the-middle” and other related security threats. SQL Server, like other commercially
available databases, supports encrypting the communication channel between SQL Server and the client
application using the Secure Sockets Layer (SSL). The encryption mechanism is handled between the SQL Native
Access Client (SNAC) and SQL Server and is therefore transparent to the application layer.
For more information on how to setup SSL network encryption between SQL Server and SAP, see
http://blogs.msdn.com/b/saponsqlserver/archive/2011/03/09/sql-server-network-encryption-with-sap.aspx and
OSS note 1570930.
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 17/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 17 of 22
Lock Escalation Granularity
The locking strategy of SQL Server is called dynamic locking. SQL Server in its relational engine tries to be smart interms of using a specific lock granularity. SQL Server is built to avoid allowing lock structures to take over a
significant amount space in the buffer pool. Therefore, SQL Server versions released so far have a few events where
the lock granularity could be escalated to a higher granularity. The events show the following:
40 percent buffer pool used by lock structures. This usually means a few million locks in the SAP space.
More than 5,000 row locks held by a DML statement on one table. In this case, there is an attempt to
escalate to table lock granularity. If there is another transaction with other locks on the table, one will
continue by acquiring row-level locks. This type of escalation attempt can be suppressed by trace flag 1211
or 1224.
Storage Engine starts a statement with page-level locks, and it cannot be disabled with sp_indexoption.
Storage Engine decides to start a statement with table-level locks, and it cannot be disabled.
An issue with lock escalation granularity is the lack of a central switch to indicate that row level locks for a specific
table should always be used, with a command such as: ALTER TABLE VBDATA set (LOCK_ESCALATION = DISABLE).
Minimal Logging Enhancements
SQL Server 2008 introduced several changes around the way logging is done. The most significant changes have
affected Unicode or platform migrations of SAP applications. Too much transaction log space is consumed with
Unicode migrations involving databases with a large volume of terabytes. The series of events leading to this
higher consumption of transaction log space includes:
Loading tables in a SAP installation or Unicode/platform migration that includes:
Creating empty table
Creating a clustered index
Loading data in batches of 10,000 rows
Creating non-clustered indexes
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 18/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 18 of 22
These events lead to the following:
Only the first batch is minimally logged
All subsequent batches get fully logged, which means that millions of rows are entered into the transaction
log as well
A large volume is required in the SQL Server Transaction Log and it takes up too much space, especially in
Unicode/platform migrations
SQL Server 2008 expands the minimal logging behavior to all batches loaded. This has cut down the required space
for the SQL Server transaction log by a factor of up to 50 in some observed instances.
Query Plan Freezing
In SQL Server 2005, Microsoft introduced a feature called plan guides. This feature should have helped to get
around one of the paradigms current databases have. A database management system needs to cache access plans(query plans) since generating these in real time cannot be done with 5,000 or 10,000 statements being executed
per second. In contrast, side skewed data or extremely uneven data distribution in some columns of tables does
not guarantee that an access plan created for one set of values submitted to a query fits perfectly for a different set
of values. The idea was to generate an access plan from the outside without having to change the application by
introducing query hints. However, plan guides have not been used frequently in the SAP space since customers
found difficulty using the feature.
SQL Server 2008 improves on plan guides and provides a way to create plan guides or better freeze existing query
plans based on plan_handles, which can find a DMV called sys.dm_exec_query_stats. For more information and
queries, see http://blogs.msdn.com/saponsqlserver/archive/2007/06/05/sap-dbacockpit-and-some-related-sql-
scripts-part-1.aspx.
The typical use case in the SAP space for this feature is:
Not to allow plan changes for critical plans
Troubleshooting queries (cardinality tuner)
Plan fixing for queries accessing tables/columns with extremely skewed data
Query Plan Freezing works as follows:
1. Checks sys.dm_exec_query_stats to find the plan to be frozen
2. Finds queries to freeze at http://blogs.msdn.com/saponsqlserver/archive/2007/06/05/sap-dbacockpit-and-
some-related-sql-scripts-part-1.aspx
3. Takes a plan_handle and checks whether the query has the plan to be frozen
4. Takes sql_handle and statement offset and executes sp_create_plan_guide_from_cache @name =
N„myfirst_plan_guide', @plan_handle = <sql_handle>, @statement_start_offset = <statement offset>
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 19/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 19 of 22
SQL Server Database Mirroring Enhancements – Compression
SQL Server database mirroring is being used more frequently in the SAP space, especially by larger companies. In
SQL Server 2008, Microsoft made small but meaningful changes to database mirroring. The first enhancement
includes compressing transferred data after it has been encrypted, which significantly reduces the network
bandwidth requirement.
Figure 11. SQL Server 2008 Database Mirroring Enhancements Using Compressed Log Records
SQL Server Database Mirroring Enhancements – AutoRepair
AutoRepair is another new feature added to SQL Server 2008. This functionality catches cases where SQL Server
detects a consistency issue on one or multiple pages. In the case of synchronous mirroring, database mirroring lets
one database check another database to see if the page in question is healthy. If this is true, database mirroring is
exchanging the inconsistent page of one system with the healthy page from the other system. AutoRepair works byallowing the principal to detect an inconsistent page in its database to get the healthy page from the mirror, or vice
versa. This means that the database mirroring configuration needs to be synchronous. AutoRepair does not work
with asynchronous database mirroring.
Figure 12. AutoRepair with Synchronous Mirroring
For more information on database mirroring, see OSS note 965908, ”SQL Server Database Mirroring and SAP
Applications.”
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 20/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 20 of 22
Changed Autogrowth Behavior
Autogrowth behavior does not work well with the way SAP applications are ported to SQL Server. Figure 13demonstrates the problem with SAP applications ported to SQL Server:
Figure 13. Using Trace Flag 1117 to Adjust Autogrowth Behavior
All the data files have the same size and the files are
getting filled in even portions.
The problem occurs when all the files are running full. In
this case, the current algorithms will grow by one file at
a time. This kind of autogrowth behavior destroys the
even fill that is ideal for different data files.
SQL Server 2008 introduces startup trace flag 1117. This
trace flag changes the autogrowth behavior to one
where all data files are grown in the same size
(assuming the autogrowth rate is set the same for each
of the files), instead of growing one data file only.
For more information on trace flag 1117, see OSS note 1238993, “Proportional File Auto-Growth with SQL Server
2008.”
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 21/22
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2011 SAP AG Page 21 of 22
Appendix
SAP and SQL Resources
http://www.sdn.sap.com/irj/sdn/mss
http://www.microsoft.com/isv/sap/technology/platform/sql.aspx
http://blogs.msdn.com/saponsqlserver/
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50c5de8f-282a-2e10-cb8a-
a5859a0994a4?QuickLink=index&overridelayout=true
SAP NotesThis section includes SAP notes on a wide variety of topics relevant to SQL Server technologies for SAP solutions.
1006887 - Online index creation with SQL Server 2005, 2008 and 2008 R2
1067103 - Transaction context lost
1076022 - Release planning for Microsoft SQL Server 2008 (R2)
1126568 - Enable star join optimization with SQL Server 2008
1134345 - Using locked pages for SQL Server
1141630 - Preparations for SQL 2008 BW customers
1144459 - SQL4SAP and SAP Installation Media for SQL Server 2008
1152240 - Setting Up Microsoft SQL Server 2008
1158936 - DBACOCKPIT Backup compression option in SQL 2008
1174635 - TempDB sizing in SAP BW systems on Microsoft SQL Server
1177356 - MS SQL Server End of Support for SAP Releases
1237682 - Configuration Parameters for SQL Server 2008
1238993 - Proportional File Auto-Growth with SQL Server 2008
1241751 - SQL Server minimal logging extensions
1252970 - Triggers on SAP tables
1280476 - SQL 2008 Cluster The current SKU is invalid
133381 - Database-Hints in Open SQL for MS SQL Server
1380493 - SQL Server Transparent Data Encryption (TDE)
142731 - DBCC checks of SQL server
1443424 - Migration path to Win2008MSSQL2008 for 4.6C and 6.206.40
1459005 - Enabling index compression for SQL Server 1476928 - System copy of SAP systems on Windows 2008 (R2) SQL Server
1488135 - Database compression for SQL Server
1494789 - Enabling 1000+ partitions support on SQL Server
1497623 - SQL Server Database Files Should Not be Sparse
1505884 - R3load compression for table index
1570930 – SQL Server network encryption with SAP
151603 - Copying an SQL Server database
7/28/2019 Microsoft SQL Server 2008 R2 Technologies for SAP Solutions Whitepaper
http://slidepdf.com/reader/full/microsoft-sql-server-2008-r2-technologies-for-sap-solutions-whitepaper 22/22
| d | b
159316 - Reorganizing tables on SQL Server SQL 20002005
208632 - TCPIP network protocol for MSSQL
28667 - Microsoft SQL Server Specific Profile Parameters 32129 - Deadlock analysis for the SQL server
327494 - Configuration Parameters for SQL Server 2000
363018 - File management for SQL Server
392892 - DBIF_RSQL_SQL_ERROR (SQL error 0 or 11)
398136 - Support Policy for Microsoft SQL Server
493290 - Configuring SQL server Log shipping
521750 - FAQ SQL Server 2000 IO performance
551915 - R3 won't start after database restore or database copy
592514 - MSSQL internal database users, permissions and security
600027 - Installing the Corrected MS SQL Server Collation
62988 - Service packs for Microsoft SQL Server
652634 - FOR ALL ENTRIES performance with Microsoft SQL Server
683447 - SAP Tools for MS SQL Server
799058 - Setting Up Microsoft SQL Server 2005
849062 - Optimizer statistics for InfoCubes in BW
869407 - Partitioning on MS SQL Server 2005
879941 - Configuration Parameters for SQL Server 2005
905634 - Release planning for Microsoft SQL Server 2005
947702 - DB13 - DBCC Checkdb job fails in SQL 2005 SP1
960769 - Windows Migration from 32-bit to 64-bit (x86_64)
965145 - Installation of 46C SAP Systems on MS SQL Server 2005
965908 - SQL Server Database Mirroring and SAP Applications
985137 - Service Pack Installation for SQL Server 2005 98678 SQL Server Connection Issues
987961 - FAQ SQL Server 2005 IO performance
989595 - FAQ Cache Hit Ratio in SQL Server
991014 - Vardecimal Compression for SQL Server 2005
Microsoft Blogs
http://blogs.msdn.com/saponsqlserver/
http://blogs.msdn.com/saptech/
http://blogs.technet.com/virtualization/
http://blogs.msdn.com/b/saponsqlserver/archive/2011/03/18/increased-partition-support-of-sql-server-in-
sap-bw.aspx
i The SAP SD Standard Application Benchmark Results for Two-Tier Internet Configuration: SAP enhancement package 4 for SAP ERP 6.0; SQL
Server 2008 and Windows Server 2008 R2 Enterprise Edition; 4 processors, 40 cores, 80 threads, Intel Xeon Processor E7-4870, 2.4 Ghz, 64 KB L1
cache and 256 KB L2 cache per core, 30 MB L3 cache per processor.
For more details, see certification number 2011016 at http://www.sap.com/solutions/benchmark/sd2tier.epx.