SQL Service Broker To Send Message To SSRS

Jan 23, 2008

Hi All,
I want to send notification to SSRS on change in database for that I am using SSB to send message to SQL Server Reporting Services.
Can I use SSB and if yes, how? Please guide me I am new to this.

Thanks,
Omkar.

View 1 Replies


ADVERTISEMENT

Service Broker TO Service Could Not Be Found Message Origin: Transport

Mar 30, 2007

I am trying to send a message between to SQL Server 2005 instances on two different machines. I have checked all my routes and all my objects appear to be setup correctly. However, when running Profiler on the target machine, I receive the "This message has been dropped because the TO service could not be found. Service name: "[tcp://mydomain.com/TARGET/MyService]". Message origin: "Transport". This is my activated stored procedure that is sending the message to the target service. I am using certificate security. Any help appreciated....



CREATE PROCEDURE [usp_ProcessMessage]

AS

BEGIN

SET NOCOUNT ON;

DECLARE @conversation_handle uniqueidentifier

DECLARE @message_body AS VARBINARY(MAX)

WHILE (1=1)

BEGIN

BEGIN TRANSACTION;

WAITFOR(RECEIVE TOP (1)

@conversation_handle = conversation_handle,

@message_body = message_body

FROM [tcp://mydomain.com/INITIATE/MyQueue]

), TIMEOUT 1000;

IF (@@ROWCOUNT = 0)

BEGIN

COMMIT;

BREAK;

END

END CONVERSATION @conversation_handle

IF @message_body IS NOT NULL

BEGIN



BEGIN DIALOG CONVERSATION @conversation_handle

FROM SERVICE [tcp://mydomain.com/INITIATE/MyService]

TO SERVICE '[tcp://mydomain.com/TARGET/MyService]'

ON CONTRACT [tcp://mydomain.com/INITIATE/MyMessage/v1.0]

WITH ENCRYPTION = ON, LIFETIME = 600;

SEND ON CONVERSATION @conversation_handle

MESSAGE TYPE [tcp://mydomain.com/TARGET/VisitMessage]

(@message_body);

END

COMMIT;

END

END

GO



My endpoints are created like so:



CREATE ENDPOINT MyEndpoint

STATE = STARTED

AS TCP

(

LISTENER_PORT = 4022

)

FOR SERVICE_BROKER (AUTHENTICATION = CERTIFICATE MasterCertificate)

GO



GRANT CONNECT TO CertOwner

GRANT CONNECT ON ENDPOINT::MyEndpoint TO CertOwner

GO



And my routes like so:



GRANT SEND ON SERVICE::[tcp://mydomain.com/INITIATE/MyService] TO CertOwner

GO

CREATE REMOTE SERVICE BINDING [MyCertificateBinding]

TO SERVICE '[tcp://mydomain.com/TARGET/MyService]'

WITH USER = CertOwner,

ANONYMOUS=OFF

CREATE ROUTE [tcp://mydomain.com/INITIATE/MyRoute]

WITH SERVICE_NAME = '[tcp://mydomain.com/TARGET/MyService]',

BROKER_INSTANCE = N'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',

ADDRESS = N'TCP://xxx.xx.xx.xx:4022'

GO

View 10 Replies View Related

Using Service Broker To Send Certificates

Jun 18, 2007

Hi,

The project I'm currently working on has to be relatively simple for the users to install, so I had the idea of using service broker to "set itself up". The idea is that there will be a server with a service and suchlike already set up. Somehow the clients will get the information required to create a remote service binding, and once that has been accomplished will send a registration message to the server.

What I'm wondering is can I somehow create and send a certificate using service broker via t-sql, and also is this approach reasonable or is it a bad idea. The reason I had thought of something like this is because the people setting up the client sites may (and probably will) have very little knowledge (probably no sql server knowledge) so we need the installation to basically be a click and install.

Thanks in advance,

Adam

View 1 Replies View Related

Send Email Using Service Broker

Feb 12, 2008

Hi,
i have a service broker application that i send message to the queue and a specific SP reads the message and process it, part of this processing is sending the information found on that message to a specific email accounts. this means i have two service broker applicatins, one for my business (sending messages to queue to be processed and the secound one is the SendEmail service)

when i send email using the SP "msdb.dbo.sp_send_dbmail" the email is recieved 100% true, but when i come to send the email through the SP which recieve the messages from the SB queue, the email is not sent and i dont know where it goes.

this means that i cant read from a queue and send to another one at the same time... can you help me in this!

-Rana

View 8 Replies View Related

Service Broker Table Copy, File Send?

Aug 22, 2006

Hi There

I have a table at my initiator, i have a copy of this table at my target, every morning i want to refresh the table at the target with the data from the initiator via service broker.

What would be the best way to do this?

One major consideration would be that this table would be very large +- 1.6 million rows.

I was thinking of exporting the table to file like a csv, compressing the file and then sending it via service broker. Then at the target i would uncompress and bulk copy the data into the table at the target.

But can this be done?

How would one go about sending a file via service broker?

For example if i wanted to send a .csv or something via service broker how would i do it?

I know i can send binary data, but i would have to equate the msg to a file on disk, and how exactly would a recieve this file on the other side and make sure it went to disk at the target, i am guessing it is a mixture of xp_cmdshell and service broker.

Can this work?

Or is there a much simpler way? Any thoughts would be appreciated.

Thanx

View 6 Replies View Related

Service Broker: Trigger On New Message

Jul 13, 2007

Hi,



I have a small problem with my two databases ( A and B ).



On database A I have a queue set up for receiving messages from a service broker which are sent via a stored procedure from database B ...



Each time a message hits the queue on database A I would like to run a stored procedure that takes the message and actions it.





I have my stored procedures in place but can't figure out how to trigger a procedure each time a message is received. I have read this ( http://technet.microsoft.com/en-us/library/ms171601.aspx ) but would really appreciate someone posting an example of setting up queue activation.



Many thanks



Chris

View 1 Replies View Related

App Receiving Options Message From Service Broker

Nov 2, 2006

I have an app receiving messages from SQL Service Broker when data is updated. (Messages are located at http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlnotificationinfo.aspx )

When I run this app against a remote SQL Server, I receive the message "Updated" which I expect.

But when I run the same app against the local machine SQL Server, I receive the message "Options".

Does anyone know if there are SQL Server options that must be set to certain values?
I can't seem to find anything that troubleshoots this message... either from a SQLServer- or a .NET standpoint.

View 7 Replies View Related

Can Service Broker Process A Email Message

Feb 28, 2006

How do you set up the service broker to process an email message, and how do you format that message and send it to the que.



Can the service broker alos process an html form from a que.



Thanks

View 1 Replies View Related

Service Broker Message Dispatcher Error

Apr 9, 2008

One of my customers' SQL Server 2005 databases, which was set up to receive messages from another SQL Server 2005 database on another server has been re-installed by the customer and now the message passing no longer works. After recreating the End Point and re-enabling the Service Broker on the target database, I am now getting messages in the SQL Server error log.

An error occurred in the service broker message dispatcher, Error: 15581 State: 3.


and

Error: 9644, Severity 16, State: 14.


The two errors repeat alternately ad nauseum.
Running a trace on the target database server, for the Broker:Message Undeliverable, gives an endless stream of these entries:

This message could not be delivered because an internal error (code 15581, state 3) was encountered while processing it. Check the error log for more information.


Any ideas on how to fix this system?

View 4 Replies View Related

Message Could Not Be Delivered Errors In Service Broker

Apr 17, 2007



Hi,



I am using service broker in between two database servers. following is the way i am sending and receiving messages



Send



BEGIN TRAN
BEGIN DIALOG CONVERSATION @handle
FROM SERVICE @SendService
TO SERVICE @ReceiveService
ON CONTRACT @Contract
WITH LIFETIME = @lifetime;

SEND ON CONVERSATION @handle
MESSAGE TYPE @xmlMessageType(@xmlMessage);
COMMIT



Receive



BEGIN TRAN;
RECEIVE TOP(1) @xmlMessage = message_body,
@handle = conversation_handle,
@message_type = message_type_name
FROM TransactionQueue;

----------------------------------------------------------------------------------------------------
-- Check to make sure a message was returned to process. In theory this should never happen.
----------------------------------------------------------------------------------------------------
IF @@rowcount = 1
BEGIN

IF @message_type = 'http://schemas.microsoft.com/SQL/ServiceBroker/EndDialog'
BEGIN
END CONVERSATION @handle;
COMMIT
RETURN 0
END

IF @message_type = N'http://schemas.microsoft.com/SQL/ServiceBroker/Error'
BEGIN
RAISERROR(N'Received error %s from service [Target]', 10, 1)
END CONVERSATION @handle;
COMMIT
RETURN 0
END


SET @sql = 'EXEC '+@message_processor_name+' @xml'

BEGIN TRAN
EXEC sp_executesql @sql, N'@xml XML', @xml=@xmlMessage
COMMIT TRAN
END CONVERSATION @handle;
END
COMMIT



I see Messages are delivered to the target every thing working fine other than following errors which i am seeing in profiler.



1) "This message could not be delivered because the conversation endpoint has already been closed." I see this error on initiator end. Is it like ending conversation on initiator end when i get "EndDialog" send an acknowledgement, which cannot be recieved by target as it has already ended conversation.



2) "An error occurred while receiving data: '64(The specified network name is no longer available.)'." I don't have much idea about the reason for this error. But in profiler i see value for GUID is different for this error and the real message.



Let me know if you need any other information



View 4 Replies View Related

Service Broker Sending Message To Self. Start Conversation With Self

Jan 29, 2008

I've got a situation where I want to put request message on a queue. Because starting a conversation is the only way to put messages on a queue I have to start a conversation with myself. So my Begin Dialog Statement looks something like this:



DECLARE @conversation_handle UNIQUEIDENTIFIER;

BEGIN DIALOG CONVERSATION @conversation_handle

FROM SERVICE [ServiceName1]

TO SERVICE 'ServiceName1'

ON CONTRACT [ContractName1]

WITH ENCRYPTION = OFF;

SELECT @conversation_handle AS ConversationHandle



I haven't noticed any problems with doing this but I wanted to know if there was anything wrong with it. Does someone know what problems this might cause?

View 4 Replies View Related

Service Broker Message On Remote Instance Not Working

Feb 14, 2006

I was trying to send a message on a different instance in the network using service broker. I have created the endpoint and route both the side. I could see that the messages are in the transmission_queue in the sender side with no error in the status.

What could be the reason.

I am doing the following:
CREATE ROUTE inst02
WITH
SERVICE_NAME = 'SERVICE2',
ADDRESS = 'tcp://10.14.43.149:2341'

in the send script i am using this:
BEGIN DIALOG CONVERSATION @dialog_handle
FROM SERVICE [SERVICE1]
TO SERVICE 'SERVICE2'
ON CONTRACT [MainContract] WITH ENCRYPTION = OFF ;

in the sending side if i change the endpoint's authentication as windows kerberos , then i get thefollowing error in the transmission queue:

"Connection handshake failed. An OS call failed: (8009030e) 0x8009030e(No credentials are available in the security package). State 66."

I also have given access to the remote user on this endpoint(on the recever side) using this :
GRANT CONNECT ON ENDPOINT::Endpoint_test to paras

I am executing the sending side send script using the same user wich has access to the remote endpoint.

Can some one resolve this issue.

Thanks

View 9 Replies View Related

In Service Broker Message Dialog Security Is Not Available For This Conversation...

Jul 23, 2007

when ever I send my message thru Service Broker I am getting an error message like this "



"Dialog security is not available for this conversation because there is no remote service binding for the target service. Create a remote service binding, or specify ENCRYPTION = OFF in the BEGIN DIALOG statement."



This I found in sys.transmission_queue

Please reply with your comments

View 1 Replies View Related

CLR Trigger -&&> Send Insert/Update/Delete Message To Windows Service

Feb 1, 2007

Hi,

I have an c# windows service, which is running on the same machine where my mssql server is installed. This service must be informed for each insert/update/delete event on one specific table.

My idea was to create an CLR Trigger for this table which can communicate with this service via .NET remoting. But the problem is, that the system.runtime.remoting assembly is not integrated within the mssql clr enviroment => i can't use remoting.

Are there any other idea's how can i solve this?

Best regards,
Thomas

View 2 Replies View Related

How To Prevent The Hang On The Initator Service Broker If The Target Service Broker Is Not Started?

Sep 10, 2007

How to prevent the hang on the initator service broker if the target service broker is not started?

Our case has two service brokers (two databases), sometime, the target is need to turn off. But the sitation is the initator service broker (in fact, the message is sent from triggers) become hang, I want to prevent this case and continue to operation, and the messages should queue and will continue to send to target service broker when it startup. How should I do?

View 3 Replies View Related

The SQL Server Service Broker For The Current Database Is Not Enabled, And As A Result Query Notifications Are Not Supported. Please Enable The Service Broker For This Database If You Wish To Use Notifications.

Feb 16, 2008

Hello,          I receive this error  "The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.  Please enable the Service Broker for this database if you wish to use notifications." I attach the database in Management Studio to query and enable the broker using the scrip below but to no avail. ALTER DATABASE DataName SET ENABLE_BROKER ‘''<<------successfulandSELECT is_broker_enabled FROM sys.databases WHERE name = 'Database name' ‘'''<<-------value is 1 Global.asax ...    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)        System.Data.SqlClient.SqlDependency.Start(ConfigurationManager.ConnectionStrings("dataConnectionString1").ConnectionString)    End Sub...Web.config ...    <connectionStrings>        <add name="dataConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|jbp_data.mdf;Integrated Security=True;User Instance=True"         providerName="System.Data.SqlClient" />        <add name="ASPNETDBConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True"         providerName="System.Data.SqlClient" />    </connectionStrings>... Hope you could help.  cheers,imperialx 

View 1 Replies View Related

Architectural (broker) Place Of SQL Service Broker

Apr 5, 2007

Hi,



I am struggling with the position SSB could take in an SOA. If I would want a broker in the general sense, meaning an intermediary sitting between applications which exchange information through messaging, would SSB be a good candidate? I know Biztalk is probably the primary candidate, but in my scenario I would end up with Biztalk apps with empty orchestrations. Also, I think Biztalk is more expensive to manage. So I am looking for a lightweight broker for a simple SOA targeted at application interoperability, no fancy business processes in sight.



I look forward to some responses.



Kind regards,

Neeva

View 2 Replies View Related

Broker:Corrupted Message

Feb 28, 2006

Hello,

Has anyone seen this in profiler? I have two brokers on different servers with one of them being the initiator. All messages end up sitting in the initiator's transmission queue. Profiler on the target broker's machine displays this for every attempt to send by the initiator:

A corrupt message has been received. The End of Conversation and Error flags may not be set in the first sequenced message. This occorred in the message with Conversation ID '...', Initiator: 1, and Message sequence number: 0

In case it's relevant encryption is disabled and endpoints on both servers use windows authentication.

Any hints are greatly appreciated.

Regards,

Svega

View 17 Replies View Related

Broker Message Classification Trace

Sep 30, 2007

In profiler i see next error:

"The message could not be delivered because it could not be classified. Enable broker message classification trace to see the reason for the failure."

Where and what should I enable? I enabled all in "Broker event category" of the profiler.

Thanks

View 4 Replies View Related

Service Broker And .net Windows Service

Sep 26, 2007

I am doing some research to see if the Service Broker technology would help my company with our Enterprise application. Here is our scenario: We have a 3 tier system. The first tier needs to contact the second tier asynchronously. Hence, using queues is a good option. However, the process that needs to happen on the second tier is mostly process intensive with little database updates. Is it still worth our time to use Service Broker?

I like the concept of Activation that Service Broker provides. But, from what I am reading most of the documentation describes activation as a way to call another stored proc. I definitely dont' want to do any process intensive work on the SQL server. So here comes my question...

How would I use a windows service to listen to the activation event from the Service Broker. I could have multiple windows services watching the same queue (scalable). Would I have to handle collisions myself? If so, I think I would rather keep it simple, and just use a simple table as my queue.

Thanks for your comments in advance...
Vijay.

View 3 Replies View Related

Net Send Message

Nov 9, 2000

Hi,

I know that is possible to programmatically send an e-mail with the command xp_sendmail, but i want to know if it's possible to programmatically send a Net Send message.

Martin

View 1 Replies View Related

Trying To Send Message In SQl Jobs

Jul 13, 2001

I'm trying to figure out how the SQL Agent sends email through jobs using the notification option for operators. I have had little success using SQL mail so I want to use an alternate such as blat. I have not been able to find where the SQL jobs are actually sending the mail. Can someone help please. OI have checked the system stored procedures without suscess. I'm using SQL2000.

Thanks,
Steve

View 1 Replies View Related

Sp To Send A Message To A User ?

Sep 23, 2006

Do you know a stored procedure ( or a query) to send a message to a SQLServer user ?

Something like NET SEND but with a spid user

Thanks

View 4 Replies View Related

Trying To Send Message To User

Jan 14, 2004

I am having a problem getting informational type messages to display for my end users.

I have a SQL2000 db with a Delfi front end. When I issue either the raiserror or print nothing is displayed inside the app. With raiserror I can get it to display if I make the severity higher than 10. The problem with this is that it stops the app from processing the transaction. This is ok in one case but not with just informational type stuff. Any suggestions? Thanks.

Jim

View 1 Replies View Related

Can We Send A Blob In A Message.

Sep 20, 2006

Say i want to send a blob in a message from queue A to queue B. These locations can be geographically different. How can i implement this ?

Also anything which i want to send as a message should be stored in the database. and then I should store it in a variable. this can be used as the message body. am I right ?

View 7 Replies View Related

SQL Service Broker

Apr 5, 2008

Hi to all,           I want to study Sql server Service broker, have some questions1. What is the use of service broker ?2. Where this will use ? (With example)3. How to enable Service broker? Because i have sql server 2005 version but no folder like service broker. 

View 2 Replies View Related

Service Broker Example.

Aug 29, 2006

Im having a hard time understanding everything required to create a simple Service Broker example. Can someone please assist? Source code would be ideal, but if not "do this, do that" would even be helpful.

Thanks.

View 1 Replies View Related

Service Broker

Sep 8, 2006

I am trying to implement service broker. I send a message from my application code to the database to execute a specific stored procedure. How do i return the result set obtained by the execution of the stored procedure to the application.

View 4 Replies View Related

Service Broker

May 16, 2006

My service broker seems to be broken... The database was restored from another crashed server but i have tried the

ALTER AUTHORIZATION ON DATABASE::[SPYDERONTHEWEB] TO [SA];

The error i'm getting is



Service Broker needs to access the master key in the database 'SpyderOnTheWeb'. Error code 25. The master key has to exist and th service master key encryption is required.

Error: 28054, Severity 11, State: 1.

View 4 Replies View Related

Service Broker And NAT

Sep 26, 2006

Hi

It will be great to have an update on MS plans to solve the problem of using
Service Broker for remote users who sit behind the NAT.
Any news will be appreciated.

Leonid.

View 1 Replies View Related

Service Broker

Sep 11, 2006

Hello , I am trying to Implement distribution of the Stock Quotes over the LAN(only within the Network) and showing the live changing stock Quotes on the front end (in datagrid) installed at each clients desktop.I am receiving the Stock prices over the TCP / IP from the Stock Exchange. I am recieving atleast 10-15 messages per second over the TCP / IP from the Stock Exchange. Now i need to distribute this feed to Each connected client.

I tried doing it from TCP / IP , but in vein. Can we install the SQL 2005 Database Client Version on every client and use Service broker instaed of Live TCP / IP connections programmatically?

Ideally Can i dump the meesages from Stock Exchange in to each connected client's database locally and each front end application will keep a record of all the incomming messages.i.e Front end have a notification event , it will referesh the Datagrid in Front end accordingly...

ALL my front end application are made in dot net

Pls suggest if this above workflow will help me

Yugant







View 2 Replies View Related

Service Broker + .Net 1.1

Jan 8, 2008

Hi,

Is it possible to develop Service Broker in .Net 1.1 (VS 2003)? Currently I have a project developed in .Net 1.1 and I want to add a new method utilize the message queue concept (instead of using MSMQ, using Service Broker SQL 2005), although my DB is SQL server 2005.

Thanks,

View 1 Replies View Related

How To Use Service Broker And When

Jul 3, 2007

Hi all



if any one have any white paper or artical cover this issue kindly i need it



thanks , regards

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved