Home > dba, security, sql > track ddl change (part 2)

track ddl change (part 2)

I wrote about tracking ddl changes with a trigger there : track ddl changes

Another option is to use auditing.

A new and cool alternative is to use enable_ddl_logging (11gR2). This will track all ddl’s in the alert log

ALTER SYSTEM SET enable_ddl_logging=TRUE

Then later you issue

create table t(x number)

and you see in the alertLSC01.log

Tue Apr 05 14:43:32 2011
create table t(x number)

Wait, that’s not really verbose !?

Remember the alert log is just there for backward compatibility, it is time you start looking in the xml file :-)


<msg time='2011-04-05T14:43:42.210+02:00' org_id='oracle' comp_id='rdbms'
 msg_id='opiexe:3937:4222333111' client_id='' type='NOTIFICATION'
 group='schema_ddl' level='16' host_id='srv01'
 host_addr='192.168.0.141' module='TOAD Beta 11.0.0.52' pid='2777799'>
 <txt>create table t(x number)
 </txt>
</msg>

There is not really much more there but the module, which indeed reveals someone is using TOAD to access my database !

Tags:
  1. Anonymous
    April 5th, 2011 at 21:00 | #1

    “which indeed reveals someone is using TOAD to access my database” – are you suggesting that using TOAD is wrong against database???

  2. April 5th, 2011 at 21:11 | #2

    shhh, don’t tell anyone, it’s me ;-)

  3. joel garry
    April 6th, 2011 at 01:01 | #3

    exec dbms_application_info.set_module(‘Toadlicker’,';-)’);

  4. April 6th, 2011 at 09:20 | #4

    This feature comes with “Oracle Change Management Pack” and is available for EE only. You got pay extra to use this. :(

    http://download.oracle.com/docs/cd/B28359_01/license.111/b28287/editions.htm#CJACGHEB

  5. April 6th, 2011 at 10:46 | #5

    @Joel ;-) indeed you could fake your module !

    @Asif Thanks for this info

  6. April 11th, 2011 at 10:39 | #6

    Hi Laurent
    , this feature was already in 11gR1 available.
    See here: http://sysdba.wordpress.com/2007/10/16/ddd-logging-in-the-alert-log-in-11g/
    Cheers,
    Lutz

  7. April 12th, 2011 at 08:30 | #7

    Indeed, any clue why it is not documented in the 11gR1 reference ?

  8. Ebrahim
    June 6th, 2011 at 18:33 | #8

    So, please let us all know, what are, if any, are issues using Toad against a database? I have some DBAs talking about turning off access to clients using Toad, but I dont know what the reservations are?

    Thanks

  9. June 7th, 2011 at 11:17 | #9

    @Ebrahim : I like your question, I tried to answered it there : http://laurentschneider.com/wordpress/2011/06/on-using-toad-against-a-database.html

  1. June 7th, 2011 at 11:17 | #1
  2. June 30th, 2011 at 02:23 | #2
*