|
Home > Archive > MS SQL Server > March 2006 > Triggers failing
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Jason Fischer 2006-03-05, 8:23 pm |
| Hi,
What could cause an update trigger on a table to fail?
Details on anything and everything that could do this would be much
appreciated.
| |
| Ben Nevarez 2006-03-05, 8:23 pm |
|
Jason,
What your update trigger was supposed to do?
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jason Fischer" wrote:
> Hi,
>
> What could cause an update trigger on a table to fail?
> Details on anything and everything that could do this would be much
> appreciated.
>
>
>
| |
| Jason Fischer 2006-03-05, 8:23 pm |
| it is a very basic trigger that will insert data into a 2nd table based on
values that have modified in the first table.
"Ben Nevarez" < BenNevarez@discussio
ns.microsoft.com> wrote in message
news:05669FB4-5DBB-49D6-8646- 7439437F7830@microso
ft.com...[color=darkred]
>
> Jason,
>
> What your update trigger was supposed to do?
>
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
>
> "Jason Fischer" wrote:
>
| |
| Ben Nevarez 2006-03-05, 8:23 pm |
|
Send us more info starting with the code of the trigger. What is the
failure? That the record was not created on the second table?
If the record was not created, is there any PK, unique index, foreign Key?
Ben Nevarez, MCDBA, OCP
Database Administrator
"Jason Fischer" wrote:
> it is a very basic trigger that will insert data into a 2nd table based on
> values that have modified in the first table.
>
>
> "Ben Nevarez" < BenNevarez@discussio
ns.microsoft.com> wrote in message
> news:05669FB4-5DBB-49D6-8646- 7439437F7830@microso
ft.com...
>
>
>
| |
| Sreejith G 2006-03-05, 8:23 pm |
| Check Sql Error log also, to see if there is some error.Whats the error
description? Which is the Sql version?
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Ben Nevarez" wrote:
[color=darkred]
>
> Send us more info starting with the code of the trigger. What is the
> failure? That the record was not created on the second table?
>
> If the record was not created, is there any PK, unique index, foreign Key?
>
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
>
> "Jason Fischer" wrote:
>
| |
|
| The most common failure is that people are gorgetting that triggers are
fired on a statement not on a row basis,so make sure that your trigger
is able to handle the occurence of more than ONE row. If you already
did, try to execute your statement in QA to see the error code which is
returned. If you can=B4t see any, try to set PRINT / Select statements
about the state of the trigger and data in your trigger. If you have
the chance to debug on your server, write a stored procedure which
executes a command firing the triggers, the command firing the trigger
wil let you step in the triger code as well.
HTH, JensSuessmeyer.
| |
| Sreejith G 2006-03-05, 8:24 pm |
| For multiple row handling in Trigger read this link,
http://www.sqlteam.com/item.asp?ItemID=3850
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Jens" wrote:
> The most common failure is that people are gorgetting that triggers are
> fired on a statement not on a row basis,so make sure that your trigger
> is able to handle the occurence of more than ONE row. If you already
> did, try to execute your statement in QA to see the error code which is
> returned. If you can“t see any, try to set PRINT / Select statements
> about the state of the trigger and data in your trigger. If you have
> the chance to debug on your server, write a stored procedure which
> executes a command firing the triggers, the command firing the trigger
> wil let you step in the triger code as well.
>
> HTH, JensSuessmeyer.
>
>
| |
| Jason Fischer 2006-03-06, 7:23 am |
| Hi everyone,
That's the thing, there was no error returned.
There just wasn't any data in the second table.
The second table is very flat, no PK, FK or anything in it.
It is just raw data.
It is SQL 2000 Ent edition
|
|
|
|
|