I have the need to have a client application connect to a remote database server for retrieval of large datasets (~13000 rows at time) and am trying to leverage existing technologies to build my solution.
To test the difference in retrieval times I created 2 test apps - testA and testB. I created an HTTP endpoint in SQL Server (2005) that exposes one web method corresponding to a sproc that executes one select query and configured testA to execute query and bind the results to a data grid. I exposed my SQL Server so that I could connect directly to the SQL Server using a connection string and configured testB to execute the same SQL statement in an ad-hoc fashion, binding the results to a data grid.
On average, the HTTP endpoint would take ~ 34 seconds to return the 13,000 row data set whereas the direct connection returned that same result set in 4 seconds or less.
I have a bunch of questions: * Why would I be seeing such a dramatic difference in the retrieval times? * How is SQL Server communicating when there is a direct connection? * What are the immediate disadvantages to connecting directly to the remote SQL Server? * If I were to consider allowing my client application to communicate directly with the SQL Server, is there any way to secure the communication without VPN? * In addition, is it even possible to create a SQL login that has all of these requirements? ** select and update only ** cannot view schema (cannot connect to the SQL Server using SQL Server Management Studio) ** cannot view any system tables ** cannot retrieve any information about the schema of the database whatsoever
I guess I'm wondering if there is a way to overcome the obvious serialization overhead that comes with the HTTP endpoint to get the speed of the direct connection while being secure at the same time. Is that being greedy? :P
Anyhow, what are your opinions? I'm very interested to hear experiences and/or advice.
I'd like to know how can I setup the SSL so I can secure my HTTP Endpoint.
I saw in the documentation that some settings such as SSL_PORT and PORTS should be set to SSL port number and SSL but I did not find out anywhere where they explain how to enable SSL.
Do we enable SSL the same way we enable it or SQL Server 2005 or does that have to be done through the MMC - Certificates.
I don't have any IIS server running on this server, so I was wondering if IIS is a requirement to generate and import the certificate.
I met some problems when I walk through a example for Native Http SOAP in SQL Server 2005 for Developers. after I create the HTTP EndPoint in the Management Studio using following code:
USE AdventureWorks GO
CREATE PROCEDURE EmployeePhoneList AS SELECT C.LastName, C.FirstName, C.Phone FROM Person.Contact AS C INNER JOIN HumanResources.Employee AS E ON C.ContactID = E.ContactID ORDER BY C.LastName, C.FirstName GO
DROP ENDPOINT HRService; GO
CREATE ENDPOINT HRService STATE = STARTED AS HTTP ( PATH='/HumanResources', AUTHENTICATION=(INTEGRATED), PORTS=(CLEAR) ) FOR SOAP ( WEBMETHOD 'EmployeePhoneList'(name='AdventureWorks.dbo.EmployeePhoneList'), DATABASE='AdventureWorks', WSDL=DEFAULT )
then I can see the web service is indeed created by using following cmnd,
SELECT * FROM sys.endpoints
SELECT * FROM sys.soap_endpoints;
SELECT * FROM sys.endpoint_webmethods;
but when I want to use the web service in the VS2005, I can't find it and add the web reference. Any help will be greatly appreciated. and could you please tell me how to check web services in the local computer? Thanks.
I appologise that incarnations of this topic have been posted several times on this forum, however I cannot find a scenario that is the same as my own so I've resorted to starting a new thread.
I can successfully create and connect remotely to an HTTP EndPoint on my Windows 2003 machine using Integrated security, the administrator username and password via my static IP address.
I have read that Windows XP SP2 supports HTTP EndPoints, and it would be much more convenient for me to be able to create EndPoints in XP, and connect remotely.
I have created the endpoint like so...
CREATE ENDPOINT sql_tvr10 STATE = STARTED AS HTTP( PATH = '/sql/tvr10', AUTHENTICATION = (INTEGRATED), PORTS = (CLEAR))
In visual studio I can retrive a list of services running at http://localhost/sql/tvr10?WSDL absolutely fine. However, in Visual Studio on the remote machine, I cannot connect to http://194.106.11.11/sql/tvr10?WSDL - it prompts me for a username and password, however I cannot select the username - it is set to "Athlon64Guest" (Athlon64 is my server computer name). I have no passwords on any of my windows accounts (except administrator), and I have no database passwords set.
Could someone please tell me how I should go about accessing the HTTP EndPoint?
Just so it is clear, I am running a small LAN with no domain, just a workgroup. I need the client application to be able to connect via http regardless of which network it is on. I am using VS2005 and SQL Server 2005 Dev Ed.
I am testing using Web Services from SQL Server 2005 and am having problems with IE Authentication when I try to retreive the WSDL.
The basic scenario is:
I create the Web Service and initially can view the WSDL using Http:ServernamePath?wsdl and also can consume the Web Service in a DotNet app. However after a period of 2 hours or more the the WSDl starts asking for authentication but I cannot determine what authentication or rights are required
In an earlier post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1175161&SiteID=1 Jimmy Wu mentions "IE prompted me for my user credentials and after entering the information I was able to retrieve the WSDL doc".
What are the user credentials required and how do you set permissions to avoid these. This forum post is the only place I have seen where any mention is made of some additional credentials being needed.
I need to enable digest authorization on an HTTP endpoint, because the integration tools for some java code that needs to connect to it does not support NTLM or kerberos - only digest and basic. I setup a test endpoint in order to test only digest authorization (as opposed to the final endpoint which needs both digest and integrated), but I can't even get that to work - when I point my browser to it to see the wsdl it pops up with the login box, but the login always fails.
I have the feeling I'm missing some very minor piece that will just make the whole thing work. Below are some log entries as well as the script to create the test endpoint I'm hitting. Any ideas are very welcome, I've banged my head on this one for far too long.
SQL Server error logs shows a "Error: 26026, Severity: 14, State: 1" entry followed by a "HTTP authentication failed" entry.
Event Log Security entry on the server:
Logon Failure:
Reason: An error occurred during logon
User Name: MyUserName
Domain: mydomain
Logon Type: 3
Logon Process: WDIGEST
Authentication Package: WDigest
Workstation Name: -
Status code: 0xC000006D
Substatus code: 0xC00000FE
Caller User Name: -
Caller Domain: -
Caller Logon ID: -
Caller Process ID: -
Transited Services: -
Source Network Address: -
Source Port: -
Test endpoint script:
CREATE ENDPOINT [DigestTest]
STATE=STARTED
AS HTTP (PATH=N'/DigestTest', PORTS = (CLEAR), AUTHENTICATION = (DIGEST), SITE=N'SRV001',
I created a HTTP-Endpoint on SQL Server 2005. Now I try to call this web service from a c# client but using SQL-Server authentication (i.e. my user is a sql server user but not a windows user). But it doesn't work. I can connect to the service using a windows user and NTLM authentication. But for some reasons Iwould much prefer if I could use SQL-Server authentication. Is it possible?
Here is how I created the endpoint:
Code Snippet CREATE ENDPOINT myService STATE = STARTED AS HTTP( PATH = '/services', AUTHENTICATION = (INTEGRATED ), PORTS = ( SSL ), SITE = '*' ) FOR SOAP ( WEBMETHOD 'GetStuff' (name='MyDB.dbo.FKT_getStuff', SCHEMA=STANDARD ), WSDL = DEFAULT, LOGIN_TYPE = MIXED, SCHEMA = STANDARD, DATABASE = 'MyDB', NAMESPACE = 'Services' ); GO
I created a HelloWorld like example using InforPath 2007 and endpoint with SQL Server 2005. Very simple example.
I created a stored procedure that took in one parameter, a datetime field. This parameter is then inserted into a db table that has two columns, an id column and a datetime column.
I took the store procedure just discribed to create an endpoint. Cool. The WSDL is showing, I'm feeling good.
I go to InfoPath and make it so that submit a datetime to the webmethod associated with the endpoint. The data table shows one more row has been added and it is the datetime I sent from InfoPath. YEA!! I go to the Event View and see that I have an error message. The message is HTTP authenticaiton failed. [CLIENT: 10.8.2.26]. Bummer!!
This does not make sense to me. I am able to update the targeted database table but I get an exception. I do not like exceptions nor warnings without an explanation. Does anyone have an idea why this is happening?
I had to give up for the project I am currently working because of time constraints. But in the future, for out-of-the-box functionality for proof-of-concept/prototyping, I would like to use endpoints.
I am just about ready to tear my hair out on this one, at this point you guys are my last resort! Wouldn't it be nice if I could go to bed and have an answer for me in the morning....
I've had a working HTTP endpoint using Basic Authentication over SSL for months in our development environment, but now I'm moving our application to a production server and I'd like to be able to use Digest Authentication in the clear instead so the processor doesn't waste cycles on the SSL decryption. I've spent hours fiddling with my endpoint to no avail.
This is the closest message relating to what I'm doing that I've been able to find: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1131251&SiteID=1
In my case, the SQL Server is joined to a domain that is entirely Windows Server 2003 - no Windows 2000, so support for Digest Authentication is a non-issue. I'm also explicitly doing a GRANT CONNECT on my endpoint to the domain user I'm using. Here is the top of my CREATE ENDPOINT DDL:
I am debugging using wfetch 1.3... I can get this to work using NTLM Authentication; sending a GET to my endpoint with the ?wsdlsimple querystring parameter returns my WSDL just fine.
But Digest just doesn't want to work! If I remove NTLM from my AUTHENTICATION directive and try using Digest with wfetch or from my (PHP) web service consumer I get an HTTP 401 no matter what I do. I've tried fiddling with the DEFAULT_LOGON_DOMAIN, AUTH_REALM, and anything else I can think of.
The errors I am sporadically finding in the SQL Server error log are:
HTTP authentication failed. [CLIENT: 192.168.245.238] from source Logon
Followed by:
Error: 26026, Severity: 14, State: 1. from source Logon
I can't find any detail about the second error.
........
Just occurred to me that I've also been trying to view my WSDL directly in IE, and this is what's causing the SQL error to be logged, not wfetch - that's why it appeared sporadically.
So, wfetch isn't causing an 'HTTP authentication failed' error, but Internet Explorer is... maybe Digest Authentication isn't implemented correctly in wfetch?
Regardless... I'm still not able to authenticate from IE or from my client, but this may shed some more light on the issue.
I looked online and couldn't find anything to help me make this change. I want to change the default URL for reporting services to another url. Is this possible? Any assistance would be greatly appreciated.
I have seen the other posts about how to use Microsoft.SqlServer.Dts.DtsClient to run a package and get back the DataReader results. But this fails when run from a client mahcine that does not have SSIS installed. I want to have this page on a web server run the package on a remote Sql Server machine and get back the results but have so far failed. Any one got this working?
protected void Page_Load(object sender, EventArgs e) { string path = @"C:Documents and SettingsBrandonMy DocumentsVisual Studio 2005ProjectsIntegration Services Project5Integration Services Project5FuzzyLookup.dtsx";
I am trying to consume the ReportingService2006.asmx web service in order to disable client side printing but i am getting an error that says:
The custom tool 'MSDiscoCodeGenerator' failed. Unable to import binding 'ReportingService2006Soap' from namespace 'http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices'
Anyone experience this problem or know of any workarounds?
I have setup SSRS 2000 and gotten it to work but I am having trouble with SSRS 2005. I can't access to reportserver anywhere on the network. The only way to get to reportserver is termserv into the server and hit it with http://localhost/reportserver The server is Windows 2003 server Standard Ed. running SQL 2005 SP2 and Sharepoint Portal Server 2007. Can somebody please help? Thank you.
After opening the Results Pane (though a query or open table); I frequently get the below message.
Is there any way to change the settings so the results pane will stay active for a long length of time?
Message
SQL Server Enterprise Manager
_______________________
Some time ago, you retrieved data from the database with the query or view whose name is XXXX. The returned rows appear in the Results Pane and the database continues to retain the result set in its local memory; which consumes valuable server resources. Because you have not recently used the Results pane, it will be AUTOMATICALLY CLEARED IN ONE MINUTE. The will empty the results pane, discard unsaved changes, and free resources on the database server. Then if you want to REESTABLISH the result set, you can rerun the query or view.
DO YOU WANT TO PROLONG YOUR WORK WITH THE RESULTS PANE AND CONTINUE TO CONSUME RESOURCES ON THE DATABASE SERVER?
I want this to default to Yes, without this message comming up and if I don't click yes fast enough, my results are gone. I kinow the work arounds, but how can I default this to Yes or so this message stops displaying.
I am trying to get my query to pull all the occurances where someone called 411 assistance. It pulls anything that has 411 in it right now, and I just need it to find where the number is just either '411' or '1411' and thats it. Here is what I have so far:
SELECT sum(PaidBalCost), sum(BonusBalCost), sum(ceiling((Cast(DurationSeconds as Decimal)/60))) as Minutes FROM VoiceCallDetailRecord WHERE CallDate >= '02/19/2007' and calldate < '03/19/2007' and (Left(Endpoint,3) = '411' or Left(Endpoint,4) = ('1411')) UNION SELECT sum(PaidBalCost), sum(BonusBalCost), sum(ceiling((Cast(DurationSeconds as Decimal)/60))) as Minutes FROM ZeroChargeVCDRecord WHERE CallDate >= '02/19/2007' and calldate < '03/19/2007' and (Left(Endpoint,3) = '411' or Left(Endpoint,4) = ('1411'))
we've gotten this to work from sqlclr and understand the dependence wcf has on the framework but still feel compelled to ask if somehow t-sql can send a message to a wcf endpoint without getting sqlclr involved. I've moved this question over here from the t-sql forum.
I have created an Endpoint based on a stored procedure that has a parameter of datatype XML. I have added a reference to the endpoint in a web project, I have no problems accessing but I do have a question on how to pass XML or an entire XML file to the XML datatype? How is this done in VB.net? I have loaded the XML file into a vb string but this is not compatible with the sql server xml datatype? Any examples anywhere?
I have two servers both installed sql server.The name of the servers are A and B respectively. The admin of sql server in A is 'domainuserA', and admin of sql server B is 'domainuserB'.
My purpose is create a mirroring for a database in server A, but i can establish endpoint in server A(network address can not be reached or does not exist), i have grant the 'connect to endpoint' permission to each login .
i past my code:
step1
Code Snippet --Server A, principal create database db_test backup database db_test to disk='\sharefolderdb_test.bak' with init
create endpoint endpoint1 as tcp(listener_port=5002) for database_mirroring (role=partner)
alter endpoint endpoint1 state=started
create login [domainuserB] from windows grant connect on endpoint::endpoint1 to [domainuserB]
step2
Code Snippet --Server B, mirror restore database db_test from disk='\sharefolderdb_test2.bak' with norecovery
create endpoint endpoint1 as tcp(listener_port=5002) for database_mirroring (role=partner)
alter endpoint endpoint1 state=started
create login [domainuserA] from windows grant connect on endpoint::endpoint1 to [domainuserA]
alter database db_test set partner='TCP://A.corp.com:5002'
--step3
Code Snippet ----Server A, principal
alter database db_test set partner='TCP://B.corp.com:5002'
this step return a error message:
The server network address "TCP://B.corp.com:5002" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.
I am trying to grasp endpoint security, or actually more security/certiicates in general, at the moment i am trying to write a distributed service broker app, all the examples i have seen use certificates for the endpoint authentication.
Why must one create a certificate at each endpoint? Why can i not create a single certificate and let all endpoints use it ?
As you can imagine of this app gets distributed to hundreds of places creating a certificate at each one is a mission?
So can i use a single certificate for all endpoints authentication?
Problem: Connections to SOAP endpoints never close even if app initiating call was shutdown several days earlier. Create Endpoint statement included at bottom
Questions: 1 Why? 2. Is there a configuration option I need to set?
[1] Client side: Multiple clients from XMLSpy running on XP Pro to WebSphere Process Server running on AIX
[2] Server side:
What is the MS SQL version? SQL Server 2005 SP2
What is the SKU of MS SQL? Enterprise
What is the SQL Server Protocol enabled? Shared Memory | and TCPIP
Does the server start successfully? YES If SQL Server is a named instance, is the SQL browser enabled? YES
What is the account that the SQL Server is running under? Domain Account Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? NO
Do you make firewall exception for SQL Browser UDP port 1434? In SQL2000, you still need to make firewall exception for UDP port 1434 in order to support named instance. NO [2a] Tool Used to Connect: Multiple clients from XMLSpy running on XP Pro to WebSphere Process Server running on AIX
[3] Platform:
What is the OS version?Windows 2003 SP2 Do you have third party antivirus, anti-spareware software installed? McAfee. Exceptions have been set in accordance with MS SQL Server documentation
ENDPOINT:
CREATE ENDPOINT [TestEndpoint]
AUTHORIZATION [AuthID]
STATE=STARTED
AS HTTP (PATH=N'/SqlSSL/testEndpoint', PORTS = (SSL), AUTHENTICATION = (BASIC),
I am unable to create endpoint in the Windows 2003 server using SQL 2005. I also tried reserving the namespace before CREATE but i still end up with this error
Msg 7806, Level 16, State 1, Line 1 The URL specified by endpoint 'zzzzzz' is already registered to receive requests or is reserved for use by another service.
Msg 7807, Level 16, State 1, Line 1 An error ('0x800700b7') occurred while attempting to register the endpoint zzzzzz.
My code looks loke this:
IF EXISTS ( SELECT name from sys.http_endpoints WHERE name = 'zzzzzz' ) DROP ENDPOINT zzzzzz GO
CREATE ENDPOINT zzzzzz
STATE = STARTED AS HTTP ( site='servername', path='/sql/zzzzzz', AUTHENTICATION=(INTEGRATED), PORTS = (CLEAR) ) FOR SOAP( WEBMETHOD 'http://servername/' . 'sp1' (NAME = 'dbName.dbo.sp1'), WEBMETHOD 'http://servername/' . 'sp2' (NAME = 'dbName.dbo.sp2'), WSDL = DEFAULT, BATCHES=ENABLED) GO -- End of Script --
The script that I use is correct and it works fine on my local machine (Windows XP). The user that I used to crete an endpoint on the server has 'sysadmin' level. The IIS was already turned off. Also I run the script by using the RemoteDesktop to connect to the server (Windows 2003) that has SQL Server 2005. If anyone has an idea about my problem, please help me !!! Thank You Zee.
can rs get xml data from a netTcp, wsHttp, or netPipe binding? I assume it can get it from basicHttp bindings since theyre are ws1.1.
Thanks!
oh also, if your return type for an operation contract is System.Data.DataSet, do you need to create a datacontract for DataSet and how? or is it automatically serialized into soap like the .net 2.0 webservices do?
When i type http://localhost/sql/provideinfo?wsdl into internet explorer, i just get a 404 page cannot be found error.
When i type http://server/sql/provideinfo?wsdl in to the browser i get a Page cannot be displayd error.
I get the same when i type http://myServerName/sql/provideinfo?wsdl
I get the same when i type http://sitename/sql/provideinfo?wsdl
Sql server is running under an account with admin access to the box and sa access to the sql server. what am i doing wrong here that i cannot view my wsdl. oh, the OS is vista.
Could it be a configuration issue that im not seeing?
I just want to be 100% sure about something. Certificates generated for use with service broker endpoints must be generated in the maste database, correct?
What are the implecations of the master key is changed for the master database ?