Object Difference In TTS Migration From 10g To 11g (文件 ID 1643239.1)
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.3 to 12.1.0.1 [Release 10.2 to 12.1]Information in this document applies to any platform.
Symptoms
The customer is trying to perform a transportable Tablespace (TTS) transfer of data from a 10g Release 2 to an 11g Release 2 Database.
After the import he noted that there was a discrepancy in the objects between the two environments.
Cause
Further analysis showed that the objects were all related to LOB's management:
* They were of type LOBSEGMENT and LOBINDEX
* The names of all the objects started with 'SYS_', which indicates that the object names were created by the system
Solution
This is working as expected:
There was an important change between 10 and 11g with regards to the management of LOB data as the option to store data in Securefiles was introduced.
This requires a change in the object definition, resulting in new object names. The following test shows the result:
First a tablespace test and a user test are created. Then a table with a CLOB column is created and filled with some data:
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Apr 3 03:03:18 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SYS o10gr2> create tablespace test datafile 'test.dbf' size 50m reuse;
Tablespace created.
SYS o10gr2> create user test identified by test default tablespace test tempo rary tablespace temp;
User created.
SYS o10gr2> grant connect,resource to test;
Grant succeeded.
SYS o10gr2> conn test/test
Connected.
test o10gr2> CREATE TABLE test
( id NUMBER(6), c CLOB)
LOB (c) STORE AS
(TABLESPACE test
STORAGE (INITIAL 6144 NEXT 6144)
CHUNK 4000
NOCACHE LOGGING); 2 3 4 5 6 7
Table created.
test o10gr2> insert into test values(10,'Human Resources');
1 row created.
test o10gr2> insert into test values(20,'Development');
1 row created.
test o10gr2> commit;
Commit complete.
test o10gr2> select object_name, object_type from user_objects;
OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
SYS_LOB0000570238C00002$$ LOB
SYS_LOB0000570241C00002$$ LOB
SYS_LOB0000570244C00002$$ LOB
TEST TABLE
test o10gr2> conn / as sysdba
Connected.
SYS o10gr2> col segment_name format a30
SYS o10gr2> select owner, segment_name, segment_type from dba_segments where tablespace_name='test';
OWNER SEGMENT_NAME SEGMENT_TYPE
------------------------------ ------------------------------ ------------------
test BIN$9hodgK0QQI7gQKUKhfUWFw==$0 TABLE
test BIN$9hodgK0RQI7gQKUKhfUWFw==$0 TABLE
test TEST TABLE
test SYS_IL0000570238C00002$$ LOBINDEX
test SYS_IL0000570241C00002$$ LOBINDEX
test SYS_IL0000570244C00002$$ LOBINDEX
test SYS_LOB0000570238C00002$$ LOBSEGMENT
test SYS_LOB0000570241C00002$$ LOBSEGMENT
test SYS_LOB0000570244C00002$$ LOBSEGMENT
9 rows selected.
Now the tablespace is set to read-only and a TTS export is performed:
Connected.
SYS o10gr2> alter tablespace test read only;
Tablespace altered.
SYS o10gr2> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[ora102@olapserv3 ~]$ expdp directory=temp dumpfile=test logfile=test.log transport_tablespaces=test
Export: Release 10.2.0.4.0 - Production on Thursday, 03 April, 2014 4:04:48
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01": /******** AS SYSDBA directory=temp dumpfile=test logfile=test.log transport_tablespaces=test
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:
/tmp/test.dmp
Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 04:06:59
In the target environment of 11.2.0.3, the user is created :
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 3 04:15:30 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@o11gr2> create user test identified by test;
User created.
SYS@o11gr2> grant connect,resource to test;
#
Grant succeeded.
SYS@o11gr2> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Now a TTS import is performed in the 11.2.0.3 environment:
Import: Release 11.2.0.3.0 - Production on Thu Apr 3 04:16:02 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01": /******** AS SYSDBA directory=temp dumpfile=test.dmp logfile=test_imp.log transport_datafiles=/tmp/test.dbf
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 04:16:09
Now the checks are run in the target:
[o11gr2@olapserv3 ~]$ sqlplus test/test
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 3 04:17:03 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
test@o11gr2> col object_name format a30
test@o11gr2> /
OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
SYS_LOB0000570312C00002$$ LOB
SYS_IL0000570312C00002$$ INDEX
TEST TABLE
test@o11gr2> select * from test;
ID
----------
C
--------------------------------------------------------------------------------
10
Human Resources
20
Development
test@o11gr2> conn / as sysdba
Connected.
SYS@o11gr2> col segment_name format a30
SYS@o11gr2> select owner, segment_name, segment_type from dba_segments where tablespace_name='test';
OWNER SEGMENT_NAME SEGMENT_TYPE
------------------------------ ------------------------------ ------------------
test TEST TABLE
test SYS_IL0000570312C00002$$ LOBINDEX
test SYS_LOB0000570312C00002$$ LOBSEGMENT
SYS 26.11 TEMPORARY
SYS 26.19 TEMPORARY
SYS 26.27 TEMPORARY
SYS 26.35 TEMPORARY
SYS 26.43 TEMPORARY
SYS 26.51 TEMPORARY
9 rows selected.
As you can see, the name of the LOB segment and LOB index are different. But the data is still there.
The original DDL for the table TEST was:
( id NUMBER(6), c CLOB)
LOB (c) STORE AS
(TABLESPACE test
STORAGE (INITIAL 6144 NEXT 6144)
CHUNK 4000
NOCACHE LOGGING);
When using DBMS_METADATA.GET_DDL you see:
SYS o10gr2> select dbms_metadata.get_ddl('TABLE','TEST','DEUBA') from dual;
--------------------------------------------------------------------------------
CREATE TABLE "TEST"."TEST"
( "ID" NUMBER(6,0),
"C" CLOB
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TEST"
LOB ("C") STORE AS (
TABLESPACE "DEUBA" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
When you use the SQLFILE parameter of impdp, you see the following DDL for the table:
( "ID" NUMBER(6,0),
"C" CLOB
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(SEG_FILE 29 SEG_BLOCK 59 OBJNO_REUSE 570244
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "TEST"
LOB ("C") STORE AS BASICFILE (
TABLESPACE "TEST" ENABLE STORAGE IN ROW CHUNK 8192
NOCACHE LOGGING
STORAGE(SEG_FILE 29 SEG_BLOCK 67 OBJNO_REUSE 570245
INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
INDEX ( INITRANS 2 MAXTRANS 255
STORAGE(SEG_FILE 29 SEG_BLOCK 75 OBJNO_REUSE 570246
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ) ;
So this change in the way that the table is defined requires it to
be recreated from scratch, resulting in the new names for the
system-generated objects.
However, in the later course of the import, the new metadata is remapped accordingly.
In summary, this is working as designed when moving LOB-based data via TTS between RDBMS versions 10g Release 2 and 11g.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21754115/viewspace-1732103/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Difference of Revoke System Privileges and Object PrivilegesObject
- Guide to Database Migration from Microsoft SQL Server using MySQL WorkbenchGUIIDEDatabaseROSServerMySql
- Upgrading from Oracle Database 10g to 11gOracleDatabase
- 【11g】【10g】【實驗】spfile檔案的恢復(from memory;)
- Entity Framework Tutorial Basics(31):Migration from EF 4.XFramework
- deleted object would be re-saved by cascade (remove deleted object from associatdeleteObjectREM
- 【MOS】 EXPDP - ORA-39166 (Object Was Not Found) (文件 ID 1640392.1)Object
- monitor PX limits from Resource Manager for active sessions (文件 ID 240877.1)MITSession
- DELETE from DBA_TABLESPACES IN 10Gdelete
- Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-st...AndroidJavaExceptionObject
- TypeError: Cannot read private member xxx from an object whose class did not declare itErrorObject
- OBJECT_ID和DATA_OBJECT_IDObject
- Oracle EBS R12 Migration from IBM AIX to Exadata And Performance TestingOracleIBMAIORM
- Upgrade Advisor: Database from 10.2 to 11.2 (文件 ID 251.1)Database
- Migrate from SQL SERVER to Oracle 10GSQLServerOracle 10g
- Differences between DATA_OBJECT_ID and OBJECT_IDObject
- object_id 及 data_object_id (oracle)ObjectOracle
- DOM (文件物件模型(Document Object Model))物件模型Object
- Resource Manager Enhancements in Oracle Database 11g (文件 ID 884082.1)OracleDatabase
- object_id and data_object_id in dba_objectsObject
- Initialization Parameter Changes from 9i to 10g
- Transportable Tablespaces (TTS) for Oracle Database [ID 1461278.2]TTSOracleDatabase
- oracle 10G 線上文件Oracle 10g
- object_id 與data_object_id 的區別Object
- object_id與data_object_id淺析(一)Object
- object_id與data_object_id淺析(二)Object
- object_id與data_object_id的關係Object
- Oracle GoldenGate 11g官方文件Administrator’s GuideOracleGoGUIIDE
- 11g oracle database installation with oracle grid infrastructure on linux(文件)OracleDatabaseASTStructLinux
- Oracle 10g upgrade from 10.2.0.1 to 10.2.0.4Oracle 10g
- OBJECT_ID、DATA_OBJECT_ID與truncate的本質Object
- Migration Of An Oracle Database Across OS Platforms [ID 733205.1]OracleDatabaseROSPlatform
- How To Find The Object That Causing ORA-600 [kqlnrc_1] (文件 ID 1190673.1)Object
- Oracle 11G 安裝文件Oracle
- ORACLE 11g 官方文件 地址Oracle
- Oracle中object_id和data_object_id的區別OracleObject
- Oracle database 升級(文件)to 10.2.0.4 from 10.2.0.1OracleDatabase
- 11g Using Snapshot Standby Database. (文件 ID 443720.1)Database