I'm using Delphi 10.3 and Advantage DataBase.
Here, I have used sp_SignalEvent method and then, used the TADSEvent which get triggered for all the ADS connected application and handled the operation based on the requests.
Is there any similar operation is present in SQL Server.?
SQL Server has Query Notifications:
Built upon the Service Broker infrastructure, query notifications
allow applications to be notified when data has changed. This feature
is particularly useful for applications that provide a cache of
information from a database, such as a Web application, and need to be
notified when the source data is changed.
Query Notifications in SQL Server
Working with Query Notifications
Detecting Changes with SqlDependency
Related
We have a table called Guest in an Azure SQL database. We also have a campaign management tool sitting behind an API on the providers cloud.
When a record is created, updated or deleted in the Guest table, we would like to call the API in order to update the campaign management tool with the latest information about the Guest.
Our initial idea was to hook up a database trigger to a C# .NET Azure Function, however, it looks like this is only supported in Cosmos DB.
We would prefer not to have an application running on a scheduled task that periodically checks for changes in the database and sends these changes to the API.
We have also been reading about creating CLR stored procedures but it looks like these are not supported in Azure SQL databases.
Looking forward to hearing ideas & suggestions.
I can think of a few ways to accomplish this.
[Unfortunately CLR is no longer supported in SQL Azure.]
One way is:
Turn Change Data Capture on, on your Guest table.
Create a server-less Azure Function that has a timer trigger. This function would use the CDC to determine what had changed in your table, and call your vendor API accordingly.
The server-less function is relatively lightweight compared to "an application running on a scheduled task".
You can also use Azure Logic Apps for this case.
There are some predefined trigger which helps to trigger
When an item is created
When an item is modified
Then using the Action to call your API
Refer here
This will be the simplest way that you can achieve your usecase.
You will have to migrate to Azure SQL Managed instances which supports CLR and Broker.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-transact-sql-information#clr
The SQL Server is a given.
I need to create a web UI that accesses the DB and refreshes itself automatically when the DB data changed, regardless of how it changed. This should be done without constant DB polling on the side of the UI.
I saw such a UI done in Java. Nevertheless it reacts only to changes originating from this particular Java UI. Data changes done in some external DB client, like SQL Server Management Studio, for instance, do not appear in the said Java solution.
Is it possible for a web UI to react to all changes, irrespective of their origin?
Ideally the UI should reside on a Linux server and should use Bootstrap. The SQL Server runs in a Windows environment in the same LAN.
If it's possible, what technology stacks would you recommend?
Thank you.
I want to send notification to windows application from oracle based on status of some activities running in oracle.
Approach that I could think.
Polling from application. But that could degrade the performance of production server.
Using UTL_SMTP in oracle where the back end process running in oracle will send an email. The app will have email client which will notify user based on the mail received.
But I know these are not good solutions. Does oracle support some standard event delegation model.
Recently Microsoft has come up with Signalr ( http://goo.gl/F8Rcmu ) which allow webclients to get updated based on activities on server.
Is there any way how can I achieve this with oracle and windows form application. Does oracle has support for broadcasting information to form applications or services.
Thank You.
What is the desired transport? (pure TCP or db connection)
Should it be synchronous or asynchronous? (Notification to be part of the db transaction)
You can use AQ(advanced queueing), SMTP, web services, continuous query notification, some more curious packages like DBMS_ALERT, DBMS_PIPE.
In Java world you would most probably use AQ acting as JMS(Java messaging system) provider.
I've got a SQLServer Database and an application (.NET) that configures data on that database. On the other hand, I've got an application (VC++) that reads that data from the database and must be 'informed' a soon as possible of any change in the data saved on the database.
I would like to receive a signal from the database engine when some data had been changed by the first app. Of course, I can code some kind of message that comunicates both apps but my question is if exists that mechanism (some kind of ultra-trigger that warns the other app) in SQLServer or in any API for accessing SQLServer (Native, OLE DB, or even ODBC)
PS: Apologize for my english
If your requirements include guaranteed delivery (e.g. no lost events) - you might want to consider an MSMQ based strategy.
Accessing MSMQ from Microsoft SQL Server
http://www.codeproject.com/KB/database/SqlMSMQ.aspx
Microsoft Support Knowledge Base Article: 555070
Posting Message to MSMQ from SQL Server
http://support.microsoft.com/kb/555070
You can use a SQL Agent Job that will notify the other app starting it with sp_start_job. Check this out.
Is it possible to get notifications using SQL Server Reporting Services? Say for example I have a report that I want by mail if has for example suddenly shows more than 10 rows or if a specific value drop below 100 000. Do I need to tie Notification Services into it and how do I do that?
Please provide as much technical details as possible as I've never used Notification Services before.
Someone also told me that Notifications Services is replaced by new functionality in Reporting Services in Sql Server 2008 - is this the case?
I'd agree with Simon re Notification Services
Also, data driven SSRS Subscriptions are not available unless you use Enterprise Edition (and isn't available if you use SharePoint Integrated Mode).
An alternate way would be to create an Agent job that runs a proc. The proc could check the conditions you require and kick off the subscription if they are met using:
exec ReportServer.dbo.AddEvent #EventType='TimedSubscription', #EventData='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx'
Where the #EventData is the ID of the subscription in dbo.Subscriptions.
This will drop a row in [dbo].[Event]. The Service polls this table a few times a minute to kick off subscriptions.
Really, this isn't far from what happens when you set up a new Subscription, might even be easier to create a Subscription in the Report Server site, find which agent job was created (the ones with GUID names) and edit the T-SQL.
Hope this helps
I wouldn't go down the ntofications services route - it is pretty much a deprecated feature of SQL Server and even if it is around in future it will stagnate. So don't build a dependency on it.
Depending on your needs a data driven SSRS subscription to e-mail you the report would probably work.
http://msdn.microsoft.com/en-us/library/ms159150(SQL.90).aspx
Sending mail using SSRS subscription to your data driven report
A data-driven subscription is composed of multiple parts. The fixed aspects of a data-driven subscription are defined when you create the subscription, and these include the following:
The report for which the subscription is defined (a subscription is always associated with a single report).
The delivery extension used to distribute the report. You can specify report server e-mail delivery, file share delivery, the null delivery provider used for preloading the cache, or a custom delivery extension. You cannot specify multiple delivery extensions within a single subscription.
The subscriber data source. You must specify a connection string to the data source that contains subscriber data when you define the subscription. The subscriber data source cannot be specified dynamically at run time.
The query that you use to select subscriber data must be specified when you define the subscription. You cannot change the query at run time.