Hello.
I have a problem similar to the one related to the existing topic "SQLOperation to select tables to drop"
I must first create the list of queries to shrink periodically all our tables
Then I have to execute all the alter table queries, in the right order, table by table.
I have one SQLOperation object with this select query (action_type=SELECT):
SELECT
'alter table DEV_PREPUSER2.' || table_name || ' enable row movement' LINE_1
,'alter table DEV_PREPUSER2.' || table_name || ' shrink space compact' LINE_2
,'alter table DEV_PREPUSER2.' || table_name || ' shrink space cascade' LINE_3
,'alter table DEV_PREPUSER2.' || table_name || ' disable row movement' LINE_4
FROM
user_tables
WHERE
TABLE_NAME not like '%$%'
AND rownum = 1
I first wanted to test the creation of the 4 alter table queries, for only 1 table. The aim is to delete the clause "AND rownum=1", in order to shrink all the tables.
I have a second SQLOperation object, linked to the first one by a Direct Bind, with this code (action_type=DDL_DML and multi_queries=true):
:{LINE_1}:;
:{LINE_2}:;
:{LINE_3}:;
:{LINE_4}:;
Result : for only 1 table, the execution is working well, but when I delete the clause on the rownum, it doesn't work !
What is missing in my 2 objects ? What has to be modified ?
Thanks in advance for your answers
Alex