Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DBCON problems connect to other database

Former Member
0 Likes
888

Hi

I have tried a lot, found some answers from SDN etc., but I still have problems.

I try to connect my external MSSQL database by this code:


EXEC SQL.                
  CONNECT TO 'DATABASE'
ENDEXEC. 

But my sy-subrc is 4.

In my DBCON table the following is inserted:

Connectionname: DATABASE

DBMS: MSS

Username: user_name

Password: password/password

Conn.info:MSSQL_SERVER=172.16.1.98;MSSQL_DBNAME=SAP_RSSQL

Permanent: x

Our SAP server do have the dll file mentioned in note no.: 738371

Please help

4 REPLIES 4
Read only

krzysztof_konitz4
Contributor
0 Likes
700

Hi,

In parameter MSSQL_SERVER you should also enter host name: [server]\[host name].

Krzys

Read only

0 Likes
700

Hi Krzys

Thanks for your answer, but I don't understand what I have to write in?

What is the difference between server and host_name?

I have now changed it to:

MSSQL_SERVER=172.16.1.98\DATABASE;MSSQL_DBNAME=SAP_RSSQL

but I still have the same problem.

Read only

0 Likes
700

Hi,

I'm not expert but you should enter:

MSSQL_SERVER=172.16.1.98\INSTANCE

where INSTANCE is your MSSQL instance identifier.

As far as I remember instance name corresponds to your MSSQL service name in Windows.

Krzys

Read only

Former Member
0 Likes
700

Hi,

try an entry like this:

MSSQL_SERVER=<IP of DB-Server> MSSQL_DBNAME=<Name of DB on the Server>

Select MSS as DB-System and try it with entering the password all in upper case. Also ensure on the MS SQL-Server that you are allowed to connect to it using SQL-authentication, and not only using the NTLM-Authentication.

Hope that helps.

Best Regards

Michael