Conversation Lifetime After Close

Oct 18, 2006

Given that the conversation states are as follows: (Thanks Rushi!)

Event Initiator Endpoint state Target Endpoint state






BEGIN DIALOG SO --
from Initiator
to Target

SEND message(s) CO --
from Initiator
to Target

Target receives a fragment CO SI
of the first message sent
or receives out of order
message

Target received entire CO CO
first message

END conversation at CO DO
target

Initiator receives EndDialog DI DO
message from target

Target receives ACK for the DI CD
EndDialog message sent

END conversation at CD CD
Initiator

When does the 30 minute timer start for clearing the conversation from the sys.conversation_handles table? Is it the same for both sides (initiator and Target) ie, the end conversation at the Initiator. I guess it must be just in case a resend is necessary.

Gary

View 2 Replies


ADVERTISEMENT

Conversation LIFETIME

Jul 13, 2006

I have a conversation that I want to know has not ended so I am using LIFETIME.

When the conversation times out I then have three records in the queue.

1. The original conversation record that has not been received.

2. Error message to the initiator.

3. Error message to the target.

Both message bodies on the error records say that it was a lifetime error.

If I end the conversation on the initiator side after it is sent, I still get the target error record but the message_body field is null.

So say I don't end the conversation on the initator side. My next receive on the target side will pull the original record. Then it will pull the initator record and then it will pull the target record. Nothing on that record says that it had timed out.

What is the best practice for handling lifetime errors?

View 1 Replies View Related

Conversation Timer Versus LIFETIME

Nov 17, 2006

I need to follow up on a message and check on its status. I am planning on using Conversation Timers (self addressed). I've tried it and they do work well. I am wondering if the LIFETIME parameter can be used for the same purpose. If the dialog has not been closed and the LIFETIME expires, will a message be queued into the service's queue? It does not seem that this is the case, but it is worth checking, as it could be a much desired feature.

Thanks,

View 5 Replies View Related

Sqlreader.close() And Sqlconn.close()

Feb 13, 2008

Hi,
My question is if I close the sqlreader i am using. will that close the connection it uses or the connection will still remain open?
Syed

View 4 Replies View Related

Error Log Peppered With --&&> 'The Conversation Handle Is Missing. Specify A Conversation Handle.'

Dec 3, 2007

Hi

I'm using service broker and keep getting errors in the log even though everythig is working as expected

SQL Server 2005
Two databases
Two end points - 1 in each database
Two stored procedures:
SP1 is activated when a message enters the sending queue. it insert a new row in a table
SP2 is activated when a response is sent from the receiving queue. it cleans up the sending queue.

I have a table with an update trigger
In that trigger, if the updted row meets a certain condition a dialogue is created and a message is sent to the sending queue.
I know that SP1 and SP2 are behaving properly because i get the expected result.
Sp1 is inserteding the expected data in the table
SP2 is cleaning up the sending queue.

In the Sql Server log however i'm getting errors on both of the stored procs.
error #1
The activated proc <SP 1 Name> running on queue Applications.dbo.ffreceiverQueue output the following: 'The conversation handle is missing. Specify a conversation handle.'

error #2
The activated proc <SP 2 Name> running on queue ADAPT_APP.dbo.ffsenderQueue output the following: 'The conversation handle is missing. Specify a conversation handle.'

I would appreceiate anybody's help into why i'm getting this. have i set up the stored procs in correctly?

i can provide code of the stored procs if that helps.

thanks.

View 10 Replies View Related

Conversation ID Cannot Be Associated With An Active Conversation

Apr 19, 2006

Hi:

My service broker was working perfectly fine earlier. As I was testing...I recreated the whole service broker once again.

Now I am able to get the message at the server end from intiator. When trying to send message from my server to the intiator it gives this error in sql profiler.

broker:message undeliverable: This message could not be delivered because the Conversation ID cannot be associated with an active conversation. The message origin is: 'Transport'.

