Vous êtes sur la page 1sur 9

23/7/2014 SAP BW 7.3: How to extract data from SQL Server...

| SCN
http://scn.sap.com/docs/DOC-49003 1/9
created by Carlos Pinto Camarero on 16-Nov-2013 00:56, last modif ied by Carlos Pinto Camarero on 16-Nov-2013 16:17
In this document (my first one) I will comment how to create a connection from SAP BW to SQL Server step by step and the
small problems that I encountered during the process. I hope it can help to someone who has to perform this process in
the future.

Step 1. Create the Source System.
RSA1 --> Source Systems --> Right click on DB Connect --> Create

Step 2. We need to fill the next fields:
Logical System Name: in our case we have named MSSQLS.
Source System Name: Text field (40 Characters Long).
Type and release: here we can specify a type and a release of this source system.

Step 3. Once named the system we have to create the connection parameters:
SAP BW 7.3: How to extract data from SQL
Server using DB Connect
Share
Version 2
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 2/9

DB Connection: the logical name with which we have created our connection.
DBMS: the database type to which you want to connect. In this case MSS. There are the following ones:
User Name and DB Password: user and password with which we are going to connect to the database.
Conn. Info: specific information for database connection. In our case:

MSSQL_SERVER=SERVERNAME1 MSSQL_DBNAME=DBNAME1 OBJECT_SOURCE=SAP

With:
MSSQL_SERVER: name of the server we are going to connect.
MSSQL_DBNAME: name of the database from which we will extract data.
OBJECT_SOURCE: name of the schema in which the tables are available.

Permanent: related to what happens when an open database connection is lost due to a database failure or lost network
connection.
Connection Limit: Maximum Number of DB Connections
Optimum Conns: Optimal number of DB Connections


Step 4. In SQL Server the user must have the following permissions:
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 3/9


Step 5. We check that the connection is correct.



Step 6. We select the tables or views from which we want to extract the information.
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 4/9
Right-click --> Additional Functions --> Select Database Tables (3.x)

Then we press Execute:
The following tables and views have been found:
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 5/9
... the same views we wanted to access:
Important note: as seen in the image below, we cannot access "View_2" because the names of the tables/views (and
their fields) must be in UPPERCASE.
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 6/9
Step 7. If we select any of the first four tables and we press "Edit DataSource" we can see the fields (Field Name,
Database Type, Length in Database ...) of each table:
Step 8. If we press Display Table Contents we can see the content:

23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 7/9

Step 9. If we press "Check DataSource" we can verify the DataSource. In this case displays
a warning because the length of one of the fields is larger than 16:
Step 10. And if we press Generate DataSource we create the DataSource in BW side.
A message shows that the DataSource (6DB_tablename) has been successfully generated:
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 8/9

Step 11. If we return to the Workbench we can see that our DataSource has been generated (in version 3.x):
Step 12. Click the right mouse button and migrate the DataSource to version 7.0.

Step 13. Create the transformation rules (as we can see below):
23/7/2014 SAP BW 7.3: How to extract data from SQL Server... | SCN
http://scn.sap.com/docs/DOC-49003 9/9
Step 14. Create the Infopackage and DTP.

Step 15. Execute the Infopackage and DTP and we can see that our Infoobject (ZCCAA2) has been loaded correctly:

Best regards,
Carlos

Vous aimerez peut-être aussi