14
Procedure for connecting a legacy database system to BW (DB-Connect) Contents 1. Relevant SAPNotes...............................................1 2. Overview........................................................ 1 3. Creation of the future Data Source in the source database (example Oracle)............................................................. 2 4. Database connection (example Oracle)............................2 5. Creation of the source system (example).........................3 6. Creation of Data Source.........................................5 7. Check data source..............................................11 8. Later changes to the database view.............................14 The text describes the overall procedure for connecting a relational database system to a BW-System using the DB-Connect functionality. As an example, the integration of an Oracle database is shown. 1. Relevant SAPNotes SAPNote Source system type 520647 SAP-DB 520496 Informix 512739 SQL-Server 518241 Oracle 523552 IBM DB2/390 523381 IBM DB2/400 523622 IBM DB2 UDB 2. Overview The implementation of a DB-Connect interface involves various steps. Page 1

Procedimiento Conexion DB UD Connect

Embed Size (px)

Citation preview

Page 1: Procedimiento Conexion DB UD Connect

Procedure for connecting a legacy database system to BW (DB-Connect)

Contents

1. Relevant SAPNotes...........................................................................................................12. Overview............................................................................................................................ 13. Creation of the future Data Source in the source database (example Oracle)...................24. Database connection (example Oracle).............................................................................25. Creation of the source system (example)..........................................................................36. Creation of Data Source....................................................................................................57. Check data source...........................................................................................................118. Later changes to the database view................................................................................14

The text describes the overall procedure for connecting a relational database system to a BW-System using the DB-Connect functionality. As an example, the integration of an Oracle database is shown.

1. Relevant SAPNotesSAPNote Source system type520647 SAP-DB520496 Informix512739 SQL-Server518241 Oracle523552 IBM DB2/390523381 IBM DB2/400523622 IBM DB2 UDB

2. OverviewThe implementation of a DB-Connect interface involves various steps.

First of all, the BW basis is involved in that a connection on database level (Database/BW to Database/legacy) has to be created. This is normally done by the BW basis responsibles.

Secondly, within Administrator Workbench the DB-Connect source system has to be created and the relevant data source(s) are to be created. This is usually done by the BW expert.

Prior to the generation of the data source(s) the relevant tables or views have to exist within the legacy database system in order to replicate these sources.

Note: SAP strongly recommends to use views instead of tables as this means increased flexibility (for instance as regards complying with naming conventions) – see below.

Page 1

Page 2: Procedimiento Conexion DB UD Connect

3. Creation of the future Data Source in the source database (example Oracle)

The table / view including all relevant fields has to exist in the source system.

The following restrictions as regards naming conventions have to be adhered to:

a) View- Name of the View: maximum 26 characters- Permitted characters: capital letters, numbers, underscore (‘_’)

b) Field within the view- Name of the fields: maximum 16 characters- Permitted characters: capital letters, numbers, underscore (‘_’)

It is advisable that the Oracle time stamps (format ‚DD-MON-YYYY HH24:MI:SS’) are converted within the view into the SAP format (‘YYYYMMDD’). This involves less work on BW side.SQL statement for the view: ‘select to_char(SAMPLE_DATE_ORA,'YYYYMMDD') as SAMPLE_DATE_SAP from dba_tables’

4. Database connection (example Oracle)In order for the BW system to correctly communicate with a remote Oracle database system the TNSNAMES.ora file on the BW server has to be updated with the connection credentials. If the Database System of the BW is not the same as the legacy database (e.g. Legacy: Oracle; BW: IBM DB2) it is furthermore required

- to install the respective database client on the BW server. - to install the database specific DBSL

These steps are not required if two databases of the same kind are involved. (Installation of the database client on the BW server is done when installing the BW server.) The database specific DBSL can be downloaded from the SAP Service Marketplace. It has to be stored to the SAP kernel.

In order to properly update the TNSNAMES.ora the following information is required:

- HOST- SID- PORT (if different from standard port= 1521)- USER/PWD for the database system to connect to BW; the user must have the

authorization to run specific queries in Oracle.

This information is required by- the basis expert responsible for the BW instance- the BW expert to create the source system

It should be tested whether the Oracle source system can successfully be pinged from the BW server (TNSPING).

Important: The Oracle release must be at least 8.1.7.3 in order that DB-Connect properly functions.

5. Creation of the source system (example)HOST: zsvilla04 / 144.138.1.124SID: MABDPORT: 1521User / Pwd: sapbwdev / sapbwdev

Page 2

Page 3: Procedimiento Conexion DB UD Connect

Page 3

Page 4: Procedimiento Conexion DB UD Connect

Save.

Go back (2x).

The source system is created.

The connection can also be checked with right-click on the system and selecting Check:

Page 4

Page 5: Procedimiento Conexion DB UD Connect

6. Creation of Data SourceRight-click on Source System and choose Select Database Tables.

Page 5

Page 6: Procedimiento Conexion DB UD Connect

Page 6

Page 7: Procedimiento Conexion DB UD Connect

Confirm either “Select Tables” or “Select Views” or both and execute.

All Tables or Views that the user (that was entered when creating the Source System) is authorized for are shown.

Select the Table / View and Press “Edit DataSource”.

Page 7

Page 8: Procedimiento Conexion DB UD Connect

All fields within the table/view are shown. It is possible to select only a subset of the fields available to transfer to BW.

After selecting “Display Table Content” a number of records are shown so that the data can be validated.

Page 8

Page 9: Procedimiento Conexion DB UD Connect

After pressing “Generate DataSource” a data source for this particular table or view is generated within BW.

The data source thus generated is named with a prefix “6” and the table/view name.

Page 9

Page 10: Procedimiento Conexion DB UD Connect

7. Check data source

Page 10

Page 11: Procedimiento Conexion DB UD Connect

The Object Overview shows more details on the fields within all the data sources generated for a particular source system. Note that the “InfoObject” column is still blank. A mapping of the data sources fields to the BW InfoObjects is required. This is done in an InfoSource.

Page 11

Page 12: Procedimiento Conexion DB UD Connect

New Object Overview:

Page 12

Page 13: Procedimiento Conexion DB UD Connect

8. Later changes to the database viewIf the view changes later-on (e.g. a new indicator is included) the data source has to be re-generated (see above).

The following steps are the same as with other data sources:- Create new InfoObject- Change InfoProvider to include the new InfoObject- Change communication structure to include new InfoObject- Assign the new source field to the new BW InfoObject- Change Update Rule to include new InfoObject- Change queries…

Depending on the complexity of the changes to the view it might be necessary to re-assign also the other fields that were already assigned to BW InfoObjects earlier. See above for this step.

Page 13