Home » RDBMS Server » Server Administration » Does Exchanging drop anything?
Does Exchanging drop anything? [message #130671] Mon, 01 August 2005 21:42 Go to next message
IA
Messages: 91
Registered: March 2004
Member
Hi Everyone,

If you have a large historical table called SALES and it
holds 12 partitions for each month in the year of 2004. Now say,
I want to add new sales data to it for Jan 05.

So, I go ahead and add an empty partition to the table. Then I create a seperate table called sales_01_05 with all data of sales in Jan 05, and also create indexes and constraints on it being the same as the historical SALES table.

Then I perform an exchange: of the empty partition with the already populated table sales_01_05.

Hence the contents of table sales_01_05 gets plugged into the new partition under the SALES table: for example being 05_jan.

My question is: after performing this exchange, what happens to the existing sales_01_05 table? Is it automatically dropped, does it still exist and I manually need to drop it? Does it still exist but is empty?

Would appreciated you input on this one!

Thanks
IA
Re: Does Exchanging drop anything? [message #130745 is a reply to message #130671] Tue, 02 August 2005 04:21 Go to previous message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
Hi,

No data will be lost - it is a swap action. Data in the table will be moved to the partition, and the data in the partition will be moved to the table.

According to the Admin Guide:

"You can convert a partition (or subpartition) into a nonpartitioned table, and a nonpartitioned table into a partition (or subpartition) of a partitioned table by exchanging their data segments."

Best regards.

Frank
Previous Topic: extent management
Next Topic: OSD-04002: unable to open file
Goto Forum:
  


Current Time: Sun Jan 26 09:24:33 CST 2025