Skip to content
Advertisement

Dynamic query to find all the table DML activity in all the table oracle

Hi I need to search the DML activity of specified list of tables in a schema

single query

since it is time consuming and hard to run individual queries ,so i am trying to prepare a dynamic sql to fetch max(ora_rowscn),SCN_TO_TIMESTAMP(max(ora_rowscn)) from all the tables so that i can use a filter and select a set of tables

Query Template

how do i used the max(ora_rowscn),SCN_TO_TIMESTAMP(max(ora_rowscn)) for all the tables

any suggestions to correct the syntax of the query ?

Advertisement

Answer

You can use such a PLSQL code containing EXECUTE IMMEDIATE in order to get the desired values through Dynamic SQL

as long as any exception does not occur for each individual table.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement