Re: a rookie question about sp_helptext
From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 07/21/04
- Next message: Adam Machanic: "Re: STORED PROCEDURE IF STATEMENT"
- Previous message: Adam Machanic: "Re: parallelism"
- In reply to: Jaroslaw Tajcher: "a rookie question about sp_helptext"
- Next in thread: Dominic: "RE: a rookie question about sp_helptext"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 14:11:26 +0100
See example H in the documentation of "ALTER TABLE" in SQL Server Books
Online.
-- HTH, Vyas, MVP (SQL Server) http://vyaskn.tripod.com/ Is .NET important for a database professional? http://vyaskn.tripod.com/poll.htm "Jaroslaw Tajcher" <ziomuch@wp.pl> wrote in message news:cdlncl$pkr$1@atlantis.news.tpi.pl... 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: Adam Machanic: "Re: STORED PROCEDURE IF STATEMENT"
- Previous message: Adam Machanic: "Re: parallelism"
- In reply to: Jaroslaw Tajcher: "a rookie question about sp_helptext"
- Next in thread: Dominic: "RE: a rookie question about sp_helptext"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|