SQL Server Performance

Trigger Template

Discussion in 'General Developer Questions' started by paandi, May 28, 2003.

  1. paandi New Member


    I have a table in the name PRD_M_FORMULASTD in one of my databases. In Enterprise Manager when i right click the table and select All Tasks => Manage Triggers option, it opens a window where in i can write the necessary triggers that i wish to associate to the table.

    By default, a trigger template appears in the window which will be appearing like,


    But in one of the other machines, the user had unknowingly removed the above template text and had typed some text and clicked the "Save as Template" button. Now in his enterprise manager for all the tables in all the databases, the user is getting this text only.

    I had then tried in replacing the template, but iam not able to substitute the tablename part of the above mentioned template dynamically. I had tried using the "sysname" text in the above template in the place of "PRD_M_FORMULASTD". But all the tables have the sysname text only in all the table -> trigger template.

    I had also tried searching the trigger template files (.tql) file. But iam not able to achieve the task. What should i do to create the trigger templates as mentioned above.

    Thanks in advance.

    With Regards,
    Sridharan. J.

    With Regards,
    Sridharan Jeganathan.
  2. satya Moderator

    BOL refers Yes. By default, a blank document is always displayed. However, you can define and save a special template by typing the Transact-SQL statements into a window in SQL Query Analyzer, selecting Save As, and saving it in the directory you want as a Template SQL File (*.tql). You can select the template you want to open by selecting the drop down New icon on the toolbar, and then selecting Template.

    Satya SKJ
  3. vbkenya New Member

Share This Page