Fire And Forget Messages
Sep 4, 2006
I am designing an application using service broker, and to increase performance of the application, sometimes I will be sending messages without waiting for a reply. After reading the article by Remus at http://blogs.msdn.com/remusrusanu/archive/2006/04/06/570578.aspx regarding fire and forget messages I realised I should always let the target end the conversation first so I can catch any errors. However, other times when i send a message from the initiator queue, I will want to wait for a reply.
If I have an activated stored procedure attached to the initator queue (as suggested in the article) would it mean that I would not be able to handly ANY replies manually (ie from the code that originally started the conversation).
If this is the case, should I have two initiating queues, one that handles fire and forget type requests and another where it waits for a reply, or should I just have some sort of clean up routine scheduled which checks for error replies and ends any other conversations that have been ended by the target?
View 1 Replies
ADVERTISEMENT
Jul 3, 2006
Hi there .NET community.
I was wondering if there was a way to launch a stored procedure froman aspx page without the sqlCommand object sitting waiting for the sproc to return something.The procedure takes about 10 minutes to execute and the page timeouts.Is there a way to just execute the procedure and procede to the next line of script?
Thanks.
CaptainCrabs
View 3 Replies
View Related
Aug 25, 2007
How can I execute a long running transaction using something similar to the fire and forget pattern?
I intend to start the execution of a very long stored proc from within IIS. I would like to execute a sql script that will start the job and return immediately so that it doesn't hold an IIS thread.
View 3 Replies
View Related
Jan 29, 2007
I have forgotten password of user sa in sql server 2005.
But if authentication is window . I still login, and do work normal.
So how to solve problem ,if authentication is sql server.
Thank you very much.
View 5 Replies
View Related
Jun 22, 2015
I create a connection to an OLE db source and use SQL Server authorization and save the password, the connection manager seems to "forget" the password. That is, when I click the 'save password' check box, and do a test connection, it connects fine. But as soon as I close that connection window, and reopen it, the password box is empty, and the 'save password' box is still checked.Â
While using the connection manager name in the SSIS component (say script task) the connection is failing . As a workaround, the whole connection string has been put in a variable and used that variable in the SCRIPT task.
Is it a bug or some other property need to be set to use ConnectionManager Name .
Using BIDS 2008
View 3 Replies
View Related
Apr 2, 2008
Hello, please help!!
I have spent days searching the web and forums for an answer to this simple question and cannot find an example.
I have built a service broker application on sql server 2005. The application puts some xml on an incoming queue which is basically a few parameters to be used in a query. This queue will then call a stored proc which does some business logic and puts the resulting results in another queue also in xml.
I have written a test harness in SQL to put messages on the inbound queue and then some sql to retrieve the returned code from the outbound queue.
What I want to do is be able to convert the SQL which does this into .net code to be used by an application. i.e. write in .net some code to put xml on a queue and then write some .net code to retrieve xml from another queue.
I wouldn't have thought this would be a difficult thing to do and would have been done hundreds of times, but unable to find anything to simply send and retrieve XML to service broker queues....
thanks for your help.. its really needed. I found some links, but they are really vague and often doing select statments in service broker or something like this. I don't want to call any sql, just send and recieve XML on the queues.
any example code that does this, would be really helpfull
kind regards,
David Weeden
Database Developer
View 2 Replies
View Related
Aug 14, 2006
Hi Folks I hope every thing good.I have this problem I have a master page and an aspx page In aspx page there is an SqlDataSource Componant that call a storage prcedure from db that insert value to a certain table The issue here that he call the sp twice so the row record twince in the database What is the problem ?Thanks Bye
View 4 Replies
View Related
May 15, 2008
Hi
I have a some confusion pleaz resolve it
can i fire truncate to the multiple tables if you have any type of syntax then tell me and if not then could u resolve from store procedure
Ashish
View 1 Replies
View Related
Sep 21, 2005
Is it possible to create a trigger to monitor when a value changes from 1 to 0 in a particular row.
Example, rows have names, pins and status columns. When the status column of a row changes from 1 to 0, I am going to send a mail item to the person whose name has had the status changed.
Mike
View 1 Replies
View Related
Apr 16, 2007
Hello,
I have a SQL Server 2000 DTS package in which the first step executes a batch file. The batch file contains FTP commands that log into an FTP server, and pull down whatever file is there.
I set up a failure workflow to send an email if the step fails. When I have a SQL Server job run this package, and there is no file to dowload, the whole package fails without the failure workflow result firing.
For the step (DTSStep_DTSCreateProcessTask_1), I have the 'FailPackageOnError' property set to -1. In the package properties, I have the check box for 'Fail Package on First Error' cleared.
What do I need to do so that the failure workflow occurs when the step fails?
Thank you for your help!
cdun2
View 4 Replies
View Related
Oct 20, 2006
After many problems with permissions I have got got SQL to accept a notification request but the public static void OnChange(object sender, SqlNotificationEventArgs e) is never triggered. The notification registers and de-registers ok. The same connect string successfuly connects to the same database to process queries.
I can see the GUID suffixed stored procedure, queue and service being created. Where does SQL2005 store the address/name of the routine it is to trigger? (When the notification is cancelled, the guid-siffixed items disappear) I have looked at the generated stored procedure, queue and service, but there is no indication of what is to be called back.
I have followed the instructions at http://msdn2.microsoft.com/en-us/library/ms181122.aspx, but so far without avail. I have checked the Application and system event logs, but there is indication therein. Also the SQL log.
So my questions are:
1) Where is the callback stored (is it a pointer or an actual name) ?
2) What steps should I take to resolve this?
View 7 Replies
View Related
Sep 18, 2006
Using vb.net, does anyone know or has anyone fired off a sql report, save it as PDF to a defined path?
I am knew to sql reporting services and the help files are not very helpfile.
Any sample code would be helpful.
Thanks
View 14 Replies
View Related
Mar 10, 2007
I am using SQL Server 2005 database for a webbased application built on .net 2.0. Here is my situation. I have a SubmitDate and a Status field in a table. I want the trigger to fire based on the datevalue in the SubmitDate field. SubmitDate field is the last date for the user to submit an application. For eg: if the SubmitDate value is 03/10/07 , I want the trigger to fire on :01 of 03/11/07 to change the Status field value to Inactive. Is that possible? Thoughts on how to do it?
View 1 Replies
View Related
May 2, 2007
Hi
In the page load of my webpage I call a databind for a gridview.
It generally calls this event handler :
protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
However sometimes (seemingly randomly) it doesn't.
Any ideas?
Thanks
p
protected void Page_Load(object sender, EventArgs e)
{
...
if (searchText != "")
SqlDataSource1.SelectParameters["search"].DefaultValue = searchText;
else{
SqlDataSource1.SelectParameters["search"].DefaultValue = "";
GridView1.DataBind();
}
View 2 Replies
View Related
May 21, 2004
This trigger fired once ONLY during an insert event. My web form inserted 4 news records so it should fire the trigger 4 times correct?
CREATE TRIGGER trInsertImplementationTaskP1
on dbo.ImplementationTasks
FOR INSERT
AS
DECLARE @ITIDint
SELECT @ITID = (SELECT ITid
from inserted)
EXEC TrigSendNewIMAlertP1 @ITID
View 4 Replies
View Related
Oct 10, 2001
Is this possible?
View 1 Replies
View Related
Jan 4, 2001
Is there a way to fire an alert from a stored procedure ?
thanks
View 1 Replies
View Related
Feb 26, 2003
Hello everybody,
I am trying to set up alert for deadlocks (error 1205)
I am able to create alert with net and e-mail notification (email and and
net notification tested and operator exist)
Trace enabled by
DBCC traceon (-1, 3605, 1204)
To create deadlock I use test script from
http://vyaskn.tripod.com/administration_faq.htm#q4
Deadlock created and writetn into log file ,but alert never fires and
counter always at 0
I am running SQL2000 Enterprise edition SP3.
I used same steps on 5 other server ,but effect is the same, deadlock
detected and written into log file, but notificaion never fires ?
why alert does not fire ,is it a bug ?
Thank
Alex
View 2 Replies
View Related
Mar 4, 2005
If I have a trigger on a field in a table, and I update one record trigger fire properly. If I do a update to that same field on all records in the table the trigger does not fire. I the error in the trigger, or do I need to change my update statement?
View 2 Replies
View Related
Jan 23, 2004
i want to create a trigger that fire after a ady or
fire 4 pm daily
in SQLSERVER
View 4 Replies
View Related
Oct 29, 2014
Is there a way to make a sql table trigger fire off conditionally on calling app?We have this vendor app database which also have in-house custom built app operates on them. Some one are thinking using triggers to audit second part of the app activities, but want to skip the vendor app part of operation for at least performance reason.To my knowledge, the answer is no. An insert trigger will fire off whenever there is an insert. It doesn't provide a mechanism to check which app/process first, then conditionally fire or not fire.
View 6 Replies
View Related
Aug 16, 2005
Hi to all Gurus,I am working with two tables, where in if a record is inserted in onetable an insert trigger fires and inserts relevant information for thatrecord in the second table. This works well within my applications.But it failed (or the trigger never fired)when we used the DTS Importwizard to insert new data into the table from an excel file.How can I overcome this situation? Any help is greatly appreciated.--Part-time BE
View 1 Replies
View Related
Feb 1, 2006
I have a trigger on UPDATE on a table. I'm running some maintenanceUPDATE and DELETE queries which I want the trigger to ignore but at thesame time I want other UPDATE queries that other users might be runningto keep triggering the trigger. Is there a SET statement perhaps thatI could set before my query? Or a clause in the UPDATE statement?This is on MSSQL 2000 server, on Win2k3
View 2 Replies
View Related
Apr 15, 2008
I have a package which have two sequence container, first container is used to transfer data to a staging area and second sequence container is used to transfer to destination from that staging area. And I also apply transaction required to second sequence container.
There are several execute sql tasks and several data flow tasks inside two sequence container.
first sequence container( 1.execution sql task-> 2.data flow ->3.execution sql task) ->
second sequence container(4.execution sql task-> 5.execution sql task-> 6.data flow-> 7.data flow -> 8.execution sql task-> 9.data flow...)
I create ExecutionLog table which is used to log status for this package on our sql server. First this status field is null, then during this package run , it change to 'in process', and after this package finished, it change to 'success' or 'failure' depending this package can run successfully or not.
This package can be run only if status is 'success' ,'failure' or null. So I need to change this status field during package execution.
For updating package to failure, I need to add event handler to change that status using execute sql task.
First time I perform to execute sql task on onError event handler tab (this event handler is applyed on package level ) .
And for testing envent handler I use old schema version to make sure I get failure for '8 execution sql task'.
But package seems to get stuck at '8 execution sql task' inside second sequence container( always yellow when I run from ssis) and never fire envent handler. '8 execution sql task' is used to update related table.
Second time I remove onError envent handler and change to use on onTaskFailed event handler tab (this event handler is applyed on package level ) .
But everything is the same as using onError event handler except I got error output but still can not fire event.
Why '8.execution sql task' can not fire onError or onTaskFailed?
For this case what kind of event handler I need to use, what kind of level I need to apply for this event handler.
View 5 Replies
View Related
Jun 1, 2015
 IF OBJECT_ID('dbo.AuditLog','U') IS NULL BEGIN
CREATE TABLE [dbo].[AuditLog]
[code]....
[AuditLogId] [bigint] IDENTITY(1,1) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[TableName] [nvarchar](200) NULL,
i have the Audit_log table and the trigger above on Account table..it is working fine and i have some 1000 records in Audit log table  , but it did not fire for some customers and i found trigger did not fire for 60 plus customers any possible reasons ??? that trigger did not fire ? Below are the timings account have been created but trigger did not log themÂ
2015-04-29 10:22:08.243
2015-04-29 11:01:49.150
2015-04-29 11:08:16.617
2015-04-29 11:40:34.407
[code]...
View 17 Replies
View Related
May 23, 2007
As I understand it, a subscription has a SQL Agent job which fires and inserts a row into the ReportServer.dbo.Event table. Then the SSRS windows service polls for these and picks them up and runs the subscriptions.
What I'm trying to do is to prevent subscriptions from executing during a 6 hour window every day. End users may define a schedule that runs during that 6 hour window. If they do, it should run those subscriptions as soon as we complete the 6 hour window.
I thought about pausing the schedule, but I'm afraid that when you resume the schedule, it won't catch up if it was supposed to run during the 6 hour window.
So I'm thinking the best idea is to let the SQL Agent job continue to fire and insert rows into the ReportServer.dbo.Event table... but I need some way to prevent the windows service from picking up those events until we've passed the 6 hour window. How can I do this?
Thanks in advance.
View 2 Replies
View Related
Jan 22, 2007
Hello all,
We have encountered a weird problem; we have an application that registers to several queries for notification.
For several weeks everything worked fine, any change to any query result in the database triggered the notification event, but since yesterday the mystery began€¦ since yesterday not all changes triggers events , changing one table raise the notification event, changing the other doesn€™t , all seems fine in the database , the application reports that all queries were registered successfully , in the subscription view in the database we can see that all the queries that the application subscribed to are present€¦
What can be the problem? Is it something in the database? Can it be a problem in our application, please keep in mind that everything worked until yesterday€¦
Thanks,
Eden
View 4 Replies
View Related
Oct 18, 2006
Is it possible to programmatically fire off a SQL Server 2005 Integration Service package? Thank you in advance.
View 2 Replies
View Related
Nov 15, 2005
Is there a way to fire a trigger when a particular user
(with sql login) logs into sql server?
We are planning to use the above trigger to start a job which inturn records some inf.
Thanks.
View 1 Replies
View Related
Mar 2, 2015
A job runs every morning at 3.00 am to back up a database. Many of the tables have triggers on to write updates, deletes and inserts to audit tables.A typical trigger looks like this.
USE [ProjectDB_Live]
GO
/****** Object: Trigger [dbo].[trgStakeHolders] Script Date: 03/02/2015 10:23:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
[code]....
I added a trigger to a table over the weekend - structured the same as the one above and, when the back up ran last night, it copied every row in the table into the audit table as if every row in the table had been updated.
View 4 Replies
View Related
Mar 28, 2006
I have tables that I want to fire either an update or insert trigger on.I could write a script containing a long list of inserts but I'm looking forsomething simpler. Would isql work? Any special conditions to get it towork?I've tried tricks like 'update x set col = col' or 'update x set col = col +'' 'All the alternatives seem to have problems. Any ideas?----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups----= East and West-Coast Server Farms - Total Privacy via Encryption =----
View 5 Replies
View Related
Oct 19, 2006
Does anyone know how to do the following. I'm trying to mimicreplication with triggers.I have 2 databases, each have these 2 tables.1.USERSID intNAME varchar(20)2.CHANGESTABLE varchar(20)TYPE varchar(10)col1 varchar(20)col2 varchar(20)On the USERS table I have a for insert trigger. Whenever a new user isadded the trigger puts an entry into the CHANGES table such as("USERS", "INSERT", "1", "Fred")I now have an application (vb.net) that monitors the CHANGES table onserver1. If it finds an entry it determines the table using the TABLEcolumn and performs the necessary insert and deletes the entry fromCHANGES. Now the problem is server2 also has an for insert trigger onthe USERS table so it puts an entry into CHANGES on server2. As youcan imagine this goes around in a loop.What I was hoping for was someway of saying, "I'm inserting from myapplication so don't do the trigger".Any ideas gratefully appreciated.Steve.
View 9 Replies
View Related
Feb 28, 2007
Hi.I need to make a trigger which fires when after an UPDATE is done ontable A in database X. The trigger must perform a statement whichcopies some of the data from the update to table B in database Y onthe same server.My question is: Can I access the data which caused the trigger to fireor just get an indication of which entry in table A had been updated?Best RegardsJens Christian Andersen.
View 2 Replies
View Related