Questions tagged [sqldependency]

The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.

The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.

MSDN Documentation

454 questions
9
votes
2 answers

SqlDependency performance

I have a web application that use a SQL Server database that is shared with others web applications (over which I have no control). I must know when any of the web apps makes changes to some tables in the database. My first idea was to use…
Johna
  • 2,623
  • 3
  • 21
  • 36
9
votes
1 answer

How sql dependency works for passing data back & forth

1) i like to know how sql server establish a channel between client & db. i guess there must be a channel and that why sql server can send notification to client through that channel. please discuss this issue in detail. because i saw many article…
Thomas
  • 33,544
  • 126
  • 357
  • 626
8
votes
2 answers

How to apply Sql Dependency in ASP.NET MVC?

How can we apply Sql Dependency in Asp.Net MVC for cached objects?
Rishabh Ohri
  • 1,280
  • 4
  • 16
  • 28
7
votes
4 answers

Using SqlDependency results in constant updates

I pulled an example from this MSDN page and have used it pretty much verbatim. When run the code compiles properly but changeCount increments endlessly whether or not there has actually been a change to the data returned. When a change actually…
newuser
  • 173
  • 1
  • 16
7
votes
2 answers

Alternative for sqldependency

I have a mssql table that holds chat information. It has computed columns, has millions of rows and is being used/populated by an third party application. Now I want to use this table to show chat history on my website and possible in future have…
blaataap
  • 219
  • 2
  • 12
7
votes
3 answers

How to track changes in many SQL Server databases from .NET application?

Problem: There are a lot of different databases, which is populated by many different applications directly (without any common application layer). Data can be accessed only through SP (by policy) Task: Application needs to track changes in these…
7
votes
2 answers

SqlDependency issue with the asp.net

I am trying get the changed values from the sqlserver using the server_broker feature. my code is like below protected void Page_Load(object sender, EventArgs e) { GetData2(); } private void GetData2() { List lst = new List(); …
sakir
  • 3,391
  • 8
  • 34
  • 50
7
votes
5 answers

SqlDependency simple select query always returns "Invalid"

I'm trying to get the SqlDependency object to give me notifications, but so far I'm not able to get it working. the sql query that I'm sending is this: SELECT [SocialMedia].[dbo].[Items].[Id] FROM [SocialMedia].[dbo].[Items] I've tried it w/ and…
joe_coolish
  • 7,201
  • 13
  • 64
  • 111
6
votes
2 answers

SqlDependency tries to do something with log4net and fails to start

We are using SqlDependency in a .NET web app. Intermittently in production, we receive the following error when trying to call Start: NullReferenceException - Object reference not set to an instance of an object. Server stack trace: at…
cbp
  • 25,252
  • 29
  • 125
  • 205
6
votes
1 answer

Using SqlDependency in WCF Class Library project hosted as Windows Service

I have created a notification service using SqlDependency for notifying other services about the change in a particular table. This is done in the Windows Service template from Visual Studio. Hence in the OnStart event, subscription of SqlDependency…
Anuya
  • 8,082
  • 49
  • 137
  • 222
6
votes
2 answers

Instantiate SignalR Hub Object With IHubContext

It seems like a big use for SignalR Hubs is to display the actions of one client to all of the other clients. What I hope to use SignalR for is when a certain event happens in my server side code, I want to instantiate a hub object and invoke one…
Casey Daly
  • 383
  • 8
  • 25
6
votes
2 answers

SQL Dependency and SignalR in a 3 Tiered Architecture

We have a web application that consists of a a 3 layered back end (Controller/Biz/Data) with a UI. Our data layer is solely responsible for pulling the data out of the database instance (SQL), the business layer messages the data and creates…
mtsuggs
  • 91
  • 5
6
votes
1 answer

SqlDependency/Query notification - SQL Server reboot

I have an application running on a server which has a SqlDependency / query notification - monitoring changes on a table on a different server. It works fine until we reboot/restart SQL Server. When SQL Server is rebooted due to some maintenance and…
itsfighter
  • 167
  • 4
  • 15
6
votes
2 answers

What permissions are needed for SQLDependency?

What permissions are needed for using SQLDependency? I checked books online but it wasn't clear on this point.
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
6
votes
2 answers

Issue of multiple SQL notifications in ASP.Net web application on page refresh

I am facing an issue while using SQL Server Notifications. I am developing a web application in ASP.net where one of the page needs to be notified about new entries in one of the tables in a SQL Server database. I am using SQL Server Notification…
1
2
3
30 31