本文没有考虑特殊数据类型,只考虑了partition以及subpartition。
Test 1
~~~~
columns of the test table: age number(3), name varchar2(30)
Source database: 9.2.0.4
Target database: 9.2.0.7
Step 1: Alter column "age" to unused.
Step 2: Export the tablespace which contains the test table.
Step 3: Import the tablespace.
Step 4: Select from the test table, and the contents of the column "name" are miscode.
Test 2
~~~~~
Source database: 9.2.0.4
Target database: 9.2.0.7
Step 1: Create a table having subpartitions, and the subpartitions are created using SUBPARTITION TEMPLATE.
Step 2: Export the tablespace which contains the test table.
Step 3: Try to import the tablespace, but always fails.
Step 4: Create a table having subpartitions, and the subpartitions are NOT created using SUBPARTITION TEMPLATE.
Step 5: Export the tablespace which contains the test table.
Step 6: Import the tablespace, and everything is OK.
Test 3
~~~~~
Columns of table "testlong": id number(2), longcol long
Columns of table "testlongraw": id number(2), longrawcol long raw
Source database: 9.2.0.4
Target database: 9.2.0.7
Step 1
~~~~~~
alter table testlong add (text varchar2(30));
alter table testlongraw add (text varchar2(30));
insert into testlong(id,text) values(1,'This is row 1');
insert into testlong(id,text) values(2,'This is row 2');
insert into testlongraw(id,text) values(1,'This is row 1');
insert into testlongraw(id,text) values(2,'This is row 2');
commit;
select * from testlong;
id longcol text
------ ------------- ---------------
1 This is row 1
2 This is row 2
select * from testlongraw;
id longrawcol text
------ ---------------- ---------------
1 This is row 1
2 This is row 2
Step 2
~~~~~~
Export the tablespace including table testlong and testlongraw.
Successfully without warnings.
Step 3
~~~~~~
Import the tablespace including table testlong and testlongraw.
Successfully without warnings.
Step 4
~~~~~~
(Select from the target database)
select * from testlong;
id longcol text
------ ------------- ---------------
1 This is row 1
2 This is row 2
select * from testlongraw;
id longrawcol text
------ ---------------- ---------------
1 5
2 5
Subpartition template的查询方法:
If there are templates used to create subpartitions, then the information of all these templates is shown in the static data dictionary views below:
DBA_SUBPARTITION_TEMPLATES describes all subpartition templates in the database.
DBA_LOB_TEMPLATES describes all LOB subpartition templates in the database.
Subpartition template的消除方法:
Subpartition templates can be removed using "ALTER TABLE table_name SET SUBPARTITION TEMPLATE ()".
After the execution of this statement, the existing subpartitions remain and the whole tablespace set can be transported successfully without any warnings.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment