Re: a rookie question about sp_helptext

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 07/21/04


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


Relevant Pages

  • Re: New to SQL server
    ... it is called triggers. ... ANYTHING THAT YOU CAN DO IN JET IS BABY TALK COMPARED TO WHAT WE CAN DO ... anything that you can do in JET that I can't do in SQL Server ... self-referencing FKs and inline constraints. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: 2010: Essential Diffs?
    ... the view in SQL server is the same thing as a saved select query in access. ... The reason why we don't call them views in Access is because saved queries can also be update queries, delete queries, append queries etc. So using the term "view" has nothing to do with the new JET table engine level triggers. ... Stored procedures don't necessarily mean that they can return tables as data. ... Keep in mind also that these triggers have to be able to run even if VBA or ms access is not installed on your computer. ...
    (comp.databases.ms-access)
  • Re: Encrypting SQL objects
    ... objects, i.e. Stored procs, Views, triggers. ... engine must be able to read the source code at run to be able to compile ... And if SQL Server has access to it, ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Server Express versus Access (In the World Series of Love)
    ... As far as the triggers are concerned, the first case is something to avoid ... have their usefulness, for updateability, but Jet has already updateability ... OF triggers to achieve the same, say, over view, so, advantage to Jet. ... MS SQL Server may have a horse shoe maker right out of the box, ...
    (microsoft.public.access.modulesdaovba)
  • Re: need information for "Before Select" Trigger
    ... As i've added "Enforced Constraints" ... There are no BEFORE SELECT triggers. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)