how to make the script for the triggers only in 2000

  • hi !

    how to meke the script of triggers only.

    now wat im doing i have to take the tables n then triggers with it and then deleting the tables script. is there any simple way for just triggers only ?

     

    Kindest Regards,

    Atif Saeed Khan

  • In EM (Enterprise Manager)

    Right click on the database

    Select All Tasks / Generate SQL Script

    Click Show All

    Select All Tables (or select individual tables if required)

    Click Formatting (tab)

    Deselect the Generate CREATE / DROP options

    Click Options (tab)

    Select Script triggers

    Select appropriate File Format and Create one file/individual files options

    Click OK

    Far away is close at hand in the images of elsewhere.
    Anon.

  • here's another way, note that this does not order the triggers in dependancy order, it just lists them.

    select parent_objects.name,

           trigger_sysobjects.name,

    syscomments.Text

     from sysobjects trigger_sysobjects

    inner join sysobjects parent_objects on parent_objects.id=  trigger_sysobjects.parent_obj

    inner join syscomments on trigger_sysobjects.id=syscomments.id

    where trigger_sysobjects.xtype='TR'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply