espeir
asked on
Trigger on "CREATE TABLE"
Is it possible to have a trigger fire off when a table is created? I know it's not possible to add a trigger to the sysobjects table, and I think I'll just have to run a process to check for changes every once in a while. I would like to see if anybody knows if this can be done though. I'm modifying some 3rd party software, and there is a set of tables that only exist when specific user-defined fields are created in the software. I'm attaching triggers to those tables, but I can obviously only attach them after the tables have been created, so I would basically like a trigger that creates a trigger on a newly created table. Anybody know if this can be done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
FYI: SQL Server 2005 does support this.
create a test database and try to put the trigger on the sysobject table
this table is updated whenever a db object is created ...
but whats your specific requirement?
Kir@n