Title

Kodyaz Development Resources

Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Vista, etc.
Welcome to Kodyaz Development Resources Sign in | Join | Help





An error occurred while attempting to register the endpoint 'sql_endpoint'

If you try to run the Create EndPoint sample scripts on Books OnLine (BOL) on a SQL Server 2005 database, you may get the following error :

Msg 7890, Level 16, State 1, Line 1
An error occurred while attempting to register the endpoint 'sql_endpoint'.
One or more of the ports specified in the CREATE ENDPOINT statement may be bound to another process.
Attempt the statement again with a different port or use netstat to find the application currently using the port and resolve the conflict.
 

You can try and see whether you will get the same error by running the below script:


CREATE ENDPOINT sql_endpoint
STATE = STARTED
AS HTTP(
PATH = '/sql',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
SITE = 'ISTW1029
)
FOR SOAP (
WEBMETHOD 'GetSqlInfo' (name='master.dbo.xp_msver', SCHEMA=STANDARD ),
WEBMETHOD 'DayAsNumber' (name='master.sys.fn_MSdayasnumber'),
WSDL = DEFAULT,
SCHEMA = STANDARD,
DATABASE = 'master',
NAMESPACE = 'http://tempUri.org/'
);

GO

ISTW1029 is my server name.
 

The error description is more detailed in SQL Server 2005. It is indicating that one or more of the ports may be bound to another process. If you check the Books OnLine it is written that "Applications that are running under the local system account can bind to any namespace as long as it is free.".

An error occurred while attempting to register the endpoint 'sql_endpoint'.
One or more of the ports specified in the CREATE ENDPOINT statement may be bound to another process.
Attempt the statement again with a different port or use netstat to find the application currently using the port and resolve the conflict.
 

So port 80 is being used by another process which is more likely by IIS. If you stop the IIS Admin Service, you will see that you can run CREATE ENDPOINT statement successfully.

If you browse the url http://istw1029/sql?wsdl you will see the web service definition document. Although the IIS Admin service is not running.


Create EndPoint wsdl

Of course, stopping an IIS web site just because of CREATE ENDPOINT listens to the same port is not an suitable way of implementing EndPoint applications in SQL Server environments.
If you use PORTS = (CLEAR) option in the CREATE ENDPOINT t-sql statement, you can also define or specify the port number you want to be used with the SQL Server EndPoint. The default port number is 80.
You can use CLEAR_PORT = clearPort to identify or specify the port number for the sql server end-point you are creating.

CREATE ENDPOINT sql_FSBAppliances
STATE = STARTED
AS HTTP
(
SITE = 'localhost',
PATH = '/Appliances',
AUTHENTICATION = (INTEGRATED ),
PORTS = ( CLEAR ),
CLEAR_PORT = 8088
)
FOR SOAP (
WEBMETHOD 'efsb'.'ListAppliances'
(name='efsb.dbo.ListAppliances', schema=STANDARD ),
WSDL = DEFAULT,
BATCHES = DISABLED,
DATABASE = 'eFSB',
NAMESPACE = 'http://tempUri.org/'
);
GO




BlinkListBlinkList   Del.icio.usDel.icio.us   DiggDigg   FurlFurl   SimpySimpy   SpurlSpurl   DZoneDZone   ma.gnoliama.gnolia   ShadowsShadows  



Copyright © 2004 - 2008 Eralper Yilmaz. All rights reserved.
Powered by Community Server, by Telligent Systems