cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to MySQL database, DBCO settings

Former Member
0 Kudos

Hi experts,

I need to connect to a MySQL database located on a different side.

I do have the IP and domain name (e.g. my.test.com), MySQL DB name (SAPtest), Username (SAPuser) and Password (*****).

I did following entries under DBCO:

Name: SQLtest

DBMS: MSS

User Name: SAPuser

DB-Password: *****

Env. Info: MSSQL_DNS=my.test.com

Connection Limit: -

Connection Optimum: -

I hope you see already, that I get the error message SQL Server does not exists or access denied.

I check already all kind of forum and posts, but couldn´t find a good and satisfying documentation for this case.

Yes, MSS is not MySQL, but different user say it is possible with this settings.

I am thankful for any help!

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

To use the DBCO (secondary database connection) you'll need to have a database library for the SAP Kernel.

It's used to map the ABAP DB access to the corresponding DBMS client calls.

There is no such library for MySQL available, so you cannot use DBCO for this.

Why don't you try jdbc via UD-COnnect or via a J2ee instance?

regards,

Lars

Former Member
0 Kudos

Thank you for the answer.

I know the MSS library is not made by name for connecting to a MySQL DB, but Gudmundur and Pedro Gallardo were giving solutions ON connect SAP to a MySQL database. It really sounds like it is compatible. That might be also the answer why SAP is not offering a special library for MySQL - yes that is really a guess.

Maybe jdbc would be the best solution, but I have no idea how to use it within my ABAP program. Actually I have never used any Java code or programs under SAP.

Do you have a sample code, where there is theI call for the JDBC connection out of my ABAP program to connect and disconnect to the MySQL DB? This would be very helpful.

I simply want to open the connection write some data into the MySQL DB and then close the connection.

Thanks!

Edited by: Rene Gegusch on Jun 14, 2011 8:37 AM

lbreddemann
Active Contributor
0 Kudos

Hi again,

sorry, but MSS (MS SQL SERVER) and mySQL are two completely distinct and different DBMS.

There is no way to connect to a mySQL database with the client software for a MS SQL database.

What I can imagine is that - maybe? - MS SQL allows database links to ODBC/JDBC datasources and that you connect through a MS SQL database to the mySQL.

But this is something quite different from connecting NetWeaver to a mySQL database...

Concerning the reason for SAP not to provide a specific mySQL, PostgreSQL, Firebird... client library: just look up one of the recent discussions here in the forum.

There's just not enough request from customer side for that.

And I'm sorry to tell you, that I don't have any sample code at hand for that.

Maybe it'll be easier to change the mySQL database to a supported DBMS in the first place (e.g. MaxDB).

regards,

Lars

Answers (0)