1601608 - How to Access an External Microsoft SQL Server Database

4
SAP Knowledge Base Article Symptom You want to: l  Access data in an external SQL Server database with your SAP system l  Report against data in an external SQL Server database with Business Intelligence / Business Warehouse l Use DBACockpit to monitor an external SQL Server instance 1.  Options and technical requirements to access an external SQL Server database 2.  How to setup a connection with UDConnect 3.  How to setup a connection with DBCon / Multiconnect 4. How to monitor an external SQL Server Database using DBACockpit 5. Troubleshooting Environment SAP System based on an ABAP Stack, a Java Stack or a Dual Stack Resolution 1. Options and technical requirements to access an external SQL Server Database The SAP standard ways to connect an external SQL Server instance with an SAP system are: l Multiconnect (DBCON) l 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 Remarks:  l If your system comprises solely of ABAP stack-based servers running on Unix platforms you can neither use UDConnect nor DBCON. Why? Because UDConnect requires at least one Java-stack based SAP Application Server (regardless of the operating system) and DBCON requires at least one Windows- or Linux x86_64-based SAP Application Server. l Using DBCon on a Linux x86_64 based application server can only be used to connect to SQL Server versions 2005 and higher. Predecessor releases are not supported by the Microsoft driver. Furthermore, the driver is only supported for Red Hat Enterprise Linux 5.x and higher and for Suse SLES11 SP2 and higher.  2. How to setup a connection with UDConnect  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. 1601608 - How to access an external Microsoft SQL Server database Version 11 Validity:  13.03.2013 - active Language English Windows Linux x86_64 Unix Java Stack UDConnect  UDConnect  UDConnect  ABAP Stack DBCon DBCon none Dual Stack UDConnect DBCon UDConnect  UDConnect  

description

1601608 - How to Access an External Microsoft SQL

Transcript of 1601608 - How to Access an External Microsoft SQL Server Database

  • SAP Knowledge Base Article

    Symptom

    You want to:

    l Access data in an external SQL Server database with your SAP system l ReportagainstdatainanexternalSQLServerdatabasewithBusinessIntelligence/BusinessWarehouse l Use DBACockpit to monitor an external SQL Server instance

    1. OptionsandtechnicalrequirementstoaccessanexternalSQLServerdatabase 2. HowtosetupaconnectionwithUDConnect 3. HowtosetupaconnectionwithDBCon/Multiconnect 4. How to monitor an external SQL Server Database using DBACockpit 5. Troubleshooting

    Environment

    SAP System based on an ABAP Stack, a Java Stack or a Dual Stack

    Resolution

    1. Options and technical requirements to access an external SQL Server Database

    The SAP standard ways to connect an external SQL Server instance with an SAP system are:

    l Multiconnect (DBCON) l 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.TheMicrosoftSQLServerClientSoftwareforWindowsconsistsofseveral*.dllfiles.ForlongtimeitwasavailableforWindowsplatformsonly.Recently,MicrosoftporteditsODBCSQLNativeAccessdrivertoLinux.ForthisreasonheterogeneousLinux/Windowsscenariosarenowpossible.DBCONutilizestheSAPABAPstacktoaccesstheexternaldatabasessoyoursystemrequiresatleastoneABAP-stack-basedSAPApplication Server running on Windows or Linux x86_64.

    UDConnect

    UDConnectusesaJDBC(JavaDatabaseConnectivity)drivertoestablishaconnectiontotheremoteSQLServerinstance.TheJDBCdriverconsistsofoneormore*.jarfilesandcan be used on Windows, Unix and Linux operating systems. As UDConnect utilizes the J2EE engine oftheSAPApplicationservertoaccesstheexternaldatabasesyouneedtohaveatleastoneJava-Stack-based SAP Application Server in your SAP system in order to use UDConnect.

    Connectivity Matrix

    Remarks:

    l If your system comprises solely of ABAP stack-based servers running on Unix platforms you can neither use UDConnect nor DBCON. Why? Because UDConnect requires at least one Java-stack based SAP Application Server (regardless of the operating system) and DBCON requires at least one Windows- or Linux x86_64-based SAP Application Server.

    l Using DBCon on a Linux x86_64 based application server can only be used to connect to SQL Server versions 2005 and higher. PredecessorreleasesarenotsupportedbytheMicrosoftdriver.Furthermore,thedriverisonlysupportedforRedHatEnterpriseLinux5.x and higher and for Suse SLES11 SP2 and higher.

    2.HowtosetupaconnectionwithUDConnect

    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.

    1601608 - How to access an external Microsoft SQL Server database

    Version 11 Validity: 13.03.2013 - active Language English

    Windows Linux x86_64 Unix

    Java Stack UDConnect UDConnect UDConnect

    ABAP Stack DBCon DBCon none

    Dual Stack UDConnect DBCon UDConnect UDConnect

  • SettingupUDConnectinordertoaccessdatainanexternalSQLServerDatabasewithBW/BIrequiresfoursteps:

    l Adding an RFC server on Java-stack side l Defining an RFC destination on BW/BI side l Installing and configuring the JDBC driver on Java-stack side l ConfiguretheconnectionURLfortheexternaldatabaseonJava-stack side

    Forstep-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)

    3. How to setup a connection with DBCON / Multiconnect

    To access data in an external SQL Server Database with DBCON / Multiconnect three steps are required:

    l Installing the SAP DBSL for SQL Server (dbmssslib.dll / dbmssslib.so) l On a Windows-based server: installing the Microsoft SQL Server Native Client (SNAC) or

    On a Linux x86_64 - based server: installing the Microsoft ODBC driver for Linux l CreatingaDBCONentryfortheexternaldatabase

    SAP note 1774329 explains the steps required to prepare your SAP instance to connect to a remote SQL Server instance.

    SAP DBSL for Windows

    DBCONutilizestheABAP-stack to connect to an external database. The ABAP-stackitselfrequirestheDatabaseSharedLibrary(DBSL)tocommunicate 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:

    l DeterminewhichkernelyourSAPsystemisusing(32bit/64bit,Unicode/Non-Unicode, Kernel Release, Operating System) kernelrelease:gotoransactionSM51placethecursorontheSAPinstanceclick"ReleaseInfo" bitversion, Unicode / Non-Unicode,OperatingSystem:goto"System""Status"

    l DownloadthearchivecontainingthemostrecentSAPDBSLforSQLServermatchingyourkernel go to SAP Software Download CenterBrowseourOnlineCatalogAdditionalComponentsSAPKernelSAPKERNEL

    SAPKERNELMSSQLServerlib_dbsl_-.sar

    l Extract the downloaded archive using command sapcar -xvf lib_dbsl_-.sar

    l 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

    PleaseseeSAPnote1644499ifyouneedtodownloadandinstalltheSAPDBSLforLinuxx85_64-basedservers.ThenotedescribeshowtorequesttheDBSLandalsoexplainsindetailwhichstepsarerequiredtoproperlysetitup.

    DBCON entry

    TheDBCONentryinformstheABAP-stackwheretofindtheexternalSQLServerDatabaseandhowtoauthenticate.PleaseseeSAPnote178949tolearnhowtocreateaDBCONentryforanexternalSQLServerDatabase.

    Microsoft SQL Server Client for Windows

    TheSQLServernativeclientisusedtoestablishtheconnectiontotheexternalSQLServerinstance.Toinstallityouneedtorunthesqlclni.msiinstallationpackagewhichisavailablefromtheSQLServerinstallationDVD/CD,orfromtheMicrosoftSoftwareDownloadwebsite.

    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. 4. How to monitor an external SQL Server instance using DBACockpit

    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 attachedtoSAPnote1027512(sqldba_cockpit.pdf)andinSAPnote1316740. UDConnect cannot be used for remote monitoring - the only way you can monitor a remote system is by using DBCon. 5. Troubleshooting

    l NosharedlibraryfoundforthedatabasewithIDor Unable to find library /dbmssslib.sl'. -> DLENOACCESS (0,Error 0) or ERROR => DlLoadLib()==DLENOACCESS - dlopen - ("/usr/sap//DVEBMGS00/exe/dbmssslib.so") FAILED or could not load library for database connection 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 -basedservertherootcauseisclear:theDBSLdoesnotexistforotherplatformsthanWindowsorLinuxx84_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-basedoraLinuxx86_64-basedApplicationServeryouneedtosetupasmalloneasworkaround.Ifyouencounter 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.

    l B Wed Jan Bcreate_con(con_name=) BLoadingDBlibrary'\dbmssslib.dll'... M***ERROR=>DlLoadLib:LoadLibrary(\dbmssslib.dll)Error14001 MError14001="Thisapplicationhasfailedtostartbecausetheapplicationconfigurationisincorrect. Reinstallingtheapplicationmayfixthisproblem." B***ERROR=>Couldn'tloadlibrary'\dbmssslib.dll' B***LOGBYG=>couldnotloadlibraryfordatabaseconnection

    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 afterwardspleasechecktheOSLogforfurthererrorsatthetimeoftheerror.

    l Generate Activation Context failed for \dbmssslib.dll. Reference error message: The referenced assembly is not installed on your system. Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.

    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.

    l Could not find stored procedure 'SAPSolMan.sap_tf_version'"

    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"Executescript(s)".ClickonittocreateallrequiredmonitoringStoredProceduresintheremotedatabase.

    l You want to update the JDBC driver used by your UDConnect connection

    Follow the instructions in SAP Note 1009497.

    See Also

    SAP Notes

    SAP note 1027512 - MSSQL: DBA cockpit for basis release 7.00 and later SAP note 1009497 - UD Connect: How to update JDBC driver SAPnote178949 - MSSQL: Database MultiConnect with EXEC SQL SAPnote512739 - BW external DB Connect for MS SQLServer SAPnote323151 - Several DB connections with Native SQL SAPnote1263367- Accept MDAC driver for DBCON SAP note 1316740 - Set up remote monitoring for Microsoft SQL Server databases SAP note 1644499 - Database connectivity from Linux to SQL Server SAP note 1774329 - Preparing your SAP instance to connect to remote SQL server SAPKBA1658310 - How to configure UD connect on the J2EE (710,..730) server for JDBC access to external databases

    SAP Online Documentation

    UD Connect Data Transfer with UD Connect DB Connect Data Transfer with DB Connect How to configure UD Connect on the J2EE Server for JDBC Access to External Databases

    Keywords

    AS400, RedHat, Suse, remote, verbinden, entfernte, SQL Server Datenbank, Verbindung, Fehler, Daten laden, aus, Anbinden einer MSS DB via dbacockpit,zentralberwachen

    Header Data

    Released On 13.03.2013 10:33:52

  • Product

    This document is not restricted to a product or product version

    References

    This document refers to:

    CSS SAP Notes

    Attachments

    Release Status Released to Customer Component BC-DB-MSS Microsoft SQL Server

    BW-SYS-DB-MSS BW Microsoft SQL Server

    Priority Normal Category How To

    1774329 Preparing your SAP instance to connect to remote SQL server 1658310 How to configure UD connect on the J2EE (710,..730) server f 1644499 Database connectivity from Linux to SQL Server 1316740 Set up remote monitoring for Microsoft SQL Server databases 1263367 Client libraries for DBCON connections 1027512 MSSQL: DBA cockpit for basis release 7.00 and later 1009497 UD Connect: How to update JDBC driver

    512739 BW external DB Connect for MS SQLServer 323151 Several DB connections with Native SQL 178949 MSSQL: Database MultiConnect

    File Name File Size (KB) Mime Type

    UDConnect_for_710.pdf 577 application/pdf

    Other Components