on 2013 Sep 26 10:02 AM
I would like to know if a trigger / event could be executed when a table is created/altered/dropped etc.
So is it possible or is there some other way of achieving this goal?
thanks
No, SQL Anywhere does not support triggers on DDL operations, only DML.
I can't think of anyway to automatically execute a sequence of SQL statements when a DDL operation is performed, but you can always do it manually (i.e. execute the SQL after each create/alter/drop statement).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The transaction log contains a record of all DDL, and dbtran.exe can be used to read it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you're thinking of a loop making DBTRAN run "continuously" against the active log (possibly starting with the last checkpoint), and looking for "CREATE ..." in the generated SQL script? And then use these statements as starting point or check the schema for changes?
Or auditing with only the audit type DDL?
Foxhound 4.0 with a "live schema-monitoring" facility?
User | Count |
---|---|
62 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.