Re: How to generate scripts from existing triggers?

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 07/02/04


Date: Fri, 2 Jul 2004 15:30:11 +0530

Hi,

You can use "Generate SQL scripts" from Enterprise manager to script
Triggers.
How to do:-

1. Open Enterprise manager -- Select database and right click and select all
tasks
2. Select "Generate SQL Script
3. In General click "Show ALL", Check "All tables" check box
4. In format -- Uncheck both "Generate the CREATE " and "Genereate the DROP
" object -- check box
5. In options -- check the "SCRIPT TRIGGER"
6. Go back to General - "preview " button to preview , CLick ok to save the
triggers to a specific location
  in hard disk.

--
Thanks
Hari
MCDBA
"Michael" <vbado2003@yahoo.com.sg> wrote in message
news:e$uSf8AYEHA.3156@TK2MSFTNGP12.phx.gbl...
> Hi All,
>
> SQL2000 server.
>
> I have a database system with more than 500 user tables, each table has 2
or
> 3 triggers.
> I am going to upgrade this database to a new application version.
> I have hundred  more table need to be updated, before updating those
tables,
> I need to remove all the triggers, then modify tables structure, and then
> re-apply those triggers.
>
> Could you please tell me how to generate scripts for those existing
triggers
> from my current database?
> I dont want to use SQL analyze table by table manually do it, any way to
> generate the scripts quickly?
>
> Thank you
>
> Michael
>
>
>
>
>


Relevant Pages

  • Re: PUBLIC Role - What am I missing?
    ... you can make it less painful by using the EM and "Generating SQL Script" ... Check "Script database users and database roles" on the options panel ... After generating the SQL script file then extract all the grants and denies ...
    (microsoft.public.sqlserver.security)
  • Re: How can I make a primary key in my SQL database?
    ... > I normally use code like this when connecting to my database... ... How can I define a Primary Key? ... script is to use the Generate SQL Script function in Enterprise Manager. ...
    (microsoft.public.inetserver.asp.db)
  • How to create the database?
    ... I've been tinkering around with SQL script and I'm getting the ... to download and create the database on my handheld. ... over a 1 MB flat data file to load up into the database and then, ...
    (microsoft.public.sqlserver.ce)
  • EM SQL Script generation BUG?
    ... I'm using Enterprise Manager to generate a SQL script from a database, ... This appears to be a bug in the script generator. ...
    (microsoft.public.sqlserver.tools)
  • Unable to script database
    ... I am trying to script a database and then create another database to see ... Are the triggers normally encrypted. ... Is there a way to tell the system script the data then encrypt the stored ...
    (microsoft.public.sqlserver.server)