a rookie question about sp_helptext
From: Jaroslaw Tajcher (ziomuch_at_wp.pl)
Date: 07/21/04
- Next message: Nikola Milic: "Add row if result has no records"
- Previous message: Dan Holmes: "Re: Determining if a bit is set"
- Next in thread: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- Reply: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- Reply: Dominic: "RE: a rookie question about sp_helptext"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 14:25:33 +0200
Hi!
I'm very 'fresh' in DB programming and have one problem...
The problem is that i am to write a function to disable all triggers for
some time.
My idea is to store triggers' creation codes in a seperate table using
sp_helptext, delete triggers and after some time use those codes to restore
triggers. What to do and what data type to use in order to catch the result
table of sp_helptext (all I'm able to do now is to see the table appear on a
screen) and to copy its rows to a temporary table?
Maybe some of you have better ideas to disable triggers...
My system works as follow:
* at the very beginning of transaction a value @@SPID (number of current
thread) is stored in table LOGINS where column USER= id of logged in user;
* values in certain tables are updated - on each table there is set a
trigger ON UPDATE. The trigger checks if the proper @@SPID exists in LOGINS.
If not - an error is being raised.
* a value @@SPID in LOGINS is being cleared.
That works perfectly, but when service want change values directly from
Server Enterprise Manager, the value in LOGINS is not set, and an error
occurs whenever a value is attempted to change. How to disable triggers in
better way, than that I described above?
Thanks!
Yaro
- Next message: Nikola Milic: "Add row if result has no records"
- Previous message: Dan Holmes: "Re: Determining if a bit is set"
- Next in thread: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- Reply: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- Reply: Dominic: "RE: a rookie question about sp_helptext"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|