1

I created an oracle database on docker container using the following command:

docker run -d --name oracle -p 8080:8080 -p 1521:1521 quay.io/maksymbilenko/oracle-12c

The db params are:
hostname: localhost
port: 1521
sid: xe
service name: xe
username: system
password: oracle

I would like to enable unified audit, perform a query such as SELECT and see it on the audit log.

I have access to this DB with sqlplus using the following command:

sqlplus system/oracle@//localhost:1521/xe

or via the app dbeaver.

First issue: According to what I have found, in order to enable unified audit I need to Shutdown the database. This can be done by using sqlplus and running the next command:

 shutdown immediate

When I did that, the action has failed because: ORA-01031: insufficient privileges

Is there any way that I could just run a regular query to enable the unified audit? Do I have to shut it off before? Is there any way that I could do all that I want just with running queries? ( enable, create audit and view actions)

Tal Levi
  • 363
  • 1
  • 6
  • 22
  • To start unified auditing you will need to shutdown all the processes by oracle. And yes you will need to use `sysdba` user to shutdown the database. Refer this link for entire process: https://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/security/sec_uni_audit/sec_uni_audit.html – Popeye Nov 14 '19 at 16:27
  • I tried to run this command in order to connect :sqlplus sysdba/oracle@//localhost:1521/xe but it didn't work, what am I doing wrong? – Tal Levi Nov 14 '19 at 16:30
  • and also if I run it like that: sqlplus / as sysdba I get an error saying ERROR: ORA-12162: TNS:net service name is incorrectly specified – Tal Levi Nov 14 '19 at 16:33
  • Try `sqlplus sys/oracle@//localhost:1521/xe as sysdba` – APC Nov 14 '19 at 16:36

0 Answers0