How To Find Out What It The The Poison Message.

May 14, 2007

Hallo,
I have some problems to handle the poison messages.



Messages are exchanged between 2 databases on the same SQL Server instance.
I created a Trigger on the insert , that call the sp that begin the conversation(10 minutes Timeout) and send the message to the target queue.

On the target queue I activated a SP and the main code is:

BEGIN TRANSACTION

WAIT FOR (Receive (1) ..) timeout 5000

IF (@ErrorSave <> 0)

BEGIN

INSERT INTO [TestSender].[dbo].[tblErrorXMLMessages] VALUES ();

END

ELSE

if (@messagetypeName = N'Message')

BEGIN

exec [dbo].[sp_ProcessMessage] @message_body

END

ELSE IF (@messagetypeName = N'EndOfStream')

BEGIN

END CONVERSATION @dialog

END

COMMIT TRANSACTION



My communication has a strange behaviour:

if I type

Begin

insert into TriggerTable values(XMLMessage)

insert into TriggerTable values(XMLMessage)

....

insert into TriggerTable values(XMLMessage)

end


Everything work fine but If I write an insert of 1000 message coming from an another table and I use the

cursor login after I while the transmission stop because the Target queue become inactive.
I can see my messages stuck in the Initiator transmission_queue so I think that there is some Poison message that cause 5 rollback and disable the receiver queue.

First I would like to isolate the wrong message and carry on with the insert, my application doesn't have to stop the conversation or return any error, but If I use the Sql server Debugger I'm not able to debug the Target queue's stored procedure.



I suppose that some error happens on the Target queue's stored procedure but how can I first at all find it out?

Maybe it has something to do with the transition wrapped around the RECEIVE command?

thank you for any helps!

Marina B.

View 2 Replies


ADVERTISEMENT

Poison Message Question

May 11, 2006

I know I have to build in some ability to deal with a posion message. I was thinking that (sort of mentioned in the article http://msdn2.microsoft.com/en-us/library/ms166137.aspx) I would write a special stored procedure that would handle this situation. I don't know how I could activate this. I don't want to poll of course in a waitfor.

Does anyone have a good idea on this?

View 1 Replies View Related

Poison Message Sample In BOL

Oct 4, 2005

Hi, 

View 8 Replies View Related

Poison Message, Distributed Transaction

Oct 11, 2007

Hi!
I have crl stored procedure with distributed transaction in it. I really need such transaction. When a poison message occurs 5 time my queue is turned off.
I've read about handling poison messages in msdn (save transaction and rollback part of it), but it works only with local transaction. What should I do?
An important point is that messages shoold be processed in right order, I can't receive message and put it to the end of queue.
I want to try process poison message constantly.
I doesn't want to stop receiving messages in that queue.
Thanks.

kostya

View 1 Replies View Related

Is It Possible To Disable Poison Message Detection?

Aug 3, 2006

Hi,

I'm using the Service Broker to parallize my processes (I know that the Service Broker was not designed for that purpose), however it's working quite well.

I use the broker procedure to start procedures which all process all a part of the workload. When the procedure fails because of a lock timeout (or for that concern, for whatever reason), I rollback the transaction (which also roll back my message received on the queue so that it can be retried at a later time.). And this is where my problem lies, if there are 5 sequential rollbacks of messages then the poison message detection kicks in and disables the queue, stopping all the processing. :(

Is there a way to disable poison message detection? I have implemented my own stop-mechanism through a counter system on a per sub-task system so if I could disable poison message detection that would be ideal.

If this is not possible is there a way to turn the queue back on automatically so that it will continue processing the messages on the queue?

Cheers,
Peter.

View 7 Replies View Related

The Problem With Poison Message Handling.

Nov 23, 2005

Hi,

View 1 Replies View Related

Problems With Poison Message Processing

Oct 2, 2006

I am getting the following Error and I can't find it in the Manual.



Failure to send an event notification instance of type 'BROKER_QUEUE_DISABLED' on conversation handle '{5D273374-E84F-DB11-B3BC-0004239AB15C}'. Error Code = '8429'.

I have checked the service name for the notification and it appears to be okay.

Any ideas would be welcomed,

Gary

View 4 Replies View Related

Poison Message. The Conversation Endpoint Is Not In A Valid State For SEND.

Aug 1, 2007

Hi all, i searched everywhere but couldn't find any info on the following error that i'm currently receiving:

"The conversation endpoint is not in a valid state for SEND. The current endpoint state is 'DI'."

I understand that this is due to some problem in my send/receive protocol but how do i fix this problem so that i can continue with my testing? Right now i'm forced to drop my entire test database and reinstall everytime this message shows up because i can't send/receive any messages at that point. Is there anyway to get rid of it?

Thanks in advance. This is driving me nuts.

View 9 Replies View Related

Can't Find Or Load Message DLL. Message DLL Must Be In Path Or In Current Directory.

Jul 23, 2007

In my SQL Server, I see the below message in the Application Event Viewer



"18265 :

Log backed up: Database: HSD, creation date(time): 2007/01/06(05:05:05), first LSN: 1439:495055:1, last LSN: 1439:496675:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'D:MSSQLBACKUPHSDHSD_tlog_200707141300.TRN'})."



