query-notifications

SQL Server Query Notifications in JAVA

。_饼干妹妹 提交于 2020-01-02 06:37:18
问题 I've been searching online for a while, but with no luck so far. Is it possible to implement this in JAVA http://www.codeproject.com/Articles/144344/Query-Notification-using-SqlDependency-and-SqlCach? Is it supported by JDBC for SQL Server 2012? Thanks in advance! 回答1: You want to listen to SQL server notifications. You can configure MSSql Server to notify a Broker. There is Apache ActiveMQ as an open source solution. So you need to connect MSSql Server to your broker and use JMS

How to figure out which SQLDependency triggered change function?

冷暖自知 提交于 2020-01-01 17:26:08
问题 I'm exploring query notifications with the SQLDependency class. Building a simple working example is easy, but I feel like I'm missing something. Once I step past a simple one-table/one-dependency example I'm left wondering how can I figure out which dependency triggered my callback? I'm having a bit of trouble explaining, so I included the simple example below. When AChange() is called I cannot look at the sql inside the dependency, and i don't have a reference to the associated cache object

I want my database (SQL) to notify or push updates to client application

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 22:36:22
问题 I was developing this application on VB.net 2010 and SQL 2008 . I wanted the clients to be notified for updates on the db, and the application used to check the db for changes in the specified minute using a timer, which really is not efficient. I read about query notification , sqldependency , service broker , but then I read something that said they might not be efficient if I have 100 clients and I'm using query notifications to push notifications to my application. Would someone help out

Is there a scalable alternative to SQL Server Query Notifications for raising events in an application from SQL Server?

╄→гoц情女王★ 提交于 2019-12-10 16:14:14
问题 SQL Server Query Notifications is a great tool, but it doesn't seem built to scale very well. Every application that wants/needs notifications has to keep an open connection to the database for the duration of the time it wants notifications (typically the entire time the application is running). I am open to creative solutions. Off the top of my head I just thought of putting a service on the server that would subscribe to SQL Server Query Notifications which could then notify the client

SqlDependency vs constant polling of a SQL Server database

最后都变了- 提交于 2019-12-07 22:41:11
问题 I am currently working on an email application where I have to monitor the table for any new record inserts and send email notification for each row. Right now the changes (inserts) will be at low rate but eventually it will become more. Initially I was thinking about using a SQL Server job to query every 3-5 mins and then I looked into the SqlDependency but I am not sure whether SQL dependency / query notification will be the correct option for my requirement. If there's an insert every

Service Broker messages start to get hung up after about a day

强颜欢笑 提交于 2019-12-06 02:47:24
问题 I have an application that is using the Service Broker is SQL 2008. About once a day the database's performance starts take a noticeable hit and I have determined that this is because of the Service Broker. If I hard reset all broker connections using the following commands: ALTER DATABASE [RegencyEnterprise] SET OFFLINE WITH ROLLBACK IMMEDIATE ALTER DATABASE [RegencyEnterprise] SET ONLINE Then the performance returns to normal until about the next day. I have also noticed that when

SQL Server Query Notifications in JAVA

北城余情 提交于 2019-12-05 12:06:58
I've been searching online for a while, but with no luck so far. Is it possible to implement this in JAVA http://www.codeproject.com/Articles/144344/Query-Notification-using-SqlDependency-and-SqlCach ? Is it supported by JDBC for SQL Server 2012? Thanks in advance! You want to listen to SQL server notifications. You can configure MSSql Server to notify a Broker. There is Apache ActiveMQ as an open source solution. So you need to connect MSSql Server to your broker and use JMS implementation to listen & retrieve notifications in java from the broker. The question now is : is it possible to

Service Broker messages start to get hung up after about a day

爱⌒轻易说出口 提交于 2019-12-04 07:36:00
I have an application that is using the Service Broker is SQL 2008. About once a day the database's performance starts take a noticeable hit and I have determined that this is because of the Service Broker. If I hard reset all broker connections using the following commands: ALTER DATABASE [RegencyEnterprise] SET OFFLINE WITH ROLLBACK IMMEDIATE ALTER DATABASE [RegencyEnterprise] SET ONLINE Then the performance returns to normal until about the next day. I have also noticed that when performance is poor, running the following query returns a large number (around 1000 currently) of conversations

How to push the data from database to application?

眉间皱痕 提交于 2019-11-29 04:43:29
I want to push the data from database to application instead of application pull the data. I have installed ms sql server and apache tomcat server. I have my application in apache tomcat, here I made connection to database. Now I want database send the data whenever there is update in data. But all I know is fetch the data from database is not good idea, because application needs to monitor the database for updated data will lead to fire the query for every 5 sec, this is not efficient as well. I google it I got some answers they are Query Notification here , Sql server Agent Job to schedule

I want my database (SQL) to notify or push updates to client application

半世苍凉 提交于 2019-11-28 20:28:35
I was developing this application on VB.net 2010 and SQL 2008 . I wanted the clients to be notified for updates on the db, and the application used to check the db for changes in the specified minute using a timer, which really is not efficient. I read about query notification , sqldependency , service broker , but then I read something that said they might not be efficient if I have 100 clients and I'm using query notifications to push notifications to my application. Would someone help out on what I should do, and how I can do it (would be really helpful if examples are available). Thanks in