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

Connecting to MS SQL Server using EXEC SQL

Former Member
0 Likes
1,538

Hi guys,

You are about my last hope...

I am trying to connect to SQL Server from SAP.

I have a DBCON entry set up, and I have this piece of code which seems to want to work:

EXEC SQL.

CONNECT TO 'WFS_SQL' AS 'W'

ENDEXEC.

EXEC SQL.

SET CONNECTION 'W'

ENDEXEC.

EXEC SQL PERFORMING WRITE_STATION.

SELECT STATION INTO :WA_STATION from STATIONS;

ENDEXEC.

But when I run it, SM21 reports 'No shared library found for the database with ID WFS_SQL'.

This makes me think that my MS Sql Server (2000) needs to be 'listening' for the inbound connection. Searching through google, I keep coming back to TNS, but when I did deeper, all references talk about Oracle, not MSSQL.

So the question then, is how can I make MS SQL Server 'listen' for the connection from SAP?

Any help you can give gratefully appreciated!

Thanks,

Vaughan

5 REPLIES 5
Read only

gregorw
SAP Mentor
SAP Mentor
0 Likes
1,078

Hello Vaughan,

what platform and database is used on your SAP Application and Database Server?

Regards

Gregor

Read only

Former Member
0 Likes
1,078

Hi Gregor,

We are on Oracle over Unix.

Thanks,

Vaughan

Read only

Former Member
0 Likes
1,078

We are connecting to MS SQL from SAP with no issues.

Two things:

1) What is the user profile that is connecting to your MS SQL database?

2) Have you installed the correct providers so the two databases can talk?

Read only

Former Member
0 Likes
1,078

Aha! This may be it.

Step 1: The profile we know to be okay.

Step 2: What providers would they be then? I think this is where the problem lies. I don't know what to look for to know what to install on the windows side...

Read only

0 Likes
1,078

Hello Vaughan,

look at SAP Note #178949 here you got a description of a Database Connect to MSSQL. But at least one Windows application server must be available on the R/3 system and the DBSL dynamic library (DLL) dbmssslib.dll.

Regards

Gregor