Errors And ROLLBACKs In Triggers

Nov 28, 2007

Hello,

I'm using SQL Server 2005 Express. I have this task I've been trying to solve:





Code BlockCREATE TABLE A


(
a INT UNIQUE
)
What I want to do is to create an AFTER INSERT trigger on A that inserts 2*a and 3*a for each inserted a. As the a column is UNIQUE, errors might occur. The trigger is to a) ROLLBACK the whole transaction b) if the error occurs when inserting a, then ROLLBACK insertion of 2*a and 3*a. The trigger is suppsed not to check whether 2*a or 3*a are in A already.

The first one seems easy:





Code Block

CREATE TRIGGER InsTr ON A
AFTER INSERT
AS
BEGIN
BEGIN TRY
INSERT INTO A SELECT 2 * a FROM inserted
INSERT INTO A SELECT 3 * a FROM inserted
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
END
GO

DELETE FROM A
GO

BEGIN TRAN
INSERT INTO A VALUES (4) -- insert 4, 8, 12
INSERT INTO A VALUES (2) -- insert 2, 4, 6
INSERT INTO A VALUES (1) -- insert 1, 2, 3
COMMIT
GO

But I can't seem to get the second right:





Code Block

DROP TRIGGER InsTr
GO

CREATE TRIGGER InsTr ON A
AFTER INSERT
AS
BEGIN
SAVE TRANSACTION Wst
BEGIN TRY
INSERT INTO A SELECT 2 * a FROM inserted
INSERT INTO A SELECT 3 * a FROM inserted
COMMIT TRANSACTION Wst
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION Wst
END CATCH
END
GO





DELETE FROM A
GO




BEGIN TRAN
INSERT INTO A VALUES (4) -- insert 4, 8, 12
INSERT INTO A VALUES (2) -- insert 2, 4, 6
INSERT INTO A VALUES (1) -- insert 1, 2, 3
COMMIT
GO


The result is that the A is missing values 1, 2. How to solve this?

View 9 Replies


ADVERTISEMENT

How To Force Immediate Recompile Of Triggers And Detect Errors?

Mar 23, 2006

I need a way to programmatically (via JDBC) find out which triggers for a table may not compile properly, so that I can disable the bad triggers.

I can do this fine in Oracle but cannot figure out if there's a way to do this in SqlServer. (In Oracle I'd just "alter trigger... compile" and select from user_errors.)

I know how to find the triggers that exist on a table, and I know how to enable/disable individual triggers. I know about sp_recompile, but all that does is flag the trigger for recompile at the next execution.

I need to verify whether the trigger is valid without having to actually invoke it. For example, if there's a bad Update trigger, I don't want to actually execute an update on the table.

One example of what I'm dealing with is this... We have Table A and Table B. There is an update trigger on Table B that references column A.col1. Then we alter Table A to drop col1. Later we have to update Table B. At this point the update will fail because of the bad trigger. I want to find and disable the trigger before executing the update on Table B. If there are other triggers on Table B that are valid, I want to leave them alone.

View 2 Replies View Related

Database Mail And Transaction Rollbacks

Dec 13, 2007

Right, Here is a good one.

I have an application that wraps all of the stored procedures it executes in a transaction.

On one of the stored procedures there is an IF statment and if the conditions of that are met then a RaisError will be triggered with a severity of 16.

Before the RaisError, a number of variables are passed to another stored procedure which will create a string and email it to a user using database mail.

The problem i am having is caused by the rollback transaction of the raiserror also rolling back the actions of the email send stored procedure.

Basically i need a way of rolling back the transaction with the execption of the email that is queued.

The only way that i have found to do it is the rollback the transaction in the if statment and then begin a new transaction for the database mail, then Commit it after the SP has been executed and then begin a new transaction for the RaisError.

Here i have two options (neither of which are ideal). Firstly i could commit the RaisError transaction but doing this makes the application cry becuase the transaction count is diffrent to what it expected. The second option is to leave the transaction open and let the application close it. This works fine but i am not comfortable with this as there is the potential of leaving an open transaction.

There must be another way of doing this so any other ideas would be fantastic.

Thanks

Steve

View 3 Replies View Related

How To Protect Errorlogs To Tables From Rollbacks

Apr 5, 2002

Hey!

This post contains the code for this thread: http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=14475

It deals with the problem how to prevent log actions in long running batch jobs from being rolled back. It was heavily inspired by Andy Pope´s approach to error handling (http://www.sqlteam.com/item.asp?ItemID=2290) and in fact you will see much of his code here.

The code:

This procedure dynamically opens a second connection in parallel to the existing connection of the calling procedure using SQL-DMO. So the second connection runs without the scope of transaction of the calling procedure. So no action you take here is rolled back in case the calling proc fails. So be careful! Keeping data integrity is your job here and you could do many weird things to your database.
The procedure dynamically adds a user function that if called just would return the object token of the new DMO connection. So any piece of code in the same batch could reuse the exisiting connection.

LogConstructor
CREATE PROCEDURE LogConstructor AS

if exists (select * from sysobjects where id = object_id (N'dbo.MFF_GetLogObject')
and OBJECTPROPERTY(id, N'IsScalarFunction') = 1)
drop function dbo.MFF_GetLogObject

DECLARE @Error INT
DECLARE @ErrorMsg VARCHAR(255)
DECLARE @oSQLServer INTEGER
DECLARE @Source VARCHAR(255)
DECLARE @Return INTEGER
declare @dynsql nvarchar(3000)

-- Create the SQLServer object
EXEC @Error = sp_OACreate 'SQLDMO.SQLServer', @oSQLServer OUT
IF @Error <> 0
GOTO OA_Error

-- Set the login process to use NT Authentication
EXEC @Error = sp_OASetProperty @oSQLServer, 'LoginSecure', -1
IF @Error <> 0
GOTO OA_Error

-- Connect to server using NT Authentication
EXEC @Error = sp_OAMethod @oSQLServer, 'Connect', NULL, @@SERVERNAME
IF @Error <> 0
GOTO OA_Error

-- Verify the connection
EXEC @Error = sp_OAMethod @oSQLServer, 'VerifyConnection', @Return OUTPUT
IF @Error <> 0
GOTO OA_Error
IF @Return = 0
GOTO OA_Error

-- Create Function with server object
select @dynsql = N'CREATE Function MFF_GetLogObject () RETURNS INT AS BEGIN RETURN ' + cast(@oSQLServer as varchar) + N' END'
EXEC sp_executesql @dynsql

return


OA_Error:
-- Get the error text
EXEC sp_OAGetErrorInfo @oSQLServer, @Source OUT, @ErrorMsg OUT
SELECT
@ErrorMsg = CONVERT(CHAR(16), @Error) + ': ' + @ErrorMsg + ' (Source: ' + @Source + ')'
print @ErrorMsg
return
GO
The next procedure just drops the DMO connection and also drops the user function as the token is invalid by now. This proc should be called within the same batch as the constructor to clean things up properly.

LogDestructor

CREATE PROCEDURE MFP_LogDestructor AS

declare @lo int
select @lo = dbo.MFF_GetLogObject()
exec sp_OADestroy @lo

if exists (select * from sysobjects where id = object_id(N'dbo.MFF_GetLogObject')
and OBJECTPROPERTY(id, N'IsScalarFunction') = 1)
drop function dbo.MFF_GetLogObject
GO

View 2 Replies View Related

Application-controlled Transactions, Isolation Level And Commit/rollbacks

Jun 29, 2007

If application code controls all transaction processing to SQL Server, so it starts a transaction, does any commit or rollback on teh application side, how does that actually work ON SQL Server 2005... Meaning, If the app passes in a isolation level of Repeatable Read, and the database default is different, how can I see what is being used, as a DBA? Can I see any of that via Profiler? can I see when those commits/rollbacks are issued from teh application. They are not sending in "SQL" commit/rollback transaction commands. It's built-in to their architecture to control all that... How can I see what's happening on the database if these are not SQL commands for transaction handling? and how does that work, to start a transaction on the app side, and hold locks etc, on SQL Server if normal SQL Server commands are not being sent? If anyone can point me at decent references to read on that, thanks! Bruce

View 4 Replies View Related

Multiple Triggers On A Table Or Encapsulated Triggers

May 12, 2008

This isn€™t an problem as such, it€™s more of a debate.

If a table needs a number of update triggers which do differing tasks, should these triggers be separated out or encapsulated into one all encompassing trigger. Speaking in terms of performance, it doesn€™t make much of an improvement doing either depending upon the tasks performed. I was wondering in terms of maintenance and best practice etc. My view is that if the triggers do totally differing tasks they should be a trigger each on their own.

www.handleysonline.com

View 12 Replies View Related

SQL Server 2008 :: How To Make Sproc Return Errors For Underlying Table Errors

Jul 1, 2015

I recently updated the datatype of a sproc parameter from bit to tinyint. When I executed the sproc with the updated parameters the sproc appeared to succeed and returned "1 row(s) affected" in the console. However, the update triggered by the sproc did not actually work.

The table column was a bit which only allows 0 or 1 and the sproc was passing a value of 2 so the table was rejecting this value. However, the sproc did not return an error and appeared to return success. So is there a way to configure the database or sproc to return an error message when this type of error occurs?

View 1 Replies View Related

Parent Package Reports Failure On Errors, But No Errors In Log

Jul 31, 2006

I have a parent package that calls child packages inside a For Each container. When I debug/run the parent package (from VS), I get the following error message: Warning: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

It appears to be failing while executing the child package. However, the logs (via the "progress" tab) for both the parent package and the child package show no errors other than the one listed above (and that shows in the parent package log). The child package appears to validate completely without error (all components are green and no error messages in the log). I turned on SSIS logging to a text file and see nothing in there either.

If I bump up the MaximumErrorCount in the parent package and in the Execute Package Task that calls the child package to 4 (to go one above the error count indicated in the message above), the whole thing executes sucessfully. I don't want to leave the Max Error Count set like this. Is there something I am missing? For example are there errors that do not get logged by default? I get some warnings, do a certain number of warnings equal an error?

Thanks,

Lee

View 5 Replies View Related

How To Solve 0 Allocation Errors And 1 Consistency Errors In

Apr 20, 2006

Starwin writes "when i execute DBCC CHECKDB, DBCC CHECKCATALOG
I reveived the following error.
how to solve it?



Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -2093955965, index ID 711, page ID (3:2530). The PageId in the page header = (34443:343146507).
. . . .
. . . .


CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1635188736)' (object ID -1635188736).
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1600811521)' (object ID -1600811521).

. . . .
. . . .

Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -8748568, index ID 50307, page ID (3:2497). The PageId in the page header = (26707:762626875).
Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -7615284, index ID 35836, page ID (3:2534). The PageId in the page heade"

View 1 Replies View Related

Triggers

Jan 3, 2007

Is it possible to achieve this using triggers:When someone tries to delete a row in table A, the trigger should first delete a corresponding row in table B and then delete the row in table A. The reason being that, there is a foreign key set on Table B that references table A. So any attempt to delete a row in table A without deleting the corresponding row from B, throws an error. 

View 1 Replies View Related

Triggers

May 31, 2007

Hello All,
I have to write Trigger for Update,
I have two tables, one is for storing records of current values, and one is for storing history of values.
How to Write a Trigger on Main Table. As we have Inserted and Deleted Tables through which we can find Values, We dont have any Table for UPDATED Values.
 Help me.
 General Problem
 

View 1 Replies View Related

Triggers - Is This Possible?

Jun 15, 2007

I need to create a set of rows every time a new row is inserted into a table.
Example (I think this would work)...
select @insertedId = column1 from insertedselect @id = column1 from table1 where column2 in (select column1 from table2 where column2 = @insertedId)insert into table3 values(x, y, @id)
Is it possible to do the same kind of thing in a situation where the select statement returns multiple values and execute the insert statement for each of these values?
Also, if table3 was in fact the table on which the trigger acts, would it then be executed for every row created by the trigger?
Sorry if I sound confused. I am.

View 2 Replies View Related

Triggers

Dec 6, 2007

 
 hi everybody..i tried to put thios loop in sql server 2000 But it is not taking The @ action taken value ,,it is only taking the default value of @actiontaken value.
SET @ActionTaken = 'A' 
IF (@AType = 'A')IF @Status= 'O' IF (@KAppInd ='Y' AND @DAppInd=null)BEGINSET @ActionTaken = 'O'END
 
Please tell me other option in sql server 2000 for setting variable value based on conditions

View 3 Replies View Related

Triggers In .net

Dec 21, 2007

Hi using triggers i try to insert some values in to my 2 tables: But its showing teh error as "The request for procedure 'Triginsert123s' failed because 'Triginsert123s' is a trigger object." This is my code in back end: sqlcon.Open() Dim cmd As New SqlCommand("Triginsert123s '" & txtID.Text & "','" & txtName.Text & "','" & txtRole.Text & "','" & txtDep.Text & "'", sqlcon) cmd.ExecuteNonQuery() sqlcon.Close() My trigger is: CREATE TRIGGER Triginsert123s ON [dbo].[EmpRole] FOR INSERT AS declare @Eid as tinyint, @Ename as varchar(50), @Role as char(10) Insert into Emprole(Eid,Ename,Role) values(@Eid,@Ename,@Role) insert into empdep(eid,dep) values(@eid,@Role) Whats the probs?, Plz i am new to triggers help me,

View 3 Replies View Related

Triggers

May 9, 2004

Hi All,
I'm using triggers to handle my transaction log to cature inserts and updates. It works fine except if the user clicks on the Save button more than once, the trigger is fired and the record is written to the log even if the record wasn't changed. Does anyone know how to check if the record was actually changed so that it isn't written to the table if it wasn't?

Thank you,
Mike

View 3 Replies View Related

SQL Triggers

Jun 17, 2004

When I execute a stored proc from my asp.net page, will the results of a trigger be returned to my program?

For instance say my stored proc is:

Update Employees set
(Lastname = @Lastname)
where ID = @ID

And my trigger is:

CREATE TRIGGER tr_Employees_U on Employees FOR UPDATE AS
IF UPDATE(lastname)
BEGIN
RAISERROR ('cannot change lastname', 16, 1)
ROLLBACK TRAN
RETURN
END
GO


It seems like since this is an AFTER trigger that my webpage would actually get a valid return code from my stored procedure however the trigger would rollback those changes correct? Or would the trigger get fired and send it's return code to my webpage?

View 10 Replies View Related

Instead Of Triggers

Mar 5, 2006

I'm trying to write an instead of trigger for a view in SqlExpress...the table and views are defined as such:CREATE TABLE [dbo].[Work](    [WorkID] [int] IDENTITY(1,1) Primary Key,    [ResourceID] [int] NOT NULL,    [TaskID] [int] NOT NULL,    [WorkDate] [datetime] NOT NULL,    [WorkQuantity] [float] NOT NULL,    [IsEstimate] [bit] NOT NULL DEFAULT ((0)),    [Project] [int] NOT NULL,);CREATE VIEW [dbo].[ActualWork]ASSELECT     WorkID, ResourceID, TaskID, WorkDate, WorkQuantity, ProjectFROM         dbo.[Work]WHERE     (IsEstimate = 0);CREATE VIEW [dbo].[EstimatedWork]ASSELECT     WorkID, ResourceID, TaskID, WorkDate, WorkQuantity, ProjectFROM         dbo.[Work]WHERE     (IsEstimate = 1);Given that, what is wrong with the following create trigger statement:Create Trigger trg_InsertActualWork ondbo.ActualWork Instead of InsertasBEGIN    Insert into dbo.Work(        ResourceID, TaskID, Project,         WorkDate, WorkQuantity, IsEstimate    )    values (    inserted.ResourceID, inserted.TaskID, inserted.Project,    inserted.WorkDate, inserted.WorkQuantity, 0    );END

View 3 Replies View Related

Triggers

Dec 4, 2001

l'm trying to build a trigger on a table. The reason for the trigger is to check a certain field for the first three characters if it has ie abc it must update another field in this case loanbook to newabc.How do l write the trigger so that it also check if exists and perform the updates. Please help its Urgent. l've listed the trigger below.

CREATE TRIGGER UpdTest_TRGData
ON Test_TRG
FOR insert,Update AS

IF left('Loan_No',3)='ABC'
update Test_TRG
set loanbook = 'NEWABC'

else

IF left('Loan_No',3)='DEF'
update Test_TRG set
loanbook = 'NEWDEF'
where loanbook is null

else

update Test_TRG
set loanbook =left('Loan_No',3)
where loanbook is null

View 4 Replies View Related

Triggers

Dec 5, 2001

I'm a bit confused on this bit please elaborate : " FROM Test_TRG t INNER JOIN inserted i ON t.PK = i.PK ".
The PK is on which field? Basically this trigger should ensure that on insertion of o new loan if
The left(loan_no,3)=MCG and its null then NEWMCG
left(loan_no,3)=MCG and its null then NEWMCG
left(loan_no,3)=KVS and its null then NEWKVS
left(loan_no,3)=MFS and its null then MFS
left(loan_no,3)=TCR and its null then TCR
left(loan_no,3)=ABL and its null then ABL

Listed below is what l've tried to do but l'm missing the PK part.Otherwise everything else you explained
in the script is clear. Thanks man its urgent. When l parse the query its fine , but When l run it
l get an error.



CREATE TRIGGER UpdTest_TRGData
ON Test_TRG
FOR INSERT, UPDATE
AS

UPDATE Test_TRG
SET LoanBook = CASE WHEN LEFT( i.Loan_No, 3 ) = 'MCG' THEN 'NewMCG'
WHEN LEFT( i.Loan_No, 3 ) = 'KVS' AND i.LoanBook IS NULL THEN 'NewKVS'
WHEN LEFT( i.Loan_No, 3 ) = 'MFS' AND i.LoanBook IS NULL THEN 'MFS'
WHEN LEFT( i.Loan_No, 3 ) = 'ABL' AND i.LoanBook IS NULL THEN 'ABL'

WHEN i.LoanBook IS NULL THEN LEFT( i.Loan_No, 3 )
END
FROM Test_TRG t INNER JOIN inserted i ON t.PK = i.PK
-- Fill in Primary Key or other Join Column(s)
WHERE LEFT( i.Loan_No, 3 ) = 'MCG'
OR ( LEFT( i.Loan_No, 3 ) = 'KVS' AND i.LoanBook IS NULL )
OR i.LoanBook IS NULL

====== Error message =================

Server: Msg 207, Level 16, State 3, Procedure UpdTest_TRGData, Line 11
Invalid column name 'PK'.
Server: Msg 207, Level 16, State 1, Procedure UpdTest_TRGData, Line 11
Invalid column name 'PK'.

View 1 Replies View Related

Triggers

Jan 11, 2002

I an loading records from a flat file into a table, which is done everyday by a scheduled job in SQL Server 7.0.

How can I make sure that if the job is run twice in a day for some reason that the same rows are not inserted into the table again? Do I have to write a insert trigger on the table ??? If so how can I achive the objective ??

View 1 Replies View Related

Triggers

Jan 31, 2002

Hi! i have a simple question...is possible to create a trigger who affect multiple tables?
The idea will be something like this:

create trigger mytrigger
on sales, users
as...

of course, this don´t work :)

View 1 Replies View Related

Triggers

Aug 3, 2001

Hey everyone...

I'm working on trying to figure out how to update the child table from the parent via a trigger. This works fine as long as the value is in the child table. If it's not, then I get my foreign key violation. So, My next thought was to simply put in a begin tran / rollback tran within the trigger... My question is this : If I have multiple triggers on the parent table all based on the update of the key field (and the child tables... some 7 of them) all have FK's, if I rollback one trigger does it rollback the entire transaction? Or just the functionality of that trigger? From what I've read, it appears as if it's the entire transaction... if so, how do I get a trigger to 'ignore' itself or not fire based on a select criteria that i have within that same trigger...

Thank you...

View 3 Replies View Related

Triggers

Oct 24, 2001

I just tried creating my first trigger and I'm a little bit confused. I am trying to see if certain fields have changed and will do that by checking the values of the fields in the "master" table and the "Inserted" table. I wasn't sure which table would have the old data and which would have the new, so I created the following trigger to help me determine which was which:

CREATE Trigger upd_cost_master On tbl_cost_master
For Insert, Update As

Declare @U_Name varchar(65)
Declare @O_Name varchar(65)

Select @U_Name=I.submitted_by, @O_Name=O.submitted_by
From tbl_cost_master O Inner Join Inserted I On O.autokey = I.autokey

Print 'Inserted: ' + @U_Name
Print 'tbl_cost_master: ' + @O_Name

Commit Tran

To my surprise, @U_Name and @O_Name contained the same values. I though that one table contained the old values and one contained the new. Was I wrong? If so, is there anyway to compare the Old and New values through a trigger?

Chris

View 1 Replies View Related

Triggers....

Jul 20, 2000

Hi,

I'm using SQL Server 7.0. I have an insert trigger on table t05r. I populate table t05r with a DTS package. The trigger is supposed to add the record which was inserted into t05r, into t39r. After I run the DTS package to populate t05r, I checked t39r and no records where added. What is going wrong? Is it that DTS uses bulk copy and triggers don't fire on bulk copy?

Any help would be greatly appreciated.

Thanks in advance,
Darrin

View 1 Replies View Related

Triggers

Nov 1, 1999

I have an insert trigger on table A which inserts records into table B.
This insertion into B fails( or may fail ) at certain conditions.
I do not want the insertion into A to be affected because of this. Any ways to achieve this ?

View 1 Replies View Related

Triggers

Oct 8, 1999

Hi,
I have 3 tables A,B C and Triggers on each table like.

for insert/update on table 'C' calculates sum(xxfield) and updates
table 'B'.

for insert/update on table 'B' calculates sum(yyfield) and updates
table 'A'.

This works fine if I insert rows OneByOne.
Problem :- Doesn't work if I post entries(hundreds) in to table 'C' using a Query.

whats happening. Can anyone help Me????????

View 1 Replies View Related

TRIGGERS

Nov 12, 2001

How do I know if the triggers on table has been disabled or not. Thanks for your ideas!!!!

View 3 Replies View Related

Triggers Off

Nov 21, 2002

Hello,

I've update triggers on my table, But for some of the transactions, I don't want the triggers to fire. I know in Sybase there are set triggers off. In MS SQL, Is there any similar commands which will set triggers off for particular sql statements.

Thanks A Lot

Sejal

View 2 Replies View Related

Triggers In SQL

May 1, 2003

Hi! I am having trouble with setting triggers while doing my project. The project is on ATM machine driven through SQL. So I have Date of Transaction in one table and Account Expiry in another.

I want to set the trigger to check Account expiry when doing transaction so i wrote T-SQL

select........
getDate()-Dateoftransaction=expiry
begin '...'
end

the system saying I have got an error near the word 'begin'.

I am desperately needing help. running out of ideas.

Thanks in advance.

View 1 Replies View Related

Triggers

Jan 18, 2005

I need to create an after insert, update and delete trigger on the same table. Can I create one trigger that would have all three operations in it or I need to create three separate triggers? Thanks for your help.

View 3 Replies View Related

Triggers

Feb 23, 2006

I have not used triggers before and wanted to know if it was approproate for my issue:

When a new user registers via the web, a record is inserted into the "student" table. I would also like to insert a record into the "StudentCourse" table that adds this new student to a class (studentID, CourseID). I thought I could look into a trigger or stored procedure for this. The problem is that I do not want to mess with the programming side of it as it is an off the shelf system and written in Java/JSP, so I would like to handle this in the DB.
Thanks in advance,

View 2 Replies View Related

Need Help With Triggers

Aug 29, 2007

I am not actually sure if Triggers are the solution to my problem, but I have no experience with them and need help understanding if they will solve my problem.

Users that Access the database through our Front End Software can search on any field (indexed or not). For the most part, they search on indexed fields, but the problem is when they enter and empty string and attempt a search.

The Query that is passed to SQL essentially searches for everything - example below:

SELECT FieldA, FieldB, FieldC FROM Table WHERE IndexedField LIKE ''%'' ORDER BY IndexedField

The result of this is a timeout after 60 seconds and the server being practically coming to a halt during that wait. All users trying to make reads or writes are queued behind that query and it appears as though they are frozen. I have done a lot of monitoring with Profiler to figure out the problem, but I am stuck on how to stop it. The issue lies with the users and that is something I cannot fix. The Front End software cannot be modified. I cannot limit what they search on nor can I limit the fields they can search on.

Being that I can't do anything there, I was hoping I could intercept this query when SQL receives and possibly time it out faster. The queries follow a format, so I was hoping a trigger would do the trick.

Please provide any ideas or input that may help solve my problem. Also, if anybody has any good links to help me with triggers if that will take care of the problem.

EDIT: After doing some reading it is looking like triggers may not be applicable to my problem, but I am still looking for a solution.

Thanks in advance,

Don

View 3 Replies View Related

SQL Triggers

Apr 3, 2008

Is Cascedaing of Triggers possible..??
(Cascading means by one trigger firing another trigger and so on..)

View 1 Replies View Related







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