When I save the application event viewer and open it in another server, I do not see the above message, instead I get the following message:

" Can't find or load message DLL. Message DLL must be in path or in current directory."



Any thoughts to overcome this problem is appreciated.



Thanks

Santhosh


View 3 Replies View Related

How To Find The Message Timestamp

Jul 11, 2007

Hi,



I need to find the exact time a message was received in the service broker, the time it finished sending and the time it was received at the destination (which is another service broker queue on a different server). I am trying to figure out what the delay is, with increasing message size.



Please advice



Thanks

View 1 Replies View Related

About An Error Message Could Not Find Stored Procedure 'dbo.U_Login .

Jan 19, 2007

Hi All,I am having an error message when running the program below, the message says " Could not find stored procedure 'dbo.U_Login ". I have tried a inline Sql statement to match if user exists and then redirects to another page but when using a Stored Procedure what I get is the above mentioned error. I am logged onto my PC as Administrator but I don't know why this error appaears. Can anyone help me with this ? I am using SQL Server Express with Visual Studio. here the application I am trying to run:1 using System;
2 using System.Data.SqlClient;
3 using System.Data;
4 using System.Configuration;
5 using System.Web;
6 using System.Web.Security;
7 using System.Web.UI;
8 using System.Web.UI.WebControls;
9 using System.Web.UI.WebControls.WebParts;
10 using System.Web.UI.HtmlControls;
11
12
13 public partial class _Default : System.Web.UI.Page
14 {
15 protected void Page_Load(object sender, EventArgs e)
16 {
17
18 }
19 protected void btnSubmit_Click(object sender, EventArgs e)
20 {
21
22 //SqlDataSource LoginDataSource = new SqlDataSource();
23 //LoginDataSource.ConnectionString =
24 // ConfigurationManager.ConnectionStrings["LoginConnectionString"].ConnectionString;
25 ////ConfigurationManager.ConnectionStrings["LoginConnectionString"].ToString();
26 ////// if (LoginDataSource != null)
27 //// // Response.Redirect("DebugPage.aspx");
28
29 //Sql connection = LoginDataSource.ConnectionString;
30
31 string UserName = txtUserName.Text;
32 string Password = txtPassword.Text;
33
34 // string query = "SELECT * FROM Users WHERE userName = @UserName " + "AND Password = @Password";
35 //SqlCommand Command = new SqlCommand(query, new SqlConnection(GetConnectionString()));
36
37 SqlCommand Command = new SqlCommand("dbo.U_Login", new SqlConnection(GetConnectionString()));
38
39
40 //SqlConnection SqlConnection1 = new SqlConnection(GetConnectionString()); //added
41 //SqlCommand Command = new SqlCommand(); //added
42 //Command.Connection = SqlConnection1; //added
43 // Command.Connection = new SqlConnection(GetConnectionString());
44 //SqlConnection_1.Open();//added
45
46 Command.CommandType = CommandType.StoredProcedure; //added
47 //Command.CommandText = "dbo.U_Login"; //added
48
49
50
51
52 Command.Parameters.AddWithValue("@UserName", UserName);
53
54 Command.Parameters.AddWithValue("@Password", Password);
55
56 Command.Connection.Open();
57
58 SqlDataReader reader;
59
60
61 //reader = Command.ExecuteReader(CommandBehavior.CloseConnection);11
62
63 reader = Command.ExecuteReader();
64
65
66 if (reader.Read())
67
68 Response.Redirect("DebugPage.aspx");
69 else
70 Response.Write("user doesn't exist");
71
72
73 //SqlConnection_1.Close();//added
74
75
76 }
77 private static string GetConnectionString()
78 {
79
80 return ConfigurationManager.ConnectionStrings["LoginConnectionString"].ConnectionString;
81
82 }
83
84
85 }
86
87
88
89

 Thanks in advance

