Quite often someone asks me how an external SQL Server database can be accessed by an SAP system, e.g. to:
Depending on:
There are different connection types, technical requirements and restrictions. This blogpost clarifies the possibilities and restrictions and covers frequently asked questions:
The SAP standard ways to connect an external SQL Server instance with an SAP system are:
Multiconnect (DBCON)
UDConnect (Universal Data Connect)
Regardless of the way you choose you can only connect to remote databases which are reachable via network from your SAP Application Server.
DBCON / Multiconnect
DBCON / Multiconnect uses the Microsoft SQL Server Native Client Software (SNAC) to establish a connection to the remote SQL Server instance. The Microsoft SQL Server Client Software for Windows consists of several *.dll files. For long time it was available for Windows platforms only. Recently, Microsoft ported its ODBC SQL Native Access driver to Linux. For this reason heterogeneous Linux/Windows scenarios are now possible. DBCON utilizes the SAP ABAP stack to access the external databases so your system requires at least one ABAP-stack-based SAP Application Server running on Windows or Linux x86_64.
UDConnect
UDConnect uses a JDBC (Java Database Connectivity) driver to establish a connection to the remote SQL Server instance. The JDBC driver consists of one or more *.jar files and can be used on Windows, Unix and Linux operating systems. As UDConnect utilizes the J2EE engine of the SAP Application server to access the external databases you need to have at least one Java-Stack-based SAP Application Server in your SAP system in order to use UDConnect.
Connectivity Matrix
Windows | Linux x86_64 | Unix | |
Java Stack | UDConnect | UDConnect | UDConnect |
ABAP Stack | DBCon | DBCon | none |
Dual Stack | UDConnect DBCon | UDConnect | UDConnect |
Remarks:
UDConnect cannot be used for remote monitoring a SQL Server based system. However, you can use it to access data in an external SQL Server database.
Setting up UDConnect in order to access data in an external SQL Server Database with BW/BI requires four steps:
For step-by-step instructions please see the configuration guide available under:
SAP Netweaver '04: How to configure UD Connect on the J2EE Server for JDBC Access to External Databases
SAP Netweaver 7.1: see attached guide (UDConnect_for_710.pdf)
To access data in an external SQL Server Database with DBCON / Multiconnect three steps are required:
Installing the SAP DBSL for SQL Server (dbmssslib.dll / dbmssslib.so)
SAP note 1774329 explains the steps required to prepare your SAP instance to connect to a remote SQL Server instance.
SAP DBSL for Windows
DBCON utilizes the ABAP-stack to connect to an external database. The ABAP-stack itself requires the Database Shared Library (DBSL) to communicate with a database. For each Relational Database Management System (RDBMS) supported by the ABAP-stack there is a separate DBSL provided by SAP. To install the DBSL:
Determine which kernel your SAP system is using (32 bit /64 bit, Unicode / Non-Unicode, Kernel Release, Operating System)
kernel release: go to ransaction SM51 → place the cursor on the SAP instance → click "Release Info"
bitversion, Unicode / Non-Unicode, Operating System: go to "System" → "Status"
Download the archive containing the most recent SAP DBSL for SQL Server matching your kernel
go to SAP Software Download Center → Browse our Online Catalog → Additional Components → SAP Kernel → SAP KERNEL <bitversion> <Unicode / Non-Unicode> → SAP KERNEL <kernel_release> <bitversion> → <Operating System> → MS SQL Server → lib_dbsl_<patchlevel>-<number>.sar
Extract the downloaded archive using command
sapcar -xvf lib_dbsl_<patchlevel>-<number>.sar
Copy the unpacked dbmssslib.dll file into the kernel directory of all SAP application servers which you want to use to establish the connection.
SAP DBSL for Linux x86_64
Please see SAP note 1644499 if you need to download and install the SAP DBSL for Linux x85_64-based servers. The note describes how to request the DBSL and also explains in detail which steps are required to properly set it up.
DBCON entry
The DBCON entry informs the ABAP-stack where to find the external SQL Server Database and how to authenticate. Please see SAP note 178949 to learn how to create a DBCON entry for an external SQL Server Database.
Microsoft SQL Server Client for Windows
The SQL Server native client is used to establish the connection to the external SQL Server instance. To install it you need to run the sqlclni.msi installation package which is available from the SQL Server installation DVD / CD, or from the Microsoft Software Download website.
Microsoft ODBC Driver for Linux x86_64
SAP note 1644499 explains in detail where to download the Linux x86_64 - based ODBC driver and how to install it.
To monitor an SQL Server database with DBACockpit you first need to configure a DBCON connection to the external database. Please refer to section 3 for details.
If your local system is running on SQL Server as well you can skip installing the Microsoft SQL Server Native Client (SNAC) and SAP DBSL for SQL Server as both will already be in place. Then, proceed with the DBACockpit-related configuration steps. You can find detailed guides attached to SAP note 1027512 (sqldba_cockpit.pdf) and in SAP note 1316740.
UDConnect cannot be used for remote monitoring - the only way you can monitor a remote system is by using DBCon.
No shared library found for the database with ID <DBCON_entry_name> or Unable to find library <kernel_directory>/dbmssslib.sl'. ->
DLENOACCESS (0,Error 0) or ERROR => DlLoadLib()==DLENOACCESS - dlopen - ("/usr/sap/<SID>/DVEBMGS00/exe/dbmssslib.so") FAILED
or could not load library for database connection <DBCON_entry_name> or cannot open shared object
This error indicates that the ABAP stack could not find the SAP DBSL for SQL Server (dbmssslib.dll) in the kernel directory. If you encounter this error on a Unix - based server the root cause is clear: the DBSL does not exist for other platforms than Windows or Linux x84_64. In this case use a Windows-based or a Linux x86_64-based SAP Application Server to establish the connection. If your system does not contain a Windows-based or a Linux x86_64-based Application Server you need to setup a small one as workaround. If you encounter this error on a Windows Application Server or a Linux x86_64 based Application Server make sure that the DBSL is properly installed in the kernel directory as explained in point 3.
The DBSL could be found successfully in the kernel directory but there was a problem while loading it. This can have various reasons. To ensure that the file itself is not corrupt please download and install the file from scratch as explained in point 3. If the error remains afterwards please check the OS Log for further errors at the time of the error.
The Microsoft runtime DLL's which are required by the DBSL are missing on your server. Please install them as explained in SAP Note 684106.
DBACockpit uses stored procedures to collect monitoring information from a database. These stored procedures need to exist in the database that is being monitored. If you are using the connection for a purpose other than remote monitoring with DBACockpit you can ignore this error. If you want to remote monitor the SQL Server database please make sure that you've configured the connection exactly as described in the configuration guide referenced in point 4. Then you need to create the missing stored procedures in the remote database. To do so open transaction DBACockpit in the monitoring system, use the "System"-Dropdown field to select the remote SQL Server system which you want to monitor -> go to Configuration -> SQL Script Execution. If the monitoring schema is missing in the remote database you will be offered a button called "create/repair schema". After using it to create the schema you will be offered a button called "Execute script(s)". Click on it to create all required monitoring Stored Procedures in the remote database.
Follow the instructions in SAP Note 1009497.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 |