on 04-17-2009 7:20 AM
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
Check if
Note 178949 - MSSQL: Database MultiConnect with EXEC SQL
can help you.
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Markus.
This note explains very well how connect to MSSQL System... but my problem is that the Database system it's MySQL , and with this configuration I cannot get to connect with my database.
Do you know if it's possible to connect with this kind of database???
I see that in DBCO transaction the types of database that I can connect are this... What kind I must select?? ...
ADA SAP DB (ADABAS/D)
DB2 DB2 UDB para OS/390
DB4 DB2 UDB para AS/400
DB6 DB2 UDB para Unix y Windows
INF Informix
MSS Servidor Microsoft SQL
ORA Oracle
In this note 1248222 I see that I can connect by ODBC using the parameter MSSQL_DSN to connect by ODBC... I use this but I cannot connect yet.
Another idea??...
I think the key point it's to know if MySQL it's supported by DBCO..., because this note 1248222 explain how connect to external db but, MSSQL DB... not MySQL DB
Thks for your help.
Edited by: Pedro Gallardo Guzman on Apr 17, 2009 10:16 AM
> I think the key point it's to know if MySQL it's supported by DBCO..., because this note 1248222 explain how connect to external db but, MSSQL DB... not MySQL DB
I misread that - sorry.
It's not possible to connect to an MySQL database.
To to external connections to other databases you need
- a database client for the database you want to access
- a database interface library (lib_dbsl) for the target database
You may be able to install the MySQL client for Windows but the database interface library is missing. That library is responsible to translate the ABAP calls into the SQL dialect for the target database. Since that is not existing for MySQL it's not possible to connect.
Markus
Dear Marcus.
Then, if I understand your reply...I cannot do something.... SAP not support external connection to MySQL because MySQL not have an interface library (lib_dbsl)...
It's for it, that when I go to DBCO... in DBMS ---... I can select Oracle, MSSQLServer, DB2... for this Databases..., exists the library (lib_dbsl)???
In resume:
IT'S NOT POSSIBLE CONNECT TO MYSQL!!! ... I cannot believe it!!!...,
Hi,
>IT'S NOT POSSIBLE CONNECT TO MYSQL!!! ... I cannot believe it!!!...,
Why ? SAP products don't run on MYSQL. Why should it be supported ?
And I think that direct dblinks are very bad from an architectural point of view.
Just develop an interface. Why not implementing a web service able to fetch the necessary data from MYSQL and call this web service from you SAP software ?
Regards,
Olivier
> It's for it, that when I go to DBCO... in DBMS ---... I can select Oracle, MSSQLServer, DB2... for this Databases..., exists the library (lib_dbsl)???
yes, for all those databases exists the database interface library.
> In resume:
> IT'S NOT POSSIBLE CONNECT TO MYSQL!!! ... I cannot believe it!!!...
Well - as far as I remember there were some times ago efforts to port SAP applications to MySQL. That would explain why there's also a file "DDLMYS.TPL" created if you execute R3ldctl during a system copy - amongst DDL files for all other databases. I believe this was at the time MySQL was promoting SAPDB/MaxDB.
MySQL is historically not a database engine for software, that requires transactional integrity; there were extensions to support that (InnoDB or others) and there was no customer demand in getting MySQL as engine for SAP applications. And only develop an interface to be able to connect to an external MySQL engine is not worth the effort.
However, there is hope Some BusinessObjects applications also run with and against MySQL engines, depending on how the strategy to integrate those into the SAP software stack there may (or may not) be an interface for that database in the future.
Markus
Hi Pedro,
MSSQL_DSN should work. You should create your DSN using the ODBC Data Source Administrator (in Administrative Tools). Test it and make sure it works to the server and database you need.
Then create the DBCON (in transaction DBCO) with DBMS=MSS and your MySQL User/passwd.
The Conn. info (field CON_ENV) should only contain:
MSSQL_DSN=<your_dsn_name>
That's all - IF you're using the ODBC DBSL interface on your application server.
If you're using the older OLEDB DBSL (7.00 on sql2005 or older), then you must in addition put MSSQL_DATASOURCE=<your_dsn_name> in the CON_ENV field.
Hope this works for you.
Gudmundur
>
> Hi Markus,
> the client side DBCON settings are described above in my earlier response to Pedro. On the server you just have to set up the user/password and make sure the correct database context is used.
> Gudmundur
Hi Gudmundur,
I still don't really know what I have to do and on which system.
I have the SAP ERP on a server (probably Windows Server 200x) and I have my Notebook with Windows XP and a MySql 5.1 Server.
Where do I have to configure the ODBC? On my Laptop or on the Server 200x-System?
Do I have to add something like localhost in the DSN-name in the DBCON?
Is it possible to connect to my local server without using my Win XP Username + Password? I don't know where to pass both.
I always get the runtime error u201CConnection to database system not possible with identifier u201C<Identifier>u201D, but I donu2019t know what the problem is.
Markus
Hi Markus,
Your program to access the remote MySQL server is running on the application server of your ERP system (I assume). So the (System) DSN must be created on the application server on which the abap will run. The application server must be a windows server for this to work, and dbmssslib.dll must be installed on it.
You can use the ODBC Data Source Administrator on the SAP appserver to create and test the DSN.
In DBCON you add MSSQL_DSN=<dsn name> in the CON_ENV field. Just the dsn name, nothing else (no localhost).
The DBCON-USER_NAME should contain the MySQL user (not the XP os user), and the DBCON-PASSWORD field should contain the (encrypted) password for that MySQL user.
You may have to make sure your MySQL server on your laptop is able to accept connections from across the network. Check the MySQL docs for that.
Good luck,
Gudmundur
Hi Markus, it should be something like:
Support Packages and Patches -> Entry by Application Group -> SAP NetWeaver -> SAP Net Weaver -> SAP NETWEAVER 7.0 -> Entry by Component -> Application Server ABAP -> SAP KERNEL 7.00 64-BIT UNICODE (or whatever your platform is) -> Windows Server on x64 64bit -> MS SQL SERVER -> Downloads -> lib_dbsl* (the latest).
Hope this helps,
Gudmundur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gudmundur,
good idea to set MSSQL_DATASOURCE=<your_dsn_name>. After that, the trace told me to install the client softfware for provider MSDASQL. I installed MSDASQL and the connection to mySQL works.
Thank you
Detlef
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gudmundur,
yes, I have dbmsslib.dll installed on the SAP System.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have SAP ERP 6.0 running with DB6 on Windows 2003 64-Bit. I tried to get an ODBC connection to mySQL like described above, but it didn't work. I have defined the ODBC DSN on the SAP System and the test did work. But with DBCO definition (DBMS = MSSQL , Conn.info = MSSQL_DSN=<dsn name>) there is no connection possible (ERROR SQL error 1-: [DBNETLIB][ConnectionOpen (Connect()).]SQL Serverdoes not exist or access denied.).
Have you any idea what could be wrong??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.