0% found this document useful (0 votes)
309 views1 page

Actb Daily Log

The document contains SQL commands to recreate primary keys and indexes on two tables, ACTB_DAILY_LOG and ACTB_HISTORY. It drops and recreates the primary keys and indexes with new specifications, such as partitioning and caching. It also alters sequences to be non-ordered with a cache size of 500.

Uploaded by

Nitya Pradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
309 views1 page

Actb Daily Log

The document contains SQL commands to recreate primary keys and indexes on two tables, ACTB_DAILY_LOG and ACTB_HISTORY. It drops and recreates the primary keys and indexes with new specifications, such as partitioning and caching. It also alters sequences to be non-ordered with a cache size of 500.

Uploaded by

Nitya Pradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//*****************Recreate Primary Key for ACTB_DAILY_LOG***********************//

Alter table ACTB_DAILY_LOG drop primary key ;

DROP INDEX PK01_ACTB_DAILY_LOG ;

Create unique index PK01_ACTB_DAILY_LOG on ACTB_DAILY_LOG(AC_ENTRY_SR_NO) GLOBAL


PARTITION BY HASH (AC_ENTRY_SR_NO) partitions 64 REVERSE;

Alter table ACTB_DAILY_LOG add constraint PK01_ACTB_DAILY_LOG primary key


(AC_ENTRY_SR_NO) using index PK01_ACTB_DAILY_LOG;

DROP INDEX IX02_ACTB_DAILY_LOG ;


create index IX02_ACTB_DAILY_LOG on ACTB_DAILY_LOG (TRN_REF_NO, EVENT_SR_NO) global
partition by hash (TRN_REF_NO, EVENT_SR_NO) partitions 64;

Alter table ACTB_HISTORY drop primary key ;

DROP INDEX PK01_ACTB_HISTORY ;

Create unique index PK01_ACTB_HISTORY on ACTB_History(AC_ENTRY_SR_NO) GLOBAL


PARTITION BY HASH (AC_ENTRY_SR_NO) partitions 64 REVERSE;

Alter table ACTB_History add constraint PK01_ACTB_HISTORY primary key


(AC_ENTRY_SR_NO) using index PK01_ACTB_HISTORY;

//****************Enable Sequence to be in no order****************************//

Spool sequence.sql
select ' alter sequence ' || sequence_name || ' cache 500 noorder;' from
user_sequences;
spool off;
@ sequence.sql Verify that cache and order changed to all sequences.
Select order_flag, cache_size from user_sequences;

You might also like