Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create primary key with descending index

HaniYSOct 22 2020

Hi
I use Oracle Enterprise 19, i have table with primary key 1 column as sequence, i need to change the index of primary key to be descending sorting rather than ascending sorting because most of query that i do from the table will be sort by primary key descending, any suggestion?

This post has been answered by BEDE on Oct 22 2020
Jump to Answer

Comments

Dude!

Keep in mind that the default for the control_file_record_keep_time init parameter is 7 days. If you use a RMAN retention period of 1 month, you need to adjust the value accordingly, e.g. 35 days. Otherwise you risk loosing RMAN information and your retention policy cannot work.

When RMAN does a level 1 backup and no previous level 0 backup is found, then RMAN will automatically perform a level 0 backup instead of a level 1 backup.

top.gun
Answer

1) This command tells you everything you need to know:

restore database preview summary until time 'sysdate';

2) RMAN will source anythng missing from the latest backup, from the previous backup.

So RMAN will recognise the 3 latest L0 backupsets, and the 4th that is missing will be sourced from the previous Saturday.

The cumulative L1 backup will be a mixture of blocks since last Saturday, and the previous Saturday.

Marked as Answer by User_UAEUZ · Sep 27 2020
User_UAEUZ

Hi Dude,

Thanks for your reply.

If i am using a RMAN catalog,  do i still need to set the control_file_record_keep_time to more then 7 days ?

Regards,

Noob

User_UAEUZ

Hi TopGun,

Thanks for the wonderful command.

From the preview, i see that one of incremental backup is done really base on a previous Saturday L0 backup.

Thank you!

User_UAEUZ

Hi Dude,

Thanks for your reply and the doc link.  It mentioned ->

If you maintain a recovery catalog, then use the RMAN RESYNCCATALOG command often enough to ensure that control file records are propagated to the recovery catalog before they are reused.

Make sure that CONTROL_FILE_RECORD_KEEP_TIME is longer than the interval between backups or resynchronizations. Otherwise, control file records could be reused before they are propagated to the recovery catalog. An extra week is a safe margin in most circumstances.

I am doing backup daily, and i think when i connect to the rman catalog , it will auto sync the controlfile backup information to the catalog - right ?

If that's the case, why would i stlil need to extend the CONTROL_FILE_RECORD_KEEP_TIME ? (since everyday during backup, the backup information from contorlfile will be sync to the catalog)

Regards,

Noob

Dude!

You must ensure that you resynchronize the recovery catalog with the control file records before these records are erased. For example, if the rman retention is 1 month, control_file_record_keep_time default, then if backup the database only every 2 weeks, information will be incomplete, regardless of the retention setting and using a catalog database.

1 - 7

Post Details

Added on Oct 22 2020
4 comments
2,475 views