iSelfSchooling.com  Since 1999     References  |  Search more  | Oracle Syntax  | Free Online Oracle Training

    Home      .Services     Login       Start Learning     Certification      .                 .Share your BELIEF(s)...

 

. Online Accounting        .Copyright & User Agreement   |
    .Vision      .Biography     .Acknowledgement

.Contact Us      .Comments/Suggestions       Email2aFriend    |

 

Oracle 12c New Features

Online Oracle Training

LESSON 25

How to view ADR DDL log file

 

If you want to view all DDL statement, you can use the ADR DDL log file. But before using this feature, you need to enable this feature by changing the ENABLE_DDL_LOGGING instance parameter to TRUE

 

Login to your CDB.

# cd ~

# . ./.profile

# sqlplus /nolog

SQL> connect / as sysdba

 

Check the value of the DDL logging.

SQL> show parameter ddl_logging

 

NAME

TYPE

VALUE

enable_ddl_logging

boolean

FALSE

Notice the enable_ddl_logging value is FALSE

 

Enable the DDL logging.

SQL> ALTER SYSTEM SET enable_ddl_logging=TRUE SCOPE=both;

 

Check the value of the DDL logging again

SQL> show parameter ddl_logging

 

NAME

TYPE

VALUE

enable_ddl_logging

boolean

TRUE

Notice the enable_ddl_logging value was change to TRUE

 

Now, you will capture any DDL statements that performed from administrators.

The DDL log is in the diag folder located at $ORACLE_BASE/diag/rdbms/mycdb/mycdb/log/ddl.

 

You need to use the adrci tool to view the content of the DDL log file.

Execute the adrci utility.

# adrci

ADRCI: Release 12.1.0.1. "

Copyright " "

ADR base = "/app/oracle"

 

Type the "show log" command to view the DDL log file using your local editor such as vi.

adrci> show log

 

2014-02-03 05:19:36.454000 +00:00

CREATE USER myuser

2014-02-03 07:19:36.454000 +00:00

DROP USER myuser CASCADE

2014-02-03 08:19:36.454000 +00:00

DROP TABLE scott.mytable

"

"

 

Quit the editor by using the :q vi commad.

 

:q

adrci> exit

#

 

You can also view the DDL log file content using the "more" command in UNIX.

# more $ORACLE_BASE/diag/rdbms/mycdb/mycdb/log/ddl/log.xml

 

Good Luck!

 

 

Google
 
Web web site