cancel
Showing results for 
Search instead for 
Did you mean: 

MS SQL connection thru SAP

Former Member
0 Kudos

Dear all,

I know that this question has been asked before, but as i am facing some primitive issues so i am again posting my query.

My requirement is to connect to an external MS SQL db from SAP and read data from that server. That MS SQL is located in a different m/c altogether. I was trying to connect by making settings in DBCON -

CON NAME MSS_TEST

DBMS MSS

USER NAME administrator

PASSWORD (some pwd)

CON ENV MSSQL_SERVER=EISF016

MSSQL_DBNAME=MASTER

and then using the query

DATA: CONNECTION LIKE DBCON-CON_NAME VALUE 'MSS_TEST'.

EXEC SQL.

CONNECT TO :CONNECTION

ENDEXEC.

but after this I am getting sy-subrc eq 4, which means that the connection got failed.

Is there any way to check the connection that whether the value entered in DBCON (MSS_TEST) is getting connected ??

Well my guess is that as the SAP and MS SQL servers are in diff m/c so we have to make one RFC connection and then do the connection, but this is just my guess. And if any RFC is at all required then how to make that.

Kindly help me in resolving the issue.

Points will definately be rewarded.

Thanks,

Saurabh.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

done

Former Member
0 Kudos

Log into the server hosting your SAP instance.

Then, try connecting to the server EISF016 via SQL management studio using user administrator + password.

Is this successful?