Triggers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Flippin

    Triggers


    I'm just starting to use triggers in my databases and find the support
    in Enterpise Manager lacking.

    Using Enterprise Manager and Query Analyzer you can maintain the
    triggers, but it's cumbersome.

    Are there better tools for creating and managing triggers?

    Mark Flippin

  • Erland Sommarskog

    #2
    Re: Triggers

    Mark Flippin (me321701@comca st.net) writes:[color=blue]
    > I'm just starting to use triggers in my databases and find the support
    > in Enterpise Manager lacking.
    >
    > Using Enterprise Manager and Query Analyzer you can maintain the
    > triggers, but it's cumbersome.
    >
    > Are there better tools for creating and managing triggers?[/color]

    You don't specify what is cumbersome, but I can't see that trigger should
    be any more cumbersome to use than stored procedure. That's true, that
    maintaining anything from Enterprise Manager is cumbersome, and I usually
    recommend people to stay awau from it...

    In our shop we use a third-party text editor for all our SQL editing. This
    editor, Textpad, has no special SQL capabilities, but is just a good editor.
    As a devloper I load the SQL file through a command-line utility that
    I fire off from within Textpad.

    All our files are under source control. If we have a table widgets, the
    definition for that table is in widgets.tbl. Indexes are in widgets.ix,
    foreign keys are in widgets.fkey and triggers in widgets.tri. Normally
    we have one object per file, with the name macthing the object, but
    triggers are an exception. All triggers for one table is one file.


    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server SP3 at
    Accelerate your AI application's time to market by harnessing the power of your own data and the built-in AI capabilities of SQL Server 2025, the enterprise database with best-in-class security, performance and availability.

    Comment

    • John Bell

      #3
      Re: Triggers

      Hi

      To add to Erlands comments you can script triggers to a window in the object
      browser in QA, therefore there you can stay away from EM!!

      John

      "Mark Flippin" <me321701@comca st.net> wrote in message
      news:m9uhq05ug6 c0ffp5cmhkdhbje 71uv56tqs@4ax.c om...[color=blue]
      >
      > I'm just starting to use triggers in my databases and find the support
      > in Enterpise Manager lacking.
      >
      > Using Enterprise Manager and Query Analyzer you can maintain the
      > triggers, but it's cumbersome.
      >
      > Are there better tools for creating and managing triggers?
      >
      > Mark Flippin
      >[/color]


      Comment

      • Mark Flippin

        #4
        Re: Triggers


        Sorry,

        By cumbersome, I meant finding the triggers and reviewing them. In EM,
        there's too many steps, and you really can't get a feel for the
        triggers for each table. The interface just doesn't flow.

        I didn't realize that the triggers would show up in the QA object
        browser. Thanks John.

        This is more of what I was looking for, a quick graphical
        representation of the triggers for a table, with the ability to
        maintain them

        The plus (to me anyways) is that the object browser provides that same
        type of support for indices, constraints, and dependencies; items
        that I've never really enjoyed maintaining with EM.

        I've always used QA to develop and test my queries, procedures, udf's,
        etc., but I've never really used the object browser. Ooops

        I believe my use of EM is going to be significantly reduced.

        Mark Flippin

        Comment

        • John Bell

          #5
          Re: Triggers

          Hi

          Don't forget Erlands recommendation for using source code control. Using VC
          and breaking down your objects into autonomous scripts, takes you away from
          the need for using EM or even QA to find them. You gain auditability, the
          ease of rolling back changes, ability to build any version of your database,
          and reduced debugging time (especially in the scenarios where it had
          previously seemed to work!). It's a very easy step to move to automated
          builds at whatever frequency you require (and so catch problems earlier,
          reduce your release process time and improved robustness and confidence).

          John

          "Mark Flippin" <me321701@comca st.net> wrote in message
          news:59qiq0pp7g kg6es6m1ul4e7sr uu52sps2r@4ax.c om...[color=blue]
          >
          > Sorry,
          >
          > By cumbersome, I meant finding the triggers and reviewing them. In EM,
          > there's too many steps, and you really can't get a feel for the
          > triggers for each table. The interface just doesn't flow.
          >
          > I didn't realize that the triggers would show up in the QA object
          > browser. Thanks John.
          >
          > This is more of what I was looking for, a quick graphical
          > representation of the triggers for a table, with the ability to
          > maintain them
          >
          > The plus (to me anyways) is that the object browser provides that same
          > type of support for indices, constraints, and dependencies; items
          > that I've never really enjoyed maintaining with EM.
          >
          > I've always used QA to develop and test my queries, procedures, udf's,
          > etc., but I've never really used the object browser. Ooops
          >
          > I believe my use of EM is going to be significantly reduced.
          >
          > Mark Flippin
          >[/color]


          Comment

          Working...