これは私の以前の質問です。アプリケーションのプルデータではなく、データベースからデータをプッシュする方法について。
リンクとドキュメントを調べた後、通知要求のためにアプリケーション側でクエリを作成する必要があることがわかりました。DB はサブスクリプションに要求を登録し、DB に変更がある場合はサブスクリプションをチェックします。リクエストがあれば、クライアントにメッセージを送信します。
このパラは上記のリンクからのものです
Along with the query submitted for the notification, the client submits a service name
and a broker instance. Each notification subscription begins a Service Broker dialog
with this provided service and broker instance. When data is changed and the change
would affect the result of the submitted query result, a message is sent on this
dialog. By sending this message, the client is considered notified and the notification
subscription is removed. If client desires to be notified on further changes, is
supposed to subscribe again.
今、通知要求のためにアプリケーション側でクエリを作成する方法がわかりませんsubmit a service and a broker instance
。また、上記のパラグラフからのスタンドも理解していません。通知要求のためにデータベースにクエリを実行する前に、アプリケーションでサービスとブローカーのインスタンスを作成する必要があると思います。もしそうなら、サービスとブローカーインスタンスを作成する方法は?
コマンドで DB サーバーのサブスクリプションを確認できますselect * from sys.dm_qn_subscriptions
。誰でも私を助けることができますか?