Example 2: Running Ad Hoc T-SQL Batches from a SQL Server Web Service

For this example, you need to execute a batch of T-SQL statements by adding a new web method to the endpoint and changing it to accept query batches.

The syntax for making changes to SOAP endpoints is similar to that for CREATE ENDPOINT. The differences are shown in Listing 48.6.

Listing 48.6 ALTER ENDPOINT T-SQL Syntax

image

The following bullets explain the keywords used with ALTER ENDPOINT:

ADD and DROP EXCEPT_IP allow you to update the list of IP addresses allowed to connect to the web service.

ADD WEBMETHOD allows a new web method to be added to the web service.

ALTER ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.