Disable DDL in my Oracle Database

08 Oct, 2012 | techniek

Ok, so you want to prevent any DDL being executed in your Oracle DB? You could create read-only accounts but here is another way. Create this trigger:

create or replace trigger no_ddl
  before ddl on schema
begin
  raise_application_error( -20001, 'DDL execution temporarily not allowed;');
end no_ddl;

All DDL raises an error, except for the ‘drop trigger no_ddl’ by the way.

@2021 Plance. All rights reserved.