Home » SQL & PL/SQL » SQL & PL/SQL » DDL TRIGGER (Oracle 10g,XP)
DDL TRIGGER [message #405846] Sat, 30 May 2009 01:06 Go to next message
rakeshramm
Messages: 175
Registered: September 2006
Location: Oracle4u.com
Senior Member


create table SCOTT.DDL_LOG
(
  ORA_SYSEVENT       VARCHAR2(4000),
  ORA_DICT_OBJ_OWNER VARCHAR2(4000),
  ORA_LOGIN_USER     VARCHAR2(4000),
  ORA_DICT_OBJ_TYPE  VARCHAR2(4000),
  ORA_DICT_OBJ_NAME  VARCHAR2(4000),
  USERR              VARCHAR2(30),
  DAT                DATE,
  PROGRAM            VARCHAR2(64),
  OSUSER             VARCHAR2(30)
)

CREATE OR REPLACE TRIGGER TR_audit
AFTER CREATE  ON  SCHEMA
BEGIN
INSERT INTO   SCOTT.DDL_LOG
SELECT ora_sysevent, ora_dict_obj_owner,ORA_LOGIN_USER,ORA_DICT_OBJ_TYPE,
ora_dict_obj_name,USER userr, SYSDATE dat    FROM dual ;

END TR_audit;



Here my DBA will not grant scott.ddl_log to my schema 'TEST' .How can I use AUTHID CURRENT_USER

Thanks in Advance .
Re: DDL TRIGGER [message #405848 is a reply to message #405846] Sat, 30 May 2009 01:12 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Not possible and meaningless and on a trigger.
Your table owner must have the insert privilege on log table.

Regards
Michel
Previous Topic: Tool for Test data generation and loading
Next Topic: How to delete duplicate records? (splitted topic)
Goto Forum:
  


Current Time: Sun Dec 04 16:36:45 CST 2016

Total time taken to generate the page: 0.07690 seconds