|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 8:23 AM
Points: 4,
Visits: 2
|
|
hi, i have 3 databases in the same sql 2005 server db1 and db2 hold both a table A in which only rows get inserted, never deleted nor updated
i needed to combine both so i created db3 with the same table A' and with an extra column identifying the origin since i wanted the events to be inserted in real time i created a trigger on both db1.A and db2.A
create trigger on db1.A after insert set nocount on insert into db3.A' (origigin, fields...) select 1,INSERTED.fields... from inserted
same trigger on db2.A
now this works rather well but sometimes throws a deadlock and i have no clue why it should...
any ideas/suggestions? tia, marc
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 12:44 AM
Points: 6,696,
Visits: 11,716
|
|
Can you post the deadlock graph?
If you do not already have one captured enable trace flag 1222 and then one occurs again you can retrieve it from the SQL Error Log.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 8:23 AM
Points: 4,
Visits: 2
|
|
no i can't... i got the error during havy load but also when there were only 10 recs inserted... so no trace is running at this moment and i can't turn the trigger on at this point when the system is under heavy load cause they don't want instability so this limits my options.... i could turn it on now but i can't simulate the problem... thx
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 8:23 AM
Points: 4,
Visits: 2
|
|
| the only other thing worth mentioning is that it is a clustered server...
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 12:44 AM
Points: 6,696,
Visits: 11,716
|
|
Enabling a Trace Flag is not the same as running a Trace. If you do not have a deadlock graph and you cannot enable the Trace Flag and the trigger to attain one the next time this happens then it is going to be hard, if not impossible, to help you.
Clustering does not have any effect on deadlock issues. Deadlocks occur for many reasons and the root cause of some scenarios can be quite difficult to determine, especially without a deadlock graph.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 13, 2013 8:23 AM
Points: 4,
Visits: 2
|
|
ok i see the point i'll try to convince the customer...
|
|
|
|