broker:message undeliverable This message could not be delivered because the 'receive sequenced message' action cannot be performed in the 'ERROR' state.

How do I proceed now ?

Thanks,

Pramod

View 14 Replies View Related

Class Lifetime

Feb 4, 2008



there was a post some time ago but nobody answered. Maybe somebosy will answer now?



I have created a class which contains a few UDF's. The class has a static constructor that reads from the databse and loads a Dictionary<> collection.

What is the lifetime of the class?
What will cause the static constructor to be called again?
When will it be garbage collected?
If the life time is limited by default, can it be extended?

Thanks.

View 2 Replies View Related

Conversation Handle Reuse And Conversation Handle XXX Not Found

Jan 18, 2008



We have implemented our service broker architecture using conversation handle reuse per MS/Remus's recommendations. We have all of the sudden started receiving the conversation handle not found errors in the sql log every hour or so (which makes perfect sense considering the dialog timer is set for 1 hour). My question is...is this expected behavior when you have employed conversation recycling? Should you expect to see these messages pop up every hour, but the logic in the queuing proc says to retry after deleting from your conversation handle table so the messages is enqueued as expected?

Second question...i think i know why we were not receiving these errors before and wanted to confirm this theory as well. In the queuing proc I was not initializing the variable @Counter to 0 so when it came down to the retry logic it could not add 1 to null so was never entering that part of the code...I am guessing with this set up it would actually output the error to the application calling the queueing proc and NOT into the SQL error logs...is this a correct assumption?

I have attached an example of one of the queuing procs below:




Code Block
DECLARE @conversationHandle UNIQUEIDENTIFIER,
@err int,
@counter int,
@DialogTimeOut int,
@Message nvarchar(max),
@SendType int,
@ConversationID uniqueidentifier
select @Counter = 0 -- THIS PART VERY IMPORTANT LOL :)
select @DialogTimeOut = Value
from dbo.tConfiguration with (nolock)
where keyvalue = 'ConversationEndpoints' and subvalue = 'DeleteAfterSec'
WHILE (1=1)
BEGIN
-- Lookup the current SPIDs handle
SELECT @conversationHandle = [handle] FROM tConversationSPID with (nolock)
WHERE spid = @@SPID and messagetype = 'TestQueueMsg';
IF @conversationHandle IS NULL
BEGIN
BEGIN DIALOG CONVERSATION @conversationHandle
FROM SERVICE [InitiatorQueue_SER]
TO SERVICE 'ReceiveTestQueue_SER'
ON CONTRACT [TestQueueMsg_CON]
WITH ENCRYPTION = OFF;
BEGIN CONVERSATION TIMER ( @conversationHandle )
TIMEOUT = @DialogTimeOut
-- insert the conversation in the association table
INSERT INTO tConversationSPID
([spid], MessageType,[handle])
VALUES
(@@SPID, 'TestQueueMsg', @conversationHandle);

SEND ON CONVERSATION @conversationHandle
MESSAGE TYPE [TestQueueMsg] (@Message)

END
ELSE IF @conversationHandle IS NOT NULL
BEGIN
SEND ON CONVERSATION @conversationHandle
MESSAGE TYPE [TestQueueMsg] (@Message)
END
SELECT @err = @@ERROR;
-- if succeeded, exit the loop now
IF (@err = 0)
BREAK;
SELECT @counter = @counter + 1;
IF @counter > 10
BEGIN
-- Refer to http://msdn2.microsoft.com/en-us/library/ms164086.aspx for severity levels
EXEC spLogMessageQueue 20002, 8, 'Failed to SEND on a conversation for more than 10 times. Error %i.'
BREAK;
END
-- We tried on the said conversation, but failed
-- remove the record from the association table, then
-- let the loop try again
DELETE FROM tConversationSPID
WHERE [spid] = @@SPID;
SELECT @conversationHandle = NULL;
END;

