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). thanks, i didn't think i would be able to, this was going to be used on an application i don't have control over the source so i can't do it manually after each statement. i might just monitor the systable, syscolumn tables for changes.
(26 Sep '13, 09:16)
Robert2
|
The transaction log contains a record of all DDL, and dbtran.exe can be used to read it. 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?
(26 Sep '13, 09:43)
Volker Barth
Replies hidden
I'll let you know after Foxhound 3.0 ships :)
(26 Sep '13, 10:00)
Breck Carter
|