Showing posts with label communicate. Show all posts
Showing posts with label communicate. Show all posts

Friday, February 17, 2012

CREATE_ENDPOINT / HTTPRequest

I am trying to figure out how to communicate to some web clients when a
SQL Server table has changed. I am connecting to the database through
ADO embedded on the clients in web pages. I want to be able to refresh
data on the client only when needed. I have researched all sorts of
methodologies and it seams like the CREATE_ENDPOINT will allow for me
to create a connection where I can call some functions like;
getDataStatus and return to the client what date time the data last
changed and then allow my client to requery the database or, something
like, setAccessTime where the Client sends its last date time stamp
when It last queried for data and allow the server to send back the
requested dataset to the client.Synchronize clock, sync up the clocks
of the clients to server.
Any help would be greatly appreciated. DanHello Dan,
I don't think there's a great way to do this since Web Services is essential
ly
a pull rather than push approach. If you were working with traditional ASMX
functions, I'd suggest looking at SqlCacheDependency since that could "subsc
ribe"
to changes on a query without having to invest a lot in the infrastructure
of the solution. Your ASMX would cache the dataset (saving SQL Server genera
ting
it fresh or from cache) and would, more or less, automatically get updated
data whenever your query changed. You could then add your bits for tracking
when the last change was received.
There really shouldn't need to be a have the client do more periodically
"call home" and ask "have you got a new version of this data?" Use some seri
al
number approach instead of time so that you don't have to worry about timezo
ne
changes between the client and the server.
This probably works "better" in that it minimizes the load on SQL Server
and gives you a better programability model than just a native web service
does today. Not saying that these services aren't useful, but they are harde
r
to use concepts like SqlDepedency on.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Thanks, I think I understand what you are getting at. There are no real
provisions to push to clients any data without request from the client
unless you take advantage of new .net technology which will allow for
caching of data on querys, tables etc... and automatically update the
data every ' as set up within the SQL or is it web config. Anyway. I
think I may have my clients poll for a serial number from an END_POINT
and then get the data when the serial number is different from the
clients. Do you think this will work. I wasn't sure if you were saying
it would or would not work? Thanks.|||Hello Dan,

> Thanks, I think I understand what you are getting at. There are no
> real provisions to push to clients any data without request from the
> client unless you take advantage of new .net technology which will
> allow for caching of data on querys, tables etc... and automatically
> update the data every '
There a new set of features in SQL Server 2005, .NET 2.0 and ASP.NET 2.0
allow a client to subscriber to notifications of changes on the data underly
ing
a query. In .NET, its common to use SqlDependency for this. In ASP.NET 2.0,
its common to use SqlCacheDependency. These subscribe to server-side events
and allow processing of them on the client side. However, they currently
require an active TDS connection to SQL Server.
When you get the notification, you can then decide what you want to do. A
common choice is to recall your loading code and restart the dependency.

> as set up within the SQL or is it web config.
Some of both. Google on SqlCacheDependency for more information.

> Anyway. I think I may have my clients poll for a serial number from an
> END_POINT and then get the data when the serial number is different
> from the clients. Do you think this will work. I wasn't sure if you
> were saying it would or would not work? Thanks.
No, because the endpoint doesn't have a good way to keep track of a serial
number. I'm basically suggesting that if you want an optimized solution (in
this case), don't use endpoints, use ASMX instead.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Thank You, Ill look into it. Dan

Tuesday, February 14, 2012

Create user.....

Hi.
i want to create a user which can communicate with the sql server 2000
through any third party application e.g VB, Java etc, but the user cannot
login dirctly on EM or query Analyzer.
ThankxxxMuhammad Bilal (MuhammadBilal@.discussions.microsoft.com) writes:
> i want to create a user which can communicate with the sql server 2000
> through any third party application e.g VB, Java etc, but the user cannot
> login dirctly on EM or query Analyzer.
That is not possible. But if the applicaiton relies on stored procedures,
all the user needs is EXEC permission on the procedures. If the application
uses embedded statements, the user will have to have full permissions,
unless the application uses application roles.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I suggest "googling" for the words "trusted subsystem". In a Trusted
Subsystem model, you create a service which performs all of the actions
on the database. This service (many times it's hosted in IIS) runs
under a normal account which has privileges to access the database, and
it is responsible for enforcing the security of your transactions.
But the real answer to your question is "you can't". There's nothing
special about SSIS, EM, QA, or even your VB/Java app. They all connect
and interact with SQL Server in very similar ways.
Muhammad Bilal wrote:
> Hi.
> i want to create a user which can communicate with the sql server 2000
> through any third party application e.g VB, Java etc, but the user cannot
> login dirctly on EM or query Analyzer.
> Thankxxx
>