View 2 Replies View Related

Lifetime Of SqlDependency Objects?

Sep 17, 2007



hello,

I am now using SqlDepency objects in a WCF windows service. This service could very well be running for weeks or even months at a time, in a perfect world...

I have some shared, global data caches that I now update only when the table's data changes, thanks to the SqlDepedency objects and Service Broker. I only have one question - what kind of considerations must I make when using this inside a long-running windows service? What if my SQL Server crashes, or the server is stopped and restarted, or someone trips on the cord... Will everything automatically work just as it should, or must I call SqlDepedency.Start() again, or possibly re-load my dataset and re-wire my OnChanged event to my SqlDepdency object? Is there any special events fired to notify me that I must do something of the sort? (e.g. maybe OnChanged will fire with some details). Or does Service Broker automatically handle all of this behind the scenes? Something tells me life isn't that easy...

Thanks very much,

Drew

View 4 Replies View Related

The Dialog Has Exceeded The Specified LIFETIME

Mar 30, 2006

Hi,

I'm trying to get the HelloWorld_CLR project that comes with the SQL 2005 samples download to work, which it seems to. However, after I run the application a few times, an exception indicating "the service queue ClientQueue is disabled." After running the following query I notice the body of the error message is consistently "The dialog has exceeded the specified LIFETIME."

select service_name as [SERVICE],

message_type_name as [TYPE],

CAST(message_body as nvarchar(max)) as BODY

from ClientQueue

I believe that the problem is a poison message causing a RECEIVE statement to get rolled back 5 times, disabling the queue. My question is: How do I troublshoot the issue from this point?

Thanks,

Chris

View 1 Replies View Related

Error: Dialog Has Exceeded The Specified LIFETIME.

Nov 22, 2005

Hello again!

View 6 Replies View Related

Removal From Sys.transmission_queues On Exceeding LIFETIME

Apr 20, 2007

Hello,

We needed to detach a database that contained a target ServiceBroker service and wanted to do this without impacting the rest of our system. The idea was the ServiceBroker would enqueue message to this service to be pickedup when the database was re-attached. Our sequence to do this was:

1. Disable the queue on the target service forcing ServiceBroker to queue in the initating side transmission queue.

2. Detach the database.

3. Re-attach the database.

4. Re-enable the queue



Messages sent to the service have a specified LIFETIME. What appeared to happen was that messages were being stored in the transmission queue as expected but on hiting the LIFETIME period they were being removed from the transmission queue and were therfore "lost".



Has anyone else experienced this or can anyone suggest what we are doing wrong.



Incidentally, beaware that detaching a database will disable ServiceBroker in that database when it is re-attached - we discovered that one the hard way :-)



Any suggestions gratefully recieved.

View 5 Replies View Related

Appropriate Use Of End Conversation

Sep 25, 2006

I have a system that will post a message to a queue, but does not need to wait for a response - just needs to make sure the message arrived properly in the queue, not that is was processed at the receiving end. A second service will poll the queue to retrieve outstanding messages and will then move the message to an outside system. The movement of the message to the outside system will be wrapped in a transaction and if the process is successful, then the transaction will be commited otherwise it will be rolled back.

1) is it appropriate for the service that posts the message to send an END CONVERSATION ? This way the sending service will not be waiting for a response.

2) in the data movement phase, is it appropriate to issue and END CONVERSATION when commiting and not issue when ROLLBACK occurs. Or should ROLLBACK occur with a following END CONVERSATION with error message?

View 7 Replies View Related

Close

Apr 6, 2006

View 3 Replies View Related

Ending A Conversation

Jul 30, 2006

I am attempting to learn Service Broker from Bob Beauchemin's book "A Developer's Guide to SQL Server" - Chapter 11. I'm finding it to be very good but I'm confused over the concept of closing a conversation. Could someone answer the following questions for me?

When a conversation is ended, can the conversation handle that was created when the conversation was created still be used? (I assume not)
Beauchemin says, on page 511, that when a conversation ends, "Any messages still in the queue from the other end of the conversation are deleted with no warning." Does this mean that if I send a message that expects a reply, but I end the conversation, the message is still sent, it is still received by the other endpoint, the other endpoint processes it, but I'll never receive the reply?
Beauchemin says that if no lifetime is specified, the conversation is active for the number of seconds which can be represented by the maximum size of an integer. Does this mean that if I don't specify a lifetime, a conversation is active for many, many years?

Thanks very much.

Amos

View 1 Replies View Related

Quiesce Then End Conversation

Sep 6, 2007

I want to reuse conversations to minimize overhead during bursts of activity. Remus' article on reusing conversations (http://blogs.msdn.com/remusrusanu/archive/2007/05/02/recycling-conversations.aspx) is great. (I know you are reading this Remus, thanks.)

I was wondering if there is a simpler way of ending a cached conversation - Quiesce the conversation (Stop using it), then after some period of time, end it.

I create a conversation, cache it in RLY_Conversations, and use it for 50 seconds. After 1 minute, the dialog timer servicing proc ends the conversation. There will be no messages sent around the time the End Conversation takes place, thus no race conditions.

Do you see any problems with this method?



Select @DialogHandle = [conversation_handle]
From RLY_Conversations
Where TableName = @TableName and IsActive = 1 And

CreatedTmstp > dateadd(ss, -50, getdate())


if @DialogHandle is null
Begin
-- initialize a conversation and record it in our reuse table
BEGIN DIALOG CONVERSATION @DialogHandle
FROM SERVICE FirstHostRelayService
TO SERVICE 'SecondHostRelayService'
ON CONTRACT RelayContractSentByAny
WITH ENCRYPTION=OFF ;

-- cache the dialog handle to minimize dialog creation overhead.
Insert into RLY_Conversations (
TableName, conversation_handle, conversation_id, is_initiator, service_contract_id,
conversation_group_id, service_id, lifetime, state, state_desc, IsActive, CreatedBy, CreatedTmstp
)
Select @TableName, conversation_handle, conversation_id, is_initiator, service_contract_id,
conversation_group_id, service_id, lifetime, state, state_desc, 1, 'Setup', getdate()
From sys.conversation_endpoints
Where conversation_handle = @DialogHandle;

-- initiate housekeeping process
BEGIN CONVERSATION TIMER ( @DialogHandle )
TIMEOUT = 60;
End

View 1 Replies View Related

Move Conversation

Feb 16, 2006

when you move a conversation to a conversation group, that conversation_group has to have been created previously, ie, you cant specify a non-existing conversation_group, right?

I ask because I am trying to develop an application where I use optimally one conversation related to many given conversation_groups, so that when I receive, I lock only a small determined subset of messages. What I could have used was a way to send messages on a conversation, specifying a conversation_group_id.

Any suggestions?

View 4 Replies View Related

Conversation That Dont End.

Oct 16, 2006

Hi There

Message ordering is of utmost importance in our application.

As i found in testing the only way to ensure message ordering is if they are in the same conversation.If you send multiple messages in different conversations there is no garantee which will be processed first.

Therefore i will be creating conversations that last "forever", that is using a single conversation.

I plan on doing a BEGIN DIALOG CONVERSATION when an inititator site is setup and writing the conversation handle guid to a table.

I will them simply SEND ON SONVERSATION using the guid, i will never issue a end conversation from target or initiator.

Is this theory solid, ie: is there a better way or best practice to do this?

I know that conversatons persist with sql server restarts, however what happens if an initiator site db is restored ?

I was thinking of adding logic to first check if a conversation endpoint exists with the specified guid if not , then start another conversation. But is this the best way?

Thanx

View 2 Replies View Related

Conversation Groups

Jun 28, 2006

I am thinking of updating my SQL monitoring application to use Service Broker.

Right now I loop through my list of servers performing various checks on each server. Things like 'check last database backup', 'check for new databases', 'check for server restart'. I loop through, one server at a time, doing one check at a time. The more servers I have the longer it is taking.

So, I want to multi-thread the servers, but single-thread the checks on each individual server. This way I can check say, 5 servers at a time, but on each server I will only do one check at a time. This way I won't flood an individual server with multiple checks.

Is this possible? It looks like Conversation groups might be the way to go but I'm not sure.

View 2 Replies View Related

Conversation Groups

Dec 20, 2005

I'm having some troubles with conversation groups.  I need to send two  messages on the same conversation group so I have the following in my SP....

BEGIN DIALOG CONVERSATION @providerConversationHandle
 FROM SERVICE [ProviderDataService]
 TO SERVICE 'CalculatedDataService'
 ON CONTRACT [ProviderDataContract]
 WITH ENCRYPTION = OFF
 ,  LIFETIME = 600;

BEGIN DIALOG CONVERSATION @curveConversationHandle
 FROM SERVICE [ProviderDataService]
 TO SERVICE 'CalculatedDataService'
 ON CONTRACT [ProviderDataContract]
 WITH RELATED_CONVERSATION = @providerConversationHandle
 ,    ENCRYPTION = OFF
 ,  LIFETIME = 600;

SEND ON CONVERSATION @providerConversationHandle
 MESSAGE TYPE [ProviderDataMessage] ( @providerMessage );

SEND ON CONVERSATION @curveConversationHandle
 MESSAGE TYPE [ProviderCurveMessage] ( @curveMessage );

When I query the queue I see two messages, but they don't have the same conversation_group_id.

Any ideas?

Thanks.

 

 

View 9 Replies View Related

Conversation Group

Jul 26, 2006

I have not been successfull in getting conversation group to work. My understanding is that I can specify a 'guid' for a conversation group id in the create dialog and when I send a message on this conversation it will have that specific guid for its conversation group. When I do this it does not appear this way in the "target" queue.

I am looking for an example to help me understand how to use a conversation group. The MSDN has not really provided that run able example that I can run and verify and tweak.



The idea that I would like to try is that the initiator must send 5 different XML messages to a target. These 5 messages are all related and must exist together. What I assume is that if I want the target to get all 5 messages together out of the queue all messages must be sent in their own conversation but all linked with the same conversation group Id. I have not been able to get this to work.

The communication is really a one way where the initiator sends the data to the target and does not process or need a message sent back from the target.

Thank you for your time.

View 3 Replies View Related

Close The Connection?

Jul 17, 2006

Hi, I've created a simple hit counter in my Session_Start event...
Dim myDataSource As New SqlDataSourcemyDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnectionString1").ToStringmyDataSource.UpdateCommand = "UPDATE Stats SET Hits = Hits + 1"myDataSource.Update()
It works fine but do I need to close the connection after I've finished with it or is this ok?
Thanks for your help.
 

View 9 Replies View Related

@@identity... Am I Even Close Here?

May 29, 2007

string ConnectionString = ConfigurationManager.ConnectionStrings["myConnString"].ConnectionString;
SqlConnection connection = new SqlConnection(ConnectionString);
SqlCommand cmd = new SqlCommand(@"INSERT INTO CreditAppFile (GI_RB_Div) VALUES(@GI_RB_Div) SELECT @@idientity as 'NewID'", connection);
cmd.Parameters.Add("@ID", SqlDbType.BigInt, 8).Value = NewID.Text;
.
.
Response.Redirect(DisplayPage.aspx?ID=@ID);
 
i want the ID of the most recently added record to be passed to another page to show all entered data from the prior page...  am i close?

View 5 Replies View Related

Am I Close Or Way Off The Mark?

Jul 20, 2007

I am trying to select rows from a SQL2000 database table and then write a random number back into each row. I have already looked into do it all in a SP but there are well documented limitations for the SQL RAND function when called in the same batch, so I need to somehow do in .Net what I already have working in classic ASP.
I can't get the  UPDATE (part two section) to compile. I don't know how to call the stored procedure inside the 'foreach' loop or extract the SP parameters.  I have it working in classic asp but am having a lot of trouble converting to .Net 2.0.  Is the below even close to working? 
// stored procedure to write externally generated random number value into database
PROCEDURE RandomizeLinks@L_ID int,@L_Rank intASUPDATE Links SET L_Rank = @L_RankWHERE (L_ID = @L_ID)
// Part One select links that need random number inserted.
    public DataTable GetRandLinks()    {        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1A"].ConnectionString);        SqlCommand cmd = new SqlCommand("RandomizerSelect001", con);        cmd.CommandType = CommandType.StoredProcedure;        SqlDataAdapter da = new SqlDataAdapter();        da.SelectCommand = cmd;        DataSet ds = new DataSet();        try        {            da.Fill(ds, "Random001");            return ds.Tables["Random001"];        }        catch        { throw new ApplicationException("Data error"); }    }
    // Part Two I need two write a random number back into each row
    protected void Button1_Click(object sender, EventArgs e)    {        GetRandLinks();        int LinkID;               // this generates unassigned local variable "LinkID' error        int LRank;              // this generates unassigned local variable "LRank' error        SqlConnection con2 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1A"].ConnectionString);        SqlCommand cmd2 = new SqlCommand("RandomizeLinks", con2);        cmd2.CommandType = CommandType.StoredProcedure;        cmd2.Parameters.AddWithValue("@L_ID", LinkID);        cmd2.Parameters.AddWithValue("@L_Rank", LRank);        SqlDataAdapter da2 = new SqlDataAdapter();
        int RowIncrement;        RowIncrement = 0;        DataTable dt = GetRandLinks();        foreach (DataRow row in dt.Rows)        {            System.Random myRandom = new System.Random();            int LinkRank = myRandom.Next(25, 250);            LRank = LinkRank;            da2.UpdateCommand = cmd2;            RowIncrement++;        }           }

View 4 Replies View Related

Do I Need To Close The Connection????

Feb 14, 2008

Hi all,
 
If this is used eg.
Return selectCommand.ExecuteReader(CommandBehaviour.Default)
Here  do i need to close the connection in finally explicitly????
Are there any links which can answer this kind of question ???
Thanks for any help in advance.....

View 3 Replies View Related

ADO.net (how To Close A Reader)

Nov 29, 2005

Hello, I'm trying to run the following snippet as Console app, and I get an error: "a reader is already open for this connection, and should be closed first" I tried to manually say: SqlDataReader.Close() in the begining of the code, but still get the error, Any suggecstions how to manually close the reader? thank you ---------- here's the code -----------using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; namespace ADO.NET { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { SqlConnection cn = new SqlConnection ("SERVER=MyServer; INTEGRATED SECURITY=TRUE;" + "DATABASE=AdventureWorks"); SqlCommand cmd1 = new SqlCommand ("Select * from HumanResources.Department", cn); cmd1.CommandType = CommandType.Text; try { cn.Open(); SqlDataReader rdr = cmd1.ExecuteReader(); while (rdr.Read()) { if (rdr["Name"].ToString() == "Production") { SqlCommand cmd2 = new SqlCommand("SELECT * FROM " + "HumanResources.Employee WHERE DepartmentID = 7", cn); cmd2.CommandType = CommandType.Text; SqlDataReader rdr2 = cmd2.ExecuteReader(); while (rdr2.Read()) { } rdr2.Close(); } } rdr.Close(); } catch (Exception ex) { Console.WriteLine (ex.Message); } finally { cn.Close(); } } } }

View 2 Replies View Related

How Can I Close A Cursor?

Jul 12, 2002

Hi guys.

is there anyway I can find a cursor that is open
so that i can close it?

I have a procedure running daily (across servers). that stopped suddenly with this error.

A cursor with the name 'xyz' already exists.

I tried closing and deallocating on destination server. I am getting the error like "cursor doesnot exist"

I need to run this procedure. i dont want to recycle the destination server.

any ideas?
-MAK

View 4 Replies View Related

T-SQL CLOSE Connection To DB

May 28, 2006

How do i close a current connection to a database using t-sql?I fail some time to drop the database getting messages that it'scurrently in use.Using the wizard to delete the database, i could check the option toclose all connections to the db, but how do i do it using t-sql?best regards

View 10 Replies View Related

How To Close CN Connection To A SDF Db

Oct 14, 2007



Hello all,

I have a DB on my WM2005 device.
I'm using a program which connect to the DB using a CN.
On the constructor of the DB Class I use the line


static string connString = "Data Source='" + strDB + "'; LCID=1033; Password=" + strPass + "; Encrypt = FALSE;";
SqlCeConnection cn = new SqlCeConnection(connString);


Then I Open the Connection.
Now, in some ways I need to drop a Table.
Before I do so, I disconnect the DB but I'm using only the line

cn.Close();


I saw om the Watch attributes that its not a real disconnect to the DB.
When I try to Drop the Table I get this message:
The system timed out waiting for a lock. [ Session id = 25,Thread id = -2096711882,Process id = -2090594918,Table name = Movies,Conflict type = x lock (s blocks),Resource = DDL ]


And the Table doesn't drop.

Is it related to the constructor line I made?
What is the best solution to Drop a table..and then to get connected again with the DB.

Thanks in advance..

View 5 Replies View Related

Execution Of END CONVERSATION Statement

Mar 21, 2007

When I try to execute the following statement:

END CONVERSATION DIALOG CONVERT(uniqueidentifier, '58C1A7AA-C0D7-DB11-B4C6-005056C00008')

using ICommand.Execute method, I got an error:

Incorrect syntax near the keyword 'END'.

I use SQL Native Client as OLE DB Provider.

In profiler I can see that my statement becomes like this:

exec END CONVERSATION CONVERT(uniqueidentifier, '903586ED-C0D7-DB11-B4C6-005056C00008')

So provider add 'exec' before my statement, maybe because NCLI don't know such statetment and thinks that it is a stored procedure call with the name 'END'?

Is there is a way to avoid it except of using following construction:

exec sp_executesql N''END CONVERSATION ...

 ?

View 5 Replies View Related

Service Broker End Conversation

Jan 17, 2007

Hello people

I am new to service broker and would like a little help please. I have a SP which gathers information from a collection of tables. Depending on the data gathered it may or may not begin a dialog conversation with a service broker queue. What i'm needing to know is should at the end of the SP once the required message has been sent should i end the conversation or not?



Many thanks in advance, Michael



View 1 Replies View Related

End Conversation Causing Blocks

Apr 9, 2007

Hi



I was trying to clean up some conversation in Service Broker and caused alot of blocking that I seem to unable to kill. there was 1 conversation that I was not able to end, so I wanted to restart sql service, But I can't even restart the SQL service. I get the following in Event Viewer



Timeout occurred while waiting for latch: class 'SERVICE_BROKER_TRANSMISSION_INIT', id 00000001A2B03540, type 2, Task 0x0000000000C2EDA8 : 0, waittime 5400, flags 0xa, owning task 0x00000002DEBCA5C8. Continuing to wait.



Has anyone come across this



thanks



Paul

View 1 Replies View Related

How Can I Determine The Queuing_order Of A Conversation?

Jan 9, 2007

Hi There

Is there a DMV or something in the system that can tell me what the current queue message number is for a conversation.

I would like to determine what the message queue_order number for a message is before or after i send the message, as i would like to log this information?

Thank You

View 7 Replies View Related







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