Quantcast
Channel: SCN : Discussion List - SAP on SQL Server
Viewing all articles
Browse latest Browse all 669

How can I connect to MySQL external database

$
0
0

Hello.

I have a SAP system running in SQL Server 2003.

I need to connect to external MySQL DB., to operate with this information in ABAP program.

 

I have done the step necesary... I mean I go to DBCO transaction and configure the connection like this:

 

DB CONNECTION --> AFIS

DBMS --> MSS

user name --> xxxxxx

DBpass -->xxxxxx / xxxxxx

Conn Info -->MSSQL_SERVER=192.168.1.233 MSSQL_DBNAME=alliance OBJECT_SOURCE=alliance

 

I do a test program, when I do the statement CONNECT TO, sy-subrc 0 and connection = DEFAULT... I mean, with this form I cannot connect to MySQL Database...

 

Can you help me to do this?? I think the problem it's the connection string in DBCO... but I'm not sure...,

Would be possible to connect by MySQL ODBC??? I mean , installing the ODBC driver in my SAP server, and using this in ABAP Program??

 

Thks.

 

DATA: BEGIN OF wa,

cod_modelo(20),

END OF wa.

 

DATA: dbs TYPE dbcon-con_name.

DATA: con(20) TYPE c.

DATA : ls_wa LIKE wa.

 

con = 'AFIS'. "DB Connection in DBCO above

 

 

EXEC SQL.

 

CONNECT TO :con

 

ENDEXEC.

 

WRITE sy-subrc. ---> The result it's 4

 

EXEC SQL.

GET CONNECTION :con

ENDEXEC.

 

WRITE : con. --> The result it's DEFAULT

 

EXEC SQL.

SET CONNECTION DEFAULT

ENDEXEC.

 

write : con. --> The result it's DEFAULT


Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>