SQL Command Codes

Every SQL command has a numeric code. The command code is used internally and is reported in the COMMAND column of V$SESSION

The SYS.AUDIT_ACTIONS table contains a list of command codes which are used when auditing is enabled. SYS.AUDIT_ACTIONS provides a useful definition of the commands available in a specific Oracle release

The table is populated by the $ORACLE_HOME/rdbms/admin/cataudit.sql catalog script

SYS.AUDIT_ACTIONS has the following columns:

Column NameData Type
ACTIONNUMBER
NAMEVARCHAR2(28)

The following table shows the audit actions in Oracle 10.2.

ActionName
0UNKNOWN
1CREATE TABLE
2INSERT
3SELECT
4CREATE CLUSTER
5ALTER CLUSTER
6UPDATE
7DELETE
8DROP CLUSTER
9CREATE INDEX
10DROP INDEX
11ALTER INDEX
12DROP TABLE
13CREATE SEQUENCE
14ALTER SEQUENCE
15ALTER TABLE
16DROP SEQUENCE
17GRANT OBJECT
18REVOKE OBJECT
19CREATE SYNONYM
20DROP SYNONYM
21CREATE VIEW
22DROP VIEW
23VALIDATE INDEX
24CREATE PROCEDURE
25ALTER PROCEDURE
26LOCK
27NO-OP
28RENAME
29COMMENT
30AUDIT OBJECT
31NOAUDIT OBJECT
32CREATE DATABASE LINK
33DROP DATABASE LINK
34CREATE DATABASE
35ALTER DATABASE
36CREATE ROLLBACK SEG
37ALTER ROLLBACK SEG
38DROP ROLLBACK SEG
39CREATE TABLESPACE
40ALTER TABLESPACE
41DROP TABLESPACE
42ALTER SESSION
43ALTER USER
44COMMIT
45ROLLBACK
46SAVEPOINT
47PL/SQL EXECUTE
48SET TRANSACTION
49ALTER SYSTEM
50EXPLAIN
51CREATE USER
52CREATE ROLE
53DROP USER
54DROP ROLE
55SET ROLE
56CREATE SCHEMA
57CREATE CONTROL FILE
59CREATE TRIGGER
60ALTER TRIGGER
61DROP TRIGGER
62ANALYZE TABLE
63ANALYZE INDEX
64ANALYZE CLUSTER
65CREATE PROFILE
66DROP PROFILE
67ALTER PROFILE
68DROP PROCEDURE
70ALTER RESOURCE COST
71CREATE MATERIALIZED VIEW LOG
72ALTER MATERIALIZED VIEW LOG
73DROP MATERIALIZED VIEW LOG
74CREATE MATERIALIZED VIEW
75ALTER MATERIALIZED VIEW
76DROP MATERIALIZED VIEW
77CREATE TYPE
78DROP TYPE
79ALTER ROLE
80ALTER TYPE
81CREATE TYPE BODY
82ALTER TYPE BODY
83DROP TYPE BODY
84DROP LIBRARY
85TRUNCATE TABLE
86TRUNCATE CLUSTER
91CREATE FUNCTION
92ALTER FUNCTION
93DROP FUNCTION
94CREATE PACKAGE
95ALTER PACKAGE
96DROP PACKAGE
97CREATE PACKAGE BODY
98ALTER PACKAGE BODY
99DROP PACKAGE BODY
100LOGON
101LOGOFF
102LOGOFF BY CLEANUP
103SESSION REC
104SYSTEM AUDIT
105SYSTEM NOAUDIT
106AUDIT DEFAULT
107NOAUDIT DEFAULT
108SYSTEM GRANT
109SYSTEM REVOKE
110CREATE PUBLIC SYNONYM
111DROP PUBLIC SYNONYM
112CREATE PUBLIC DATABASE LINK
113DROP PUBLIC DATABASE LINK
114GRANT ROLE
115REVOKE ROLE
116EXECUTE PROCEDURE
117USER COMMENT
118ENABLE TRIGGER
119DISABLE TRIGGER
120ENABLE ALL TRIGGERS
121DISABLE ALL TRIGGERS
122NETWORK ERROR
123EXECUTE TYPE
128FLASHBACK
129CREATE SESSION
157CREATE DIRECTORY
158DROP DIRECTORY
159CREATE LIBRARY
160CREATE JAVA
161ALTER JAVA
162DROP JAVA
163CREATE OPERATOR
164CREATE INDEXTYPE
165DROP INDEXTYPE
167DROP OPERATOR
168ASSOCIATE STATISTICS
169DISASSOCIATE STATISTICS
170CALL METHOD
171CREATE SUMMARY
172ALTER SUMMARY
173DROP SUMMARY
174CREATE DIMENSION
175ALTER DIMENSION
176DROP DIMENSION
177CREATE CONTEXT
178DROP CONTEXT
179ALTER OUTLINE
180CREATE OUTLINE
181DROP OUTLINE
182UPDATE INDEXES
183ALTER OPERATOR
197PURGE USER_RECYCLEBIN
198PURGE DBA_RECYCLEBIN
199PURGE TABLESAPCE
200PURGE TABLE
201PURGE INDEX
202UNDROP OBJECT
204FLASHBACK DATABASE
205FLASHBACK TABLE
206CREATE RESTORE POINT
207DROP RESTORE POINT
208PROXY AUTHENTICATION ONLY
209DECLARE REWRITE EQUIVALENCE
210ALTER REWRITE EQUIVALENCE
211DROP REWRITE EQUIVALENCE