Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change high_value of partition

Status
Not open for further replies.

JtheRipper

IS-IT--Management
Oct 4, 2002
274
GB
Hi there,

I want to know if it is possible to change the high value of a partition? The reason is that we have quite a few partitions, and the last one is set to "maxvalue". We need to add a few partitions now between the "maxvalue" and the one before the last one.
The only way I know of is to:
1. Make a copy of the last partition's data
2. Drop the "maxvalue" partition
3. Add the relevant partitions including the "maxvalue" one
4. Populate the "maxvalue" partition with the backup made

Any ideas on how to make this easier?

Thanks,
J.
 
Things are much, much simpler. You can split partition:

Code:
ALTER TABLE tname SPLIT PARTITION lastpname
 AT (newhighvalue)
INTO (PARTITION newpartitionname, PARTITION lastpname);

SPLIT is a great command, and very intelligent one. It would move minimal data around and would preserve all properties of older partition. Only downside is that each single SPLIT is only 2-way, so you would've to repeat it multiple times.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top