How to use script to find DDL statement statistics
This article mainly introduces how to use script to find DDL sentence statistics, the article is very detailed, has a certain reference value, interested friends must read it!
When monitoring the behavior of an Oracle database, the database administrator needs to know the details of the creation of a table or index, such as date and time.
In the DBA_OBJECTS view, Oracle provides a new column called CREATED, which administrators can use to display the data when the object was created. This column can be used as an appraisal report when the DDL statement needs to be audited in the actual development.
The following script generates a good administrative report that shows all the tables and indexes created in the past 14 days.
Alter session set nls_date_format='YY-MON-DD HH24'
Set pages 999
Column C1 heading 'Date/time | created'
Column c2 heading 'Object | Type' format A20
Column c3 heading 'Object | Name' format A40
Select
Created c1
Object_type c2
Object_name c3
From
Dba_objects
Where
Created > sysdate-14
Order by
Created desc
The above is all the contents of the article "how to use script to find DDL statement Statistics". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!