Home » SQL & PL/SQL » SQL & PL/SQL » Audit_trail=DB
Audit_trail=DB [message #162262] Thu, 09 March 2006 07:45 Go to next message
orajamzs
Messages: 110
Registered: February 2006
Location: hyderabad
Senior Member
How can I set parameter AUDIT_TRAIL=DB, As it is by default preset as None. I tried as:
SQL> connecte sys/xxxxxx as sysdba
SQL> alter system set audit_trail=db scope=pfile;
alter system set audit_trail=db scope=pfile
                                      *
ERROR at line 1:
ORA-00922: missing or invalid option

SQL> alter system set audit_trail=db scope=spfile;
alter system set audit_trail=db scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

SQL>  alter system set audit_trail=db;
 alter system set audit_trail=db
                  *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


I tried to set it by manually in initxxx.ora,but oracle failed to startup. Suggest me.
Re: Audit_trail=DB [message #235452 is a reply to message #162262] Sun, 06 May 2007 03:57 Go to previous messageGo to next message
aciolac
Messages: 242
Registered: February 2006
Senior Member
Try to set audit_trail=db in the init.ora. The error with spfile can be caused by fact, that you possible are not using spfile in Your database.
Re: Audit_trail=DB [message #235475 is a reply to message #162262] Sun, 06 May 2007 12:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
SQL> alter system set audit_trail=db scope=pfile;
alter system set audit_trail=db scope=pfile
*
ERROR at line 1:
ORA-00922: missing or invalid option


You can't modify a pfile. A pfile (init.ora) can be anywhere in the world, Oracle does not know which one you use.
Quote:
SQL> alter system set audit_trail=db scope=spfile;
alter system set audit_trail=db scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup


You didn't use a spfile to start the database, so Oracle can't modify it.
Quote:
SQL> alter system set audit_trail=db;
alter system set audit_trail=db
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

Default value for scope is BOTH, so it includes MEMORY and AUDIT_TRAIL cannot be dynamically change (i.e. change in memory).
Quote:
oracle failed to startup. Suggest me.

Post your error, it's likely you made a typo.

Regards
Michel
Re: Audit_trail=DB [message #235495 is a reply to message #162262] Sun, 06 May 2007 21:28 Go to previous message
saibal
Messages: 111
Registered: March 2007
Location: India
Senior Member
In addition to what Michel wrote, have a look at the following.
Hopefully, this should help you understand the situation conceptually:

sys@TESTDB-SQL>>create pfile='e:\test_pfile1' from spfile;

File created.

sys@TESTDB-SQL>>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@TESTDB-SQL>>startup pfile='e:\test_pfile1'[B]/*using the pfile to startup*/[/B]
ORACLE instance started.

Total System Global Area  163577856 bytes
Fixed Size                   787948 bytes
Variable Size             145750548 bytes
Database Buffers           16777216 bytes
Redo Buffers                 262144 bytes
Database mounted.
Database opened.
sys@TESTDB-SQL>>alter system set audit_trail=db scope=spfile;
alter system set audit_trail=db scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup--[B]note the error message[/B]


sys@TESTDB-SQL>>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@TESTDB-SQL>>startup
ORACLE instance started.

Total System Global Area  163577856 bytes
Fixed Size                   787948 bytes
Variable Size             145750548 bytes
Database Buffers           16777216 bytes
Redo Buffers                 262144 bytes
Database mounted.
Database opened.
sys@TESTDB-SQL>>alter system set audit_trail=db scope=spfile;

System altered.
Previous Topic: Error MS
Next Topic: Showing duplicates under multiple columns
Goto Forum:
  


Current Time: Thu Dec 05 07:40:04 CST 2024