출처 : https://jonathanlewis.wordpress.com/2016/04/25/ddl-logging/
DDL Logging – 12c
One of the little new features that should be most welcome in 12c is the ability to capture all DDL executed against the database. All it takes is a simple command (if you haven’t set the relevant parameter in the parameter file):
|
All subsequent DDL will be logged to two different places (in two formats)
- $ORACLE_BASE/diag/rdbms/{database}/{instance}/log/ddl/log.xml
- $ORACLE_BASE/diag/rdbms/{database}/{instance}/log/ddl_{instance}.log
Unfortunately the one thing I really wanted to see doesn’t appear – probably because it doesn’t really count as DDL – it’s the implicit DDL due to inserting into not-yet-existing partitions of an interval partitioned table.
Note: If you’re using a container database with pluggable databases then the DDL for all the pluggable databases goes into the same log file.
Update – Licensing
The following text in the Oracle 12c Database Licensing document has just been brought to my attention:
Licensed Parameters
The init.ora parameter ENABLE_DDL_LOGGING is licensed as part of the Database Lifecycle Management Pack when set to TRUE. When set to TRUE, the database reports schema changes in real time into the database alert log under the message group schema_ddl. The default setting is FALSE.
The licensing document is also linked to from the 12c online html page for the parameter.
The 11g parameter definition makes no mention of licensing, and the 11g “New Features” manual don’t mention the feature at all, but the parameter does get a special mention in the 11g licensing document where it is described as being part of the Change Management Pack.
init.ora Parameters
The use of the following init.ora parameter is licensed under Oracle Change Management Pack:
■ ENABLE_DDL_LOGGING: when set to TRUE (default: FALSE)