Rename the index in Oracle

Rename the index in Oracle

Rename the index in Oracle with ALTER command we need to know the index schema name.
First connected the schema in which you want to fire the rename alter command then you go for rename alter index command.

Check schema name of the index

col owner for a10
col table_name for a25
col index_name for a20
select owner,table_name,index_name from dba_indexes where index_name = 'SYS_C008201';

Rename the index
For creating new index in particular schema you have to connected with that schema otherwise it will move to SYS schema(default).

ALTER INDEX schema_name.index_name to new_index_name;

Rename the partition index name

ALTER INDEX schema_name.index_name PARTITION partition_name RENAME TO new_partition_name;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.