Home » RDBMS Server » Security » Audit question
Audit question [message #218883] Sun, 11 February 2007 20:51 Go to next message
indiana
Messages: 10
Registered: February 2007
Location: China
Junior Member
In order to know which program deletes my table every day, i create a trigger.

CREATE OR REPLACE TRIGGER check_tan
BEFORE DELETE
ON BACKUP.TEST
BEGIN
INSERT INTO audit_result SELECT * FROM v$session;
END;

Warning: TRIGGER created with compilation errors.
ora-00942



where is wrong?
Re: Audit question [message #218914 is a reply to message #218883] Mon, 12 February 2007 00:53 Go to previous messageGo to next message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
This error means "table or view does not exist". So, BACKUP.TEST, audit_result or v$session does not exist or the current user is not allowed to select from it.
Re: Audit question [message #219090 is a reply to message #218914] Mon, 12 February 2007 21:20 Go to previous messageGo to next message
indiana
Messages: 10
Registered: February 2007
Location: China
Junior Member
question resolved

conn / as sysdba;
grant select on sys.v_$session to backup;

then

CREATE OR REPLACE TRIGGER check_tan
BEFORE DELETE
ON BACKUP.TEST
BEGIN
INSERT INTO audit_result SELECT * FROM v_$session;
END;

trigger created and no wrong.

NOTE:it's v_$session not v$session
Re: Audit question [message #219099 is a reply to message #219090] Mon, 12 February 2007 23:03 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
"skooman" point you right table or view doesn't not exists.

v$session is not table it is synonym for v_$session dictionary table.


regards
Taj
Re: Audit question [message #219120 is a reply to message #219099] Tue, 13 February 2007 01:18 Go to previous message
indiana
Messages: 10
Registered: February 2007
Location: China
Junior Member
Hi
so i cannot grant select on v$session to a user.
it's a Synonym.

tx

[Updated on: Tue, 13 February 2007 01:22]

Report message to a moderator

Previous Topic: Grant EXECUTE ANY PROCEDURE to the user
Next Topic: Security Breach using DBSNMP user.
Goto Forum:
  


Current Time: Thu Dec 12 08:14:35 CST 2024