10
How-to Guide SAP NetWeaver ‘04 How to … Configure UD Connect on the J2EE Server for JDBC Access to External Databases Version 1.05 – Jan. 2004 Applicable Releases: SAP NetWeaver ’04 (SAP BW3.5)

How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

  • Upload
    cast

  • View
    81

  • Download
    8

Embed Size (px)

Citation preview

Page 1: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

How-to Guide SAP NetWeaver ‘04

How to … Configure UD Connect on the J2EE Server for JDBC Access to External Databases Version 1.05 – Jan. 2004 Applicable Releases: SAP NetWeaver ’04 (SAP BW3.5)

Page 2: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

© Copyright 2004 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data

contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. SAP NetWeaver “How-to” Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. Any software coding and/or code lines / strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

Page 3: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

1 Scenario

You have data in a non-SAP database that you wish to report against using the new Universal Data Connect (UDC) functionality introduced in SAP BW 3.5. By using a remote cube to access the external data, you can create queries, use the Bex Analyzer and create web applications just like you would for SAP BW data.

2 Introduction

UD Connect utilizes the J2EE engine of the SAP Web Application server to access external data. This How-to will deal with the set-up and configuration of the relational JDBC connector. Connectors to access multi-dimensional OLAP databases are also available, but not covered in this guide. This guide will detail the steps necessary to connect the SAP BW ABAP stack with the J2EE stack via RFC as well as configuring the JDBC connector to use the database vendor provided JDBC driver. It is assumed you have installed the J2EE server and the Universal Data Integration (UDI) specific add-ons from the installation DVD.

Page 4: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

3 The Step By Step Solution

1. Start the J2EE ‘Visual Administrator’ via the go.bat file located here: <drive>\usr\sap\<SID>\DVEBMGS00\j2ee\admin.

Note: Creating a shortcut to ‘go.bat’ and placing it on the desktop will make future access more convenient

2. Logon to the J2EE server. After you are authenticated, you should see a screen similar to the one on the right.

Page 5: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

3. Expand the ‘Server’ node and the ‘Services’ node and click on the ‘JCo RFC Provider’ service.

4. You will add a RFC server that upon startup, logs into your SAP BW 3.5 system and registers itself. The field ‘Program ID’ is freely definable, but write it down, you will need it later. Complete the fields. ‘User’ is a ‘system’ user, similar to the ALE_REMOTE user. Once all the fields are filled in, click on ‘Set’. The RFC server will automatically start.

Note: If your BW system is Unicode, make sure the ‘Unicode’ field is checked, otherwise leave it unchecked.

Page 6: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

5. Defining a RFC destination in BW. Create a new RFC destination of type ‘TCP/IP’ via transaction SM59.

Click on the ‘Technical Settings’ tab and select the ‘Registered Server Program’ radio button. Enter the name of the RFC server from the previous step in the field ‘Program ID’. In this example – ‘rgphl101_j2ee’.

Test your connection.

6. Back in in the J2EE Visual Administrator, select the ‘JDBC Connector’ Service and expand the ‘Drivers’ node.

Click on the sheet-of-paper icon to create a new entry.

7. In the dialog box, enter a freely definable name and click ‘OK’. Specify the location of the JDBC driver JARs provided to you by your RDBMS vendor. Keep adding JARs until you are done.

Note: The JDBC driver for Microsoft SQL Server is available from Microsoft at http://www.microsoft.com/downloads/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&DisplayLang=en

Page 7: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

When you are done adding JARs you should have an entry for your new driver.

8. Navigate to the ‘Connector Container’ Service and select the ‘BI_JDBC_CONNECTOR’.

9. Next, click on the ‘Resource Adaptor’ tab and click on ‘Add’.

We need to add a load reference that starts with ‘library:’.

IMPORTANT: The string after the colon must match the name you used in step 7. where you defined the DB Driver!

Example: library:MSSQL

Page 8: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

10. Navigate to the ‘Connector Container’ service, click on your connector and then on the right hand side of the screen click on the ‘Managed Connection Factory’ and then the ‘Properties’ tab.

11. Click on on the ‘DriverName’ key row and change the value to the string specified in your JDBC documentation. Repeat for the ‘URL’ key. Enter the database username and password used for logging into the DB. Example (MS SQLServer only!):

DriverName: com.microsoft.jdbc.sqlserver.SQLServerDriver

URL: jdbc:microsoft:sqlserver://<server>:<port>;database=Northwind

Notes:

<server> is the complete hostname (e.g. myhost.acme.com)

The default port for MS SQLServer is 1433. Important: Click on the ‘Save’ icon when you are done with the configuration

Page 9: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

12. To perform a quick ‘smoke test’, execute the following URL in your browser, replacing the placeholders with your server name and J2EE port.

http://<server>:<port>/TJdbc/servlet/TestJdbc

13. You have successfully configured the J2EE server for UD Connect! At this point you can clone the BI_JDBC_CONNECTOR in order to provide more granular access to your database (i.e. using different users and schemas).

Note: You must start cloned connector names with ‘SDK_’ in order for them to be visible in the BW backend system for selection during the mapping process.

Page 10: How to Configure UD Connect on the J2EE Server for External Databases (NW2004)

www.sdn.sap.com/irj/sdn/howtoguides