You are on page 1of 6

ObjectDifferenceInTTSMigrationFrom10gTo11g(DocID1643239.

1)
InthisDocument
Symptoms
Cause
Solution

APPLIESTO:
OracleDatabaseEnterpriseEditionVersion10.2.0.3to12.1.0.1[Release10.2to12.1]
Informationinthisdocumentappliestoanyplatform.

SYMPTOMS
ThecustomeristryingtoperformatransportableTablespace(TTS)transferofdatafroma10gRelease2toan11g
Release2Database.
Aftertheimporthenotedthattherewasadiscrepancyintheobjectsbetweenthetwoenvironments.

CAUSE
FurtheranalysisshowedthattheobjectswereallrelatedtoLOB'smanagement:
*TheywereoftypeLOBSEGMENTandLOBINDEX
*Thenamesofalltheobjectsstartedwith'SYS_',whichindicatesthattheobjectnameswerecreatedbythesystem

SOLUTION
Thisisworkingasexpected:
Therewasanimportantchangebetween10and11gwithregardstothemanagementofLOBdataastheoptiontostore
datainSecurefileswasintroduced.
Thisrequiresachangeintheobjectdefinition,resultinginnewobjectnames.Thefollowingtestshowstheresult:
Firstatablespacetestandausertestarecreated.ThenatablewithaCLOBcolumniscreatedandfilledwithsomedata:
$sqlplus/assysdba
SQL*Plus:Release10.2.0.4.0ProductiononThuApr303:03:182014
Copyright(c)1982,2007,Oracle.AllRightsReserved.

SYSo10gr2>createtablespacetestdatafile'test.dbf'size50mreuse
Tablespacecreated.
SYSo10gr2>createusertestidentifiedbytestdefaulttablespacetesttemporarytablespace
temp
Usercreated.
SYSo10gr2>grantconnect,resourcetotest
Grantsucceeded.

SYSo10gr2>conntest/test
Connected.

testo10gr2>CREATETABLEtest
(idNUMBER(6),cCLOB)
LOB(c)STOREAS
(TABLESPACEtest
STORAGE(INITIAL6144NEXT6144)
CHUNK4000
NOCACHELOGGING)234567
Tablecreated.
testo10gr2>insertintotestvalues(10,'HumanResources')
1rowcreated.
testo10gr2>insertintotestvalues(20,'Development')
1rowcreated.
testo10gr2>commit
Commitcomplete.
testo10gr2>selectobject_name,object_typefromuser_objects
OBJECT_NAMEOBJECT_TYPE

SYS_LOB0000570238C00002$$LOB
SYS_LOB0000570241C00002$$LOB
SYS_LOB0000570244C00002$$LOB
TESTTABLE
testo10gr2>conn/assysdba
Connected.
SYSo10gr2>colsegment_nameformata30
SYSo10gr2>selectowner,segment_name,segment_typefromdba_segmentswhere
tablespace_name='test'
OWNERSEGMENT_NAMESEGMENT_TYPE

testBIN$9hodgK0QQI7gQKUKhfUWFw==$0TABLE
testBIN$9hodgK0RQI7gQKUKhfUWFw==$0TABLE
testTESTTABLE
testSYS_IL0000570238C00002$$LOBINDEX
testSYS_IL0000570241C00002$$LOBINDEX
testSYS_IL0000570244C00002$$LOBINDEX
testSYS_LOB0000570238C00002$$LOBSEGMENT
testSYS_LOB0000570241C00002$$LOBSEGMENT
testSYS_LOB0000570244C00002$$LOBSEGMENT
9rowsselected.

NowthetablespaceissettoreadonlyandaTTSexportisperformed:
testo10gr2>conn/assysdba
Connected.
SYSo10gr2>altertablespacetestreadonly
Tablespacealtered.
SYSo10gr2>exit

DisconnectedfromOracleDatabase10gEnterpriseEditionRelease10.2.0.4.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions

[ora102@olapserv3~]$expdpdirectory=tempdumpfile=testlogfile=test.log
transport_tablespaces=test
Export:Release10.2.0.4.0ProductiononThursday,03April,20144:04:48
Copyright(c)2003,2007,Oracle.Allrightsreserved.
Username:/assysdba
Connectedto:OracleDatabase10gEnterpriseEditionRelease10.2.0.4.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
Starting"SYS"."SYS_EXPORT_TRANSPORTABLE_01":/********ASSYSDBAdirectory=tempdumpfile=test
logfile=test.logtransport_tablespaces=test
ProcessingobjecttypeTRANSPORTABLE_EXPORT/PLUGTS_BLK
ProcessingobjecttypeTRANSPORTABLE_EXPORT/TABLE
ProcessingobjecttypeTRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Mastertable"SYS"."SYS_EXPORT_TRANSPORTABLE_01"successfullyloaded/unloaded
******************************************************************************
DumpfilesetforSYS.SYS_EXPORT_TRANSPORTABLE_01is:
/tmp/test.dmp
Job"SYS"."SYS_EXPORT_TRANSPORTABLE_01"successfullycompletedat04:06:59

Inthetargetenvironmentof11.2.0.3,theuseriscreated:

$sqlplus/assysdba
SQL*Plus:Release11.2.0.3.0ProductiononThuApr304:15:302014
Copyright(c)1982,2011,Oracle.Allrightsreserved.

Connectedto:
OracleDatabase11gEnterpriseEditionRelease11.2.0.3.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
SYS@o11gr2>createusertestidentifiedbytest
Usercreated.
SYS@o11gr2>grantconnect,resourcetotest
#
Grantsucceeded.
SYS@o11gr2>exit
DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.3.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions

NowaTTSimportisperformedinthe11.2.0.3environment:

[o11gr2@olapserv3~]$impdpdirectory=tempdumpfile=test.dmplogfile=test_imp.log
transport_datafiles=/tmp/test.dbf
Import:Release11.2.0.3.0ProductiononThuApr304:16:022014

Copyright(c)1982,2011,Oracleand/oritsaffiliates.Allrightsreserved.
Username:/assysdba
Connectedto:OracleDatabase11gEnterpriseEditionRelease11.2.0.3.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
Mastertable"SYS"."SYS_IMPORT_TRANSPORTABLE_01"successfullyloaded/unloaded
Starting"SYS"."SYS_IMPORT_TRANSPORTABLE_01":/********ASSYSDBAdirectory=tempdumpfile=test.dmp
logfile=test_imp.logtransport_datafiles=/tmp/test.dbf
ProcessingobjecttypeTRANSPORTABLE_EXPORT/PLUGTS_BLK
ProcessingobjecttypeTRANSPORTABLE_EXPORT/TABLE
ProcessingobjecttypeTRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job"SYS"."SYS_IMPORT_TRANSPORTABLE_01"successfullycompletedat04:16:09

Nowthechecksareruninthetarget:

[o11gr2@olapserv3~]$sqlplustest/test
SQL*Plus:Release11.2.0.3.0ProductiononThuApr304:17:032014
Copyright(c)1982,2011,Oracle.Allrightsreserved.

Connectedto:
OracleDatabase11gEnterpriseEditionRelease11.2.0.3.0Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
test@o11gr2>colobject_nameformata30
test@o11gr2>/
OBJECT_NAMEOBJECT_TYPE

SYS_LOB0000570312C00002$$LOB
SYS_IL0000570312C00002$$INDEX
TESTTABLE
test@o11gr2>select*fromtest
ID

10
HumanResources
20
Development

test@o11gr2>conn/assysdba
Connected.
SYS@o11gr2>colsegment_nameformata30
SYS@o11gr2>selectowner,segment_name,segment_typefromdba_segmentswhere
tablespace_name='test'
OWNERSEGMENT_NAMESEGMENT_TYPE

testTESTTABLE
testSYS_IL0000570312C00002$$LOBINDEX
testSYS_LOB0000570312C00002$$LOBSEGMENT
SYS26.11TEMPORARY
SYS26.19TEMPORARY
SYS26.27TEMPORARY
SYS26.35TEMPORARY

SYS26.43TEMPORARY
SYS26.51TEMPORARY
9rowsselected.

Asyoucansee,thenameoftheLOBsegmentandLOBindexaredifferent.Butthedataisstillthere.
TheoriginalDDLforthetableTESTwas:
CREATETABLEtest
(idNUMBER(6),cCLOB)
LOB(c)STOREAS
(TABLESPACEtest
STORAGE(INITIAL6144NEXT6144)
CHUNK4000
NOCACHELOGGING)

WhenusingDBMS_METADATA.GET_DDLyousee:
SYSo10gr2>selectdbms_metadata.get_ddl('TABLE','TEST','DEUBA')fromdual
DBMS_METADATA.GET_DDL('TABLE','TEST','TEST')

CREATETABLE"TEST"."TEST"
("ID"NUMBER(6,0),
"C"CLOB
)PCTFREE10PCTUSED40INITRANS1MAXTRANS255NOCOMPRESSLOGGING
STORAGE(INITIAL65536NEXT1048576MINEXTENTS1MAXEXTENTS2147483645
PCTINCREASE0FREELISTS1FREELISTGROUPS1BUFFER_POOLDEFAULT)
TABLESPACE"TEST"
LOB("C")STOREAS(
TABLESPACE"DEUBA"ENABLESTORAGEINROWCHUNK8192PCTVERSION10
NOCACHELOGGING
STORAGE(INITIAL16384NEXT1048576MINEXTENTS1MAXEXTENTS2147483645
PCTINCREASE0FREELISTS1FREELISTGROUPS1BUFFER_POOLDEFAULT))

WhenyouusetheSQLFILEparameterofimpdp,youseethefollowingDDLforthetable:
CREATETABLE"TEST"."TEST"
("ID"NUMBER(6,0),
"C"CLOB
)SEGMENTCREATIONIMMEDIATE
PCTFREE10PCTUSED40INITRANS1MAXTRANS255
NOCOMPRESSLOGGING
STORAGE(SEG_FILE29SEG_BLOCK59OBJNO_REUSE570244
INITIAL65536NEXT1048576MINEXTENTS1MAXEXTENTS2147483645
PCTINCREASE0FREELISTS1FREELISTGROUPS1
BUFFER_POOLDEFAULTFLASH_CACHEDEFAULTCELL_FLASH_CACHEDEFAULT)
TABLESPACE"TEST"
LOB("C")STOREASBASICFILE(
TABLESPACE"TEST"ENABLESTORAGEINROWCHUNK8192
NOCACHELOGGING
STORAGE(SEG_FILE29SEG_BLOCK67OBJNO_REUSE570245
INITIAL16384NEXT1048576MINEXTENTS1MAXEXTENTS2147483645
PCTINCREASE0FREELISTS1FREELISTGROUPS1
BUFFER_POOLDEFAULTFLASH_CACHEDEFAULTCELL_FLASH_CACHEDEFAULT)
INDEX(INITRANS2MAXTRANS255
STORAGE(SEG_FILE29SEG_BLOCK75OBJNO_REUSE570246
INITIAL65536NEXT1048576MINEXTENTS1MAXEXTENTS2147483645
PCTINCREASE0FREELISTS1FREELISTGROUPS1
BUFFER_POOLDEFAULTFLASH_CACHEDEFAULTCELL_FLASH_CACHEDEFAULT)))

Sothischangeinthewaythatthetableisdefinedrequiresittoberecreatedfromscratch,resultinginthenewnamesfor
thesystemgeneratedobjects.

However,inthelatercourseoftheimport,thenewmetadataisremappedaccordingly.
Insummary,thisisworkingasdesignedwhenmovingLOBbaseddataviaTTSbetweenRDBMSversions10gRelease2
and11g.
Didn'tfindwhatyouarelookingfor?

You might also like