August 10, 2008 at 5:14 am
I am using WinCC as Front End and SQL Server 2000 as Backend. WinCC is Standard SCADA Application for Siemens Sytems. when Data Insert into Table from WinCC then Trigger will not executed.
But i am executing query from query analyser then Trigger works Fine.
why should this happens.
Please Help.............
August 10, 2008 at 11:10 am
It can't happen unless the trigger has code in it telling it to ignore the inserts from WinCC. Recommend you post the trigger code.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 10, 2008 at 11:23 am
Check that the front end is inserting into the database you think it is. It's an easy mistake to make.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 10, 2008 at 9:27 pm
I have written the Following Trigger on MsArcLong.
and there is no error in it.
because it is executed when data inserted through Query analyser.
Create Trigger Test on MSArcLong
For Insert,Update
As
Insert into MSArcLong1 Select Top 1 * from MsArcLong Order by counter Desc
August 10, 2008 at 9:31 pm
WinCC can Inserted data in the Table.
August 10, 2008 at 9:43 pm
yogesh.khaire (8/10/2008)
I have written the Following Trigger on MsArcLong.and there is no error in it.
because it is executed when data inserted through Query analyser.
Create Trigger Test on MSArcLong
For Insert,Update
As
Insert into MSArcLong1 Select Top 1 * from MsArcLong Order by counter Desc
Like Gail said, you need to check your app for which database is being used because that trigger will work no matter what inserts data into the MSArcLong tablel.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 10, 2008 at 9:47 pm
WinCC is a Standard Application which was Developed by Siemens.
we don't have Source code for that
August 10, 2008 at 10:25 pm
Ummm.... ok... how do you know it's supposed to insert into MSArcLong in the database you have setup?
The only other thing I can think of is that the app has code to disable any and all triggers, in which case, you're toast. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
August 10, 2008 at 10:37 pm
Is there any way other than Trigger. ?
But i want fast Updation. when ever Data Inserted or updated in the Table i want to be insert that Data into another Table which was created.
August 10, 2008 at 10:48 pm
yogesh.khaire (8/10/2008)
Is there any way other than Trigger. ?But i want fast Updation. when ever Data Inserted or updated in the Table i want to be insert that Data into another Table which was created.
Sure... if you make a change to and recompile the source code. Other than that, trigger is the only way to go. You just need to verify that the app is writing to the database and table you think it is because a trigger on the table will work just fine... and I don't believe that most 3rd party programmers are insidious enough to disable triggers on their tables.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 11, 2008 at 12:28 pm
Jeff,
He appears to just want a copy of the insert, so would replication meet his need, or would that cause problems on speed of "Updation" ?
Steve
(aka smunson)
:):):)
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
August 11, 2008 at 12:42 pm
What does profiler say about the Insert code?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 11, 2008 at 7:25 pm
smunson (8/11/2008)
Jeff,He appears to just want a copy of the insert, so would replication meet his need, or would that cause problems on speed of "Updation" ?
Steve
(aka smunson)
:):):)
I think replication would be adding rust to the bucket. 😀 If the trigger isn't working, then I believe he's looking at the wrong table. If the trigger isn't working, then chances are you won't be able to get replication working either.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply