Databases Reference
In-Depth Information
3.
Create an empty partition on the table. In this case, assume there is a partition called P2.
So, you will need to split the partition P2.
SQL> alter table accounts
2 split partition p2
3 at (102)
4 into
5 (
6 partition p1,
7 partition p2
8* );
Table altered.
This splits the partition P2 into two partitions: P1 and P2. All the data in P2 are still there
and P1 is completely empty.
4.
Swap the newly recovered table with this empty partition:
SQL> alter table accounts
2 exchange partition p1
3 with table accounts_p1
4 without validation;
Table altered.
Now the partition P1 contains the data from the backup.
5.
The table ACCOUNTS_P1 is now empty. Drop the table:
SQL> drop table accounts_p1;
Table dropped.
How It Works
The recovery of a partition follows the same mechanism as the recovery of a table from the backup of the database as
shown in Recipe 13-22. The only difference is that the recovered partitions are created not as partitions, but rather as
independent tables. The syntax of the command used in step 2 of the solution is:
recover table <Owner>.<TableName>:<PartitionName>
If more than one partition is to be rcovered, you can mention them separated by commas:
recover table scott.accounts:P1, scott.accounts:P2
Each partition is recovered as a separate table with the naming convention as <TableName>_<PartitionName>.
The partition P1 of the table ACCOUNTS will be recovered as ACCOUNTS_P1. If you recover multiple partitions of a
table, each partition is imported into an individual table.
 
Search WWH ::




Custom Search