USER01@HUIYI>create or replace trigger ddl_schema 2 after alter or drop or create on schema 3 begin 4 dbms_output.put_line('Object Name:'||ora_dict_obj_name); 5 dbms_output.put_line('Object Owner:'||ora_dict_obj_owner); 6 dbms_output.put_line('Object Type:'||ora_dict_obj_type); 7 end; 8 / Trigger created. USER01@HUIYI>create table tmp1 2 ( 3 col number 4 ) 5 / Table created. USER01@HUIYI>call dbms_output.put_line(''); Object Name:TMP1 Object Owner:USER01 Object Type:TABLE Call completed. USER01@HUIYI>alter table tmp1 add (col2 number); Table altered. USER01@HUIYI>call dbms_output.put_line(''); Object Name:TMP1 Object Owner:USER01 Object Type:TABLE Object Name:TMP1 Object Owner:USER01 Object Type:TABLE Call completed. USER01@HUIYI>drop table tmp1; Table dropped. USER01@HUIYI>call dbms_output.put_line(''); Object Name:TMP1 Object Owner:USER01 Object Type:TABLE Call completed.[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8799875/viewspace-903361/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8799875/viewspace-903361/