Re: Renaming Partitions

From: John Hurley <>
Date: Sun, 20 Feb 2011 14:06:44 -0800 (PST)
Message-ID: <>


> The question is how do I identify what the partition should be called.
> We are partitioning by date.  When the partition is created, I can run
> an alter table command that says, for the table my_table rename the
> partition for February 18 2011 to my_table_110218.  I don't need to find
> out that it is created as SYS_123 and then run "ALTER TABLE table_name
> RENAME PARTITION SYS_123 TO my_table_110218.  What I would like to be
> able to do is something similar for the indexes.  Is this possible, and
> if so how (without going to PL/SQL) ?

Why don't you have your logic that is renaming the original partitions maintain information somewhere ( hey let's be original and keep it in a table ) so that when you need to generate your index rename statements it can look up and translate and then generate the sql that you need.

You can spool out the generated sql if you so wish and then just execute the generated sql.

Sql that generates other sql ... that's been going on in the Oracle database world for 20 odd years give or take ... Received on Sun Feb 20 2011 - 16:06:44 CST

Original text of this message