0

I'm really having a hard time finding information on how to use SQL Server Web Service (Endpoint for TSQL). I found some articles on how to create endpoints which seems to be simple enough. From my understanding, an SQL web Service listens on a specific port for TSQL (TSQL is the one that I want to try). I haven't been able to find how to call this endpoint with a query or a stored procedure...

Is there something I'm missing? Any article or path I can take to understand how this works would be greatly appreciated.

Any help is greatly appreciated! Thank you

Hannah Vernon
71.1k22 gold badges178 silver badges324 bronze badges
asked Mar 6, 2017 at 21:47
5
  • "Call the endpoint"? What exactly do you expect the endpoint to do in response to a query or stored procedure? Maybe you could describe the problem you're actually trying to solve, instead of asking how you can use an endpoint to solve it. My hunch is that there is a better solution. Commented Mar 6, 2017 at 22:01
  • As Aaron pointed out, using SQL Server as a web endpoint is not the best way to provide access to SQL Server data. Let IIS or some other http server host that service. Commented Mar 6, 2017 at 22:12
  • @Aaron Bertrand From what I have read, I was under the impression that like an Http Service the SQL WEB Service FOR TSQL (endpoint) would be a safe service that you send TSQL commands to and get the info back. The intent was to replace an APP tier by an SQL Web Service with Stored Procedures. But our main concern is Security since PCI compliance says that no DMZ should have access to an internal network. Commented Mar 7, 2017 at 13:38
  • Where have you read that? I think if you want a data layer / middle tier, you're going to have to actually write a data layer / middle tier. Commented Mar 7, 2017 at 13:41
  • @Aaron Bertrand I assumed from my understanding of what I have read... Obviously I was totally off. Commented Mar 7, 2017 at 13:49

1 Answer 1

3

The MSDN documentation for CREATE ENDPOINT notes the following:

Native XML Web Services (SOAP/HTTP endpoints) was removed in SQL Server 2012.

So, unless you are using an unsupported version of SQL Server prior to SQL Server 2012, you cannot create an endpoint for http or xml.

If you are considering create a T-SQL endpoint, every SQL Server already has a T-SQL endpoint built in by default and there is absolutely no need to create another one. By default, the T-SQL endpoint listens on port 1433, although that is configurable.

answered Mar 6, 2017 at 22:38
3
  • The big picture is that we have an Application (over 20 year of code and close to 1 million lines of code) that accesses a local DB. Unfortunately the queries are in the code. we have recently created a web service to act as the application does... The problem is that they realized that with a DMZ that can't access the DB that's on the internal network, they were hoping that the SQL Web Service FOR TSQL can act as a local DB does with the Security aspect of it Commented Mar 7, 2017 at 14:05
  • When you say "accesses a local DB", are you saying it is hard-coded to connect to a SQL Server LocalDB database, or? Please clarify. Thanks! Commented Mar 7, 2017 at 15:02
  • it is set in an INI to connect to a DB, usually locally or on the same network. not LocalDB that you are referring to. Commented Mar 7, 2017 at 15:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.