View 1 Replies View Related

Error Message Could Not Find Server 'FLDB1' In Sysservers....

Jun 19, 2007

I'm getting the following message from a VB6 program running ADO...



It will process a job then I get the message.... [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server 'FLDB1' in syssservers. Execute sp_addlinkedserver to add the server to sysservers...



This started to happen after I moved the db from SS2000 to SS2005...



Our db server and sql server instance on that server are both named 'FLDB1'... Do I need to run the above execute sp_addlinkedserver command on the new 2005 server?



Thanks-Dave

View 1 Replies View Related

Poison Messages - 5 Times's A Charm

Jan 13, 2006

Hello again,
I have some poison message detection in place, based on the BOL sample. My problem is that after the 5th message retry my queue goes down - that is the fifth retry on any message. In actuallity, the first message is retried 3 times and it is taken off the queue [for real], the second message comes in and on the second retry - pooof - the queue is down.

I though the poison mechanism should work on a per message basis. It there a setting for the queue I missed? Is my only chance for to fix this: re-enable the queue upon BROKER_QUEUE_DISABLED event notification?


Thanks,

Lubomir

View 6 Replies View Related

Handling Poison Messages Sample Code In BOL Wrong?

Jul 28, 2005

In the "Example: Detecting a Poison Message" section, it reads: This Transact-SQL example shows a simple, stateless service that includes logic for handling poison messages. Before the stored procedure receives a message, the procedure saves the transaction. When the procedure cannot process a message, the procedure rolls the transaction back to the save point. The partial rollback returns the message to the queue while continuing to hold a lock on the conversation group for the message.

View 1 Replies View Related

This Message Could Not Be Delivered Because Its Message Timestamp Has Expired Or Is Invalid

Aug 8, 2007

I run SB between 2 SQL servers. In profiler on an initiator side I see next error: 'This message could not be delivered because its message timestamp has expired or is invalid'. For the conversation we use best practice, i.e. target closes a conversation. Target side succeed to close conversation, but initiator still stay in DO (disconnect_outbound).
What is a reasone for the error? What to do?

View 5 Replies View Related

This Message Could Not Be Delivered Because Its Message Timestamp Has Expired Or Is Invalid.

Aug 8, 2007

I see in profiler this error: "This message could not be delivered because its message timestamp has expired or is invalid"
What is a reason for error?

View 1 Replies View Related

Message Type And Message Body..............

Nov 17, 2006

Hello,

I am having trouble specifying a message body that is valid. I mean for the client to send. If I leave it as null then everything is ok but if I create a memorystream and add a line of text it reports back it did not pass validation. I do not understand this and am not sure what to do. I need to send a message based on a code and text but do not know the format of the body that is allowed. The code I am refering to comes out of HelloWord_CLR because that is what I am formating my sample after. I call it the same way it calls the return message done in ServiceProc. I need to know the message format including body since this does not seem to work. A sample of the call is bellow.

// Create an empty request message

string Msg = "Hello";

MemoryStream body = new MemoryStream(Encoding.ASCII.GetBytes(Msg));

Message request = new Message("Request", body);

Thanks,

Scott Allison...

View 1 Replies View Related

Anything That You Find In SQL Object Scripts, You Can Also Find Them In System Tables?

Jul 26, 2005

I tried all the INFORMATION_SCHEMA on SQL 2000 andI see that the system tables hold pretty much everything I aminterested in: Objects names (columns, functions, stored procedures, ...)stored procedure statements in syscomments table.My questions are:If you script your whole database everything you end up havingin the text sql scripts, are those also located in the system tables?That means i could simply read those system tables to get any informationI would normally look in the sql script files?Can i quickly generate a SQL statement of all the indexes on my database?I read many places that Microsoftsays not to modify anything in those tables and not query them since theirstructure might change in future SQL versions.Is it safe to use and rely the system tables?I basically want to do at least fetching of information i want from thesystem tables rather than the SQL script files.I also want to know if it's pretty safe for me to make changes in thesetables.Can i rename an object name for example an Index name, a Stored Procedurename?Can i add a new column in the syscolumns table for a user table?Thank you

View 4 Replies View Related

Problem: Find All Table Names In Db And Then Find

Jun 12, 2008

I have 3 database say
db1
db2
db3

I need to setup a script to read all the table names in the database above and then query the database to find the list of Stored Procedure using each table.(SQL Server)

View 5 Replies View Related

Message

Mar 12, 2007

Hi

Can anybody guide --
how to send the message to the user connected to SQL server 2005 on lan


thanks

View 1 Replies View Related

Message Box

Aug 21, 2007

Hi

I have basic knowledge of SQL Server and Expert in MS Access

Know I want to change my Access Database into Database.
Now what i required is when I create any Procedure
then we use a condition helping keyword 'Where'

No what I required is when I execute any procedure using where clause It must open a Input Box where I put a condition

For Example
when I create a procedure like this

create Procedure prc_Demo
(
a int,
as
Select * from employee where emp_id = 'a'
)

Something like that So I want when I execute this then there must be open a box where I type emp_id then it show matching the result

How can it is possible

Thanks
Ashish

You Have to Loss Many Times to Win Single Time

View 11 Replies View Related

Message In SQL Log

Jan 15, 2008

Has anyone encounterd this message in the sql log:
-----
BACKUP LOG WITH TRUNCATE_ONLY or WITH NO_LOG is deprecated. The simple recovery model should be used to automatically truncate the transaction log.
-----
DB's are in simple recovery mode and only a daily backup is being done on DB's. It almost seems that SQL is doing something internally.

thanks

View 1 Replies View Related

Message Box In Rdl

Feb 5, 2007

hi everybody

i m using dynamic connection in rdl file firstly i m showing username and pwd . after this user name and pwd i make a connection string for my report. when i m entering invalid pwd, than report generate an error. and stop. is there any way by which i can trace error and flash a message box to user about his invalid user name or pwd.

thanks

View 1 Replies View Related

Where Is The Message ?

Jul 11, 2006

I sent a message from Server A to B. I didn't end the conversation. The message is stuck in sys.tranmission_queue with no error message (empty) . the initiatorQueue is empty (no records). why doesn't the message get sent ?

View 3 Replies View Related

Where Does This Message Come From And Why?

Feb 20, 2007

We are running transactional replication on sqlserver 2000 and I see the following message: "The initial snapshot for article reason_type is not yet available" Followed 10 minutes later by a "timeout expired" event (we see lots of these). I see no reason for a snapshot to even be running at 3:04 AM but then, it apparently was so what can I say. The Snapshot agent history does not show any entries for the last year so that is a bit of a mystery. The table in question seems identical at both the publisher and subscriber (including content).



Any ideas why this message would appear? It appears that a snapshot for this article was somehow involved but I thought a snapshot was only created by specific request.



Thanks.

View 1 Replies View Related

How Do I Know Where My Message Come From

Mar 29, 2006

I have a service broker service and there are multiple clients that can put messages in the queue of that service. How do I check which message comes from which client? There is no field in the queue like message_senderId or something like that.

View 1 Replies View Related

Sql Server Message

Oct 1, 2006

Hi,May I know how can I show an error message in aspx page when I hit a transaction error in sql server 2K? Thanks Levine   

View 5 Replies View Related

SQL Error Message

Oct 19, 2007

I have a SQL Express database on our server that is used for one of our websites when the website tries to write to the database I get the following error: -
An attempt to attach an auto-named database for file D:lahwebsitesGiants North Walesapp_datadatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
This error is very frustrating and I really can't find a way around it.  I have done the following: -


Deleted the SQL Server Express folders under user preferences

View 3 Replies View Related

Error Message

Feb 29, 2008

Hi,I am trying to write some C# ASP.NET 2.0 code. I have created a web form to send data to my sql server 2005 database. When I compile the application and insert data then click on the submit button I get this error 

"A first chance exception of type
'System.Data.SqlClient.SqlException' occurred in System.Data.dll" I have been trying to solve this for a few days now with no luck, so any help would be appreciated. I'll post below the source code of the web form (addOrder.aspx). It might be worth mentioning that I have created another web form in the same project called addCustomer.aspx. Like addOrder.aspx it is a web form, however it successfully inserts data in the database.  1 <%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Add Order Page" %>
2 <%@ import namespace="System.Data.SqlClient" %>
3 <%@ Import Namespace="System.Data" %>
4 <%@ Import Namespace="System.Web" %>
5 <%@ Import Namespace="System.Configuration"%>
6 <%@ Import Namespace="System.Globalization"%>
7
8 <script runat="server">
9
10 protected void Page_Load(object sender, EventArgs e)
11 {
12
13 }
14
15 protected void sumbitButton_Click(object sender, EventArgs e)
16 {
17 SqlConnection conn;
18 SqlCommand comm;
19 string connectionString =
20 ConfigurationManager.ConnectionStrings[
21 "ShippingSystemConnectionString1"].ConnectionString;
22 conn = new SqlConnection(connectionString);
23 comm = new SqlCommand(
24 "INSERT INTO Order(CustomerID, " +
25 "NumberofItems, DescriptionsofItems, SafeItems) " +
26 "VALUES (@CustomerID, " +
27 "@NumberofItems, @DescriptionsofItems, @SafeItems)", conn);
28 comm.Parameters.Add("@CustomerID", System.Data.SqlDbType.Int);
29 comm.Parameters["@CustomerID"].Value = int.Parse(DropDownList1.SelectedValue);
30 comm.Parameters.Add("@NumberofItems", System.Data.SqlDbType.Int);
31 comm.Parameters["@NumberofItems"].Value = numofitemstxt.Text;
32 comm.Parameters.Add("@DescriptionsofItems", System.Data.SqlDbType.VarChar);
33 comm.Parameters["@DescriptionsofITems"].Value = descofitemstxt.Text;
34 comm.Parameters.Add("@SafeItems", System.Data.SqlDbType.VarChar);
35 comm.Parameters["@SafeItems"].Value = safetxt.Text;
36 try
37 {
38 conn.Open();
39 comm.ExecuteNonQuery();
40 Response.Redirect("Success.aspx");
41 }
42 catch
43 {
44 }
45 finally
46 {
47 conn.Close();
48 }
49 }
50
51
52
53 protected void CustomerIDList_SelectedIndexChanged(object sender, EventArgs e)
54 {
55
56 }
57 </script>
58
59 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
60 <table style="position: static">
61 <tr>
62 <td style="width: 169px">
63 Customer ID:</td>
64 <td style="width: 100px">
65 <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
66 DataTextField="CustomerID" DataValueField="CustomerID" Style="position: static">
67 </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ShippingSystemConnectionString1 %>"
68 SelectCommand="SELECT [CustomerID] FROM [Customer]"></asp:SqlDataSource>
69 </td>
70 <td style="width: 178px">
71 </td>
72 </tr>
73 <tr>
74 <td style="width: 169px">
75 Number of Items:</td>
76 <td style="width: 100px">
77 <asp:TextBox ID="numofitemstxt" runat="server" Style="position: static"></asp:TextBox></td>
78 <td style="width: 178px">
79 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="numofitemstxt"
80 ErrorMessage="Number of Items Required" Style="position: static"></asp:RequiredFieldValidator></td>
81 </tr>
82 <tr>
83 <td style="width: 169px">
84 Descriptions of Items:</td>
85 <td style="width: 100px">
86 <asp:TextBox ID="descofitemstxt" runat="server" Style="position: static"></asp:TextBox></td>
87 <td style="width: 178px">
88 <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="descofitemstxt"
89 ErrorMessage="Description Required" Style="position: static"></asp:RequiredFieldValidator></td>
90 </tr>
91 <tr>
92 <td style="width: 169px">
93 Are Items safe:</td>
94 <td style="width: 100px">
95 <asp:TextBox ID="safetxt" runat="server" Style="position: static"></asp:TextBox></td>
96 <td style="width: 178px">
97 <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="safetxt"
98 ErrorMessage="Are Items Safe?" Style="position: static"></asp:RequiredFieldValidator></td>
99 </tr>
100 <tr>
101 <td style="width: 169px">
102 <asp:ValidationSummary ID="ValidationSummary1" runat="server" Style="position: static" />
103 </td>
104 <td style="width: 100px">
105 <asp:Button ID="sumbitButton" runat="server" OnClick="sumbitButton_Click" Style="position: static"
106 Text="Submit" /></td>
107 <td style="width: 178px">
108 </td>
109 </tr>
110 </table>
111 </asp:Content>
112
113
  My order table in SQL server 2005 (express) looks like this:  

View 5 Replies View Related

Sql Error Message

Jan 27, 2004

Hello-

I have the following sql statement which produced an error when I add the order by clause

SQL = "SELECT DISTINCT nc_department.department, Count(nonconformance.department_id) as 'events', ISNULL(SUM(nonconformance.nc_wafer_qty),0) as wafers FROM nc_department LEFT OUTER JOIN nonconformance ON nc_department.department_id = nonconformance.department_id WHERE nc_department.active = '1' GROUP BY nc_department.department ORDER by nc_department.order_id"


This is the error I get:

ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

Any help appreciated

View 10 Replies View Related

Error Message?

Apr 23, 2004

I'm catching a primary constraint error in SQL and don't want to return the SQL error message back to the client. Is there any way to stop this. Thankyou

View 5 Replies View Related

Error Message

May 21, 2004

I need help on this!
When I try to change the data from a table using Web Matrix, then I get this error message.

The table’s data cannot be edited because the table does not contain modifiable columns.

As I need to edit the data’s, how can I solve this?


Thanks for Your Help
Mikel

View 1 Replies View Related

Error Message

Sep 8, 2004

I finally installed MSDE and have the icon in my tray at the bottom of the screen.
When I try to connect to a database using the wizard in the web matrix program I get this message:
Unable to connect
SQL Server does not exist of access denied
Connection Open (Connect ())
What might be wrong??
Thanks for your help I'll get it soon (I hope)
Del Dobbs

View 2 Replies View Related







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