Compartilhar via


ALTER ENDPOINT (Transact-SQL)

Enables modifying an existing endpoint in the following ways:

  • By adding a new method to an existing endpoint
  • By modifying or dropping an existing method from the endpoint
  • By changing the properties of an endpoint

Note

This topic describes the syntax and arguments that are specific to ALTER ENDPOINT. For descriptions of the arguments that are common to both CREATE ENDPOINT and ALTER ENDPOINT (including all HTTP and TCP protocol-specific and SOAP, TSQL, SERVICE_BROKER, and DATABASE_MIRRORING payload-specific items), see CREATE ENDPOINT (Transact-SQL).

Topic link iconTransact-SQL Syntax Conventions

Syntax

ALTER ENDPOINT endPointName [ AUTHORIZATION login ]
 [ STATE = { STARTED | STOPPED | DISABLED } ]
AS { TCP | HTTP } (
   <protocol_specific_items>
        )
FOR { SOAP | TSQL | SERVICE_BROKER | DATABASE_MIRRORING } (
   <language_specific_items>
        )

<AS HTTP_protocol_specific_arguments> ::=
AS HTTP (
  [ [ , ] PATH = 'url' ]
  [ [ , ] PORTS = ( { CLEAR | SSL } [ ,...n ] ) ]
  [ [ , ] SITE = { '*' | '+' | 'webSite' } , ]
  [ [ , ] CLEAR_PORT = clearPort ]
  [ [ , ] SSL_PORT = SSLPort ]
  [ [,] AUTHENTICATION = ( { BASIC | DIGEST | NTLM | KERBEROS | INTEGRATED } [ ,...n ] ) ]
  [ [ , ] AUTH_REALM = { 'realm' | NONE } ]
  [ [ , ] DEFAULT_LOGON_DOMAIN = { 'domain' | NONE } ]
  [ [ , ] COMPRESSION = { ENABLED | DISABLED } ]
)

<AS TCP_protocol_specific_arguments> ::=
AS TCP (
  LISTENER_PORT = listenerPort
  [ [ , ] LISTENER_IP = ALL | ( 4-part-ip ) | ( "ip_address_v6" ) ]
)

<FOR SOAP_language_specific_arguments> ::=
FOR SOAP (
  [ { ADD WEBMETHOD [ 'namespace' .] 'method_alias' 
    (   NAME = 'database.owner.name'
      [ , SCHEMA = {NONE | STANDARD | DEFAULT } ]
      [ , FORMAT = { ALL_RESULTS | ROWSETS_ONLY | NONE} ]
    )  
  } [ ,...n ] 
  ]

  [ { ALTER WEBMETHOD [ 'namespace' .] 'method_alias' 
    (   NAME = 'database.owner.name'
      [ , SCHEMA = {NONE | STANDARD | DEFAULT} ]
      [ , FORMAT = { ALL_RESULTS | ROWSETS_ONLY } ]
    )  
  } [ ,...n] 
]
  [ [ , ] { DROP WEBMETHOD [ 'namespace' .] 'method_alias' } [ ,...n ] ]
  [ [ , ] BATCHES = { ENABLED | DISABLED } ]
  [ [ , ] WSDL = { NONE | DEFAULT | 'sp_name' } ]
  [ [ , ] SESSIONS = { ENABLED | DISABLED } ]
  [ [ , ] LOGIN_TYPE = { MIXED | WINDOWS } ]
  [ [ , ] SESSION_TIMEOUT = timeoutInterval ]
  [ [ , ] DATABASE = { 'database_name' | DEFAULT } ]
  [ [ , ] NAMESPACE = { 'namespace' | DEFAULT } ]
  [ [ , ] SCHEMA = { NONE | STANDARD } ]
  [ [ , ] CHARACTER_SET = { SQL | XML } ]
  [ [ , ] HEADER_LIMIT = int ]
)

<FOR SERVICE_BROKER_language_specific_arguments> ::=
FOR SERVICE_BROKER (
   [ AUTHENTICATION = { 
      WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ]
      | CERTIFICATE certificate_name 
      | WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ] CERTIFICATE certificate_name 
      | CERTIFICATE certificate_name WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ] 
    } ]
   [ , ENCRYPTION = { DISABLED 
       | 
         {{SUPPORTED | REQUIRED } 
       [ ALGORITHM { RC4 | AES | AES RC4 | RC4 AES } ] } 
   ]

  [ , MESSAGE_FORWARDING = {ENABLED | DISABLED} ]
  [ , MESSAGE_FORWARD_SIZE = forwardSize
)

<FOR DATABASE_MIRRORING_language_specific_arguments> ::=
FOR DATABASE_MIRRORING (
   [ AUTHENTICATION = { 
      WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ]
      | CERTIFICATE certificate_name 
      | WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ] CERTIFICATE certificate_name 
      | CERTIFICATE certificate_name WINDOWS [ { NTLM | KERBEROS | NEGOTIATE } ] 
    } ]
   [ , ENCRYPTION = { DISABLED 
       | 
         {{SUPPORTED | REQUIRED } 
       [ ALGORITHM { RC4 | AES | AES RC4 | RC4 AES } ] } 
    ] 
   [ , ] ROLE = { WITNESS | PARTNER | ALL }
)

Arguments

Note

The following arguments are specific to ALTER ENDPOINT. For descriptions of the arguments that are common to both CREATE ENDPOINT and ALTER ENDPOINT (including all HTTP and TCP protocol-specific and SOAP, TSQL, SERVICE_BROKER, and DATABASE_MIRRORING payload-specific items), see CREATE ENDPOINT (Transact-SQL).

  • ADD WEBMETHOD
    Adds a new method endpoint.

    Important

    When you use ADD WEBMETHOD to expose methods, you must make sure that, if more than one SQL Server database is serviced by the same HTTP endpoint, name overlaps do not occur. To prevent this, consider adding your registered domain name URL as part of the namespace path.

  • ALTER WEBMETHOD
    Alters the definition of an existing method endpoint.
  • DROP WEBMETHOD
    Drops an existing method endpoint.

Remarks

When you use ALTER ENDPOINT, specify only those parameters that you want to update. All properties of an existing endpoint remain the same unless you explicitly change them.

The ENDPOINT DDL statements cannot be executed inside a user transaction.

For information on choosing an encryption algorithm for use with an endpoint, see Choosing an Encryption Algorithm.

Note

RC4 is a relatively weak algorithm, and AES is a relatively strong algorithm. But AES is considerably slower than RC4. If security is a higher priority for you than speed, we recommend you use AES.

Permissions

User must be a member of the sysadmin fixed server role, the owner of the endpoint, or have been granted ALTER ANY ENDPOINT permission.

To change ownership of an existing endpoint, you must use the ALTER AUTHORIZATION statement. For more information, see ALTER AUTHORIZATION (Transact-SQL).

For more information, see GRANT Endpoint Permissions (Transact-SQL).

Examples

A. Adding a new method to an existing endpoint

The following example adds a new method to the previously created endpoint sql_endpoint.

ALTER ENDPOINT sql_endpoint
FOR SOAP
(
  ADD WEBMETHOD 'SayHello' (name='AdventureWorks.dbo.SayHello')
);

B. Adding a new method that operates in RAW SOAP mode

The following example adds a new Web method ReportUsageStats that operates in RAW mode, specified by FORMAT=NONE, to deliver results of a stored procedure as is to SOAP clients. For more information, see the description of the FORMAT option in CREATE ENDPOINT (Transact-SQL).

ALTER ENDPOINT sql_endpoint
FOR SOAP
(
  ADD WEBMETHOD 'ReportUsageStats' (name='myDatabase.dbo.sp_reportserverstats', FORMAT=NONE)
);

See Also

Reference

CREATE ENDPOINT (Transact-SQL)
DROP ENDPOINT (Transact-SQL)
EVENTDATA (Transact-SQL)

Other Resources

Sample XML Applications

Help and Information

Getting SQL Server 2005 Assistance