Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    5

    Question Unanswered: Trigger on table creation

    Hi all,
    I would like to know if it is possible to create a trigger on db2 10.1 zLinux that will be "fired" when a new table is created.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    a trigger can only be defined on existing table : update/delete/insert
    audit for ddl should be used (I think)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jan 2013
    Posts
    5
    Quote Originally Posted by przytula_guy View Post
    a trigger can only be defined on existing table : update/delete/insert
    audit for ddl should be used (I think)
    The original Idea was to create a trigger on sysibm.systables but then I found out that you can't create triggers on system tables.
    What you mean by audit for ddl? You mean I should have table creation auditing enabled and through this procedure issue my trigger?
    Last edited by airmil; 01-30-13 at 06:29.

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    check
    Audit events
    see : OBJMAINT
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jan 2013
    Posts
    5
    Thanks for your reply,
    I would it up and come again if I have any question.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •