cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL connection using ABAP

Former Member
0 Kudos

Dear Experts,

I'm working on a ABAP program connecting to a Linux based MySQL server for data retrieval/update.

I've followed the suggestion provided by Gudmundur in the thread: http://scn.sap.com/thread/1310696

I've created a ODBC DSN connection and tested OK in Administrative Tools.

However, the connection is failed when using parameter "MSSQL_DSN=<DSN>" in the DBCO setting.

I've tried again by creating a DSN connection to another MSSQL server but it failed as well.

As I've completed a program connecting to a MSSQL server before, I doubt that it fails because my SAP system do not access any Windows level ODBC settings.

May I know if any prerequisities I missed?

Thank you very much.

Theo

Accepted Solutions (0)

Answers (4)

Answers (4)

anton_karner
Member
0 Kudos

MSSQL is not the same as MySQL !!!

Former Member
0 Kudos

Hi All,


Sorry for information missing.


SAP version: ECC6 Kernel release 700

MSSQL server 9.0.3042
DBSL version: 700.08 patch level 330

MySQL OBDC driver used in DSN: v3.51
Target MySQL server version: 5.0.67

The DBCO settings:

------------------------------------

DBMS: MSS

User Name: sap

DB Password: <Entered>

Conn.info: MSSQL_DSN=TESTDSN

Permanent: <Blank>

Connection Limit: <Not set>

Optimum Conns: <Not set>

-------------------------------------

By the way, I found following messages in ST11:

-------------------------------------------

B Thu Aug 01 16:28:48 2013

B  Connect to TESTDSN as  with MSSQL_DSN=TESTDSN

C  Thread ID:2644

C  dbmssslib.dll patch info

C    patchlevel   0

C    patchno      330

C    patchcomment Tp getdbobjsize returns size 0 for

C  np:(local) connection used on <Localhost>

C  Connected to db server : [<Localhost>] server_used

C  pn_id:<Localhost>_***_D01

B  Connection 6 opened (DBSL handle 1)

B  Disconnected from connection 6, con_da={TESTDSN,1421}

-------------------------------------------

It seems that the connection to DSN is failed and finally connected to localhost.

Theo

former_member184473
Active Contributor
0 Kudos

Hello Theo,

Provide the screenshots of the entries (DBMS and CON ENV) on DBCON for your connection MSSQL_DSN.

Regards,

Eduardo Rezende

Former Member
0 Kudos

You failed to provide the SAP version you are working with, most important piece of information is the ODBC DBSL version number. Please also share the MySQL version you are trying to connect to. Finally elaborate on "failed". Provide screenshots, ST11 traces, etc.

Former Member
0 Kudos

Hi Samuli,

Information provided in reply below.

Actually I found that I have the same case as Milisk in http://scn.sap.com/thread/1516951.

My program finally connected to localhost (It shows databases in my SAP application server when I run SQL "show databases()" in my program after connected to the DSN)

Is it related to the ODBC driver version?

Theo