This page was saved using WebZIP 7.0.3.1030 offline browser (Unregistered) on 09/04/11 14:29:53.
Address: http://home2oracle.narod.ru/tts/
Title: 1  •  Size: 99418  •  Last Modified: Thu, 04 Feb 2010 15:48:32 GMT

  頠 , ,  砠 ,   TTS.

蠠  ,  , 頠 DUL, 젠 ,

- , TTS;

-  蠠 蠠 .

ࠠ 10.2. ⠠  :

 

#C#A#+04:00BYTEUNUSED2

INTERPRETED

DISABLE:ALL

EXECTRP sys.dbms_plugts.beginImport ('10.2.0.3.0',171,'2000',10,'Linux IA (32-bit)',52738,75151,1,0,0,0);

EXECTRP sys.dbms_plugts.checkCompType('LMST','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PDMLITLS','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('LOB_RET','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('NWIMGFMT','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('FASTDROP','8.1.6.0.0');

EXECTRP sys.dbms_plugts.checkCompType('LOCMGDTS','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('UNDOTBSP','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('TEMPTAB','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PGTMGDTS','9.0.1.3.0');

EXECTRP sys.dbms_plugts.checkCompType('DATETIME','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('QUETABLE','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('OPERATOR','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('SEVTRIG','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('RLENG','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('APPCTX','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('JAVA','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('INDXTYP','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('ASSOC','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('KCMPRIND','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('KCMPRIOT','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PGTMGDLB','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('INDONIOT','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('ANYTABLE','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('XMLSBSTR','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('MLCTABLE','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('EDTRIG','8.1.6.0.0');

EXECTRP sys.dbms_plugts.checkCompType('DOMIND','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('FDOMIND','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('FUNCIND','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('FGACCESS','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('NFSTABLE','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('APPFGA','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('RSRCMGR','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('DROPCOL','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('ONLINDCR','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('TYPEVL','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('SYNUDC','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('OPQTYPE','8.1.6.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PARTM82','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PARTIOT','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('WRDIR','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('NEWPARTM','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PARTOBJ','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('CPTLEN','9.2.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('LGINDKEY','9.0.0.0.0');

EXECTRP sys.dbms_plugts.checkCompType('PLUGTS','8.1.0.0.0');

EXECTRP sys.dbms_plugts.checkUser('TEST_TTS');

EXECTRP sys.dbms_plugts.beginImpTablespace('TEST',9,'SYS',1,0,4096,1,117224104225,1,2147483645,16,256,16,0,1,0,16,3018568149,

1,33,117224104076,NULL,0,0,NULL,NULL);

EXECTRP sys.dbms_plugts.checkDatafile(NULL,3018568149,6,12800,9,6,0,0,117224104084,117224104225,117145532440,

25165826,NULL,NULL,NULL);

EXECTRP sys.dbms_plugts.commitPluggable;

CONNECT TEST_TTS

TABLE "MAIN"

CREATE TABLE "MAIN" ("OWNER" VARCHAR2(30) NOT NULL ENABLE, "OBJECT_NAME" VARCHAR2

(30) NOT NULL ENABLE, "SUBOBJECT_NAME" VARCHAR2(30), "OBJECT_ID" NUMBER NOT NULL

ENABLE, "DATA_OBJECT_ID" NUMBER, "OBJECT_TYPE" VARCHAR2(19), "CREATED" DATE NOT

NULL ENABLE, "LAST_DDL_TIME" DATE NOT NULL ENABLE, "TIMESTAMP" VARCHAR2(19), "STATUS" VARCHAR2(7), "TEMPORARY" VARCHAR2(1), "GENERATED" VARCHAR2(1), "SECONDARY"

VARCHAR2(1)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(SEG_FILE 6

SEG_BLOCK 19 OBJNO_REUSE 52729 INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL

DEFAULT) TABLESPACE "TEST" LOGGING NOCOMPRESS

FIXTABLEPDML "TEST_TTS"."MAIN" 536870912

FIXTABLEHAKAN "TEST_TTS"."MAIN" 148

ENDTABLE

CONNECT SYS

EXECTRP sys.dbms_plugts.endImport;

EXIT

EXIT

 

, - , ⠠ sys.dbms_plugts , .

堠 , ࠠ , 頠 . , 蠠 , 젠 , ,  򠠠 . 堠 򠠠 , .

 

sys.dbms_plugts.beginImport ('10.2.0.3.0',171,'2000',10,'Linux IA (32-bit)',52738,75151,1,0,0,0);

 

PROCEDURE beginImport (clone_oracle_version IN varchar2,

charsetID IN binary_integer,

ncharsetID IN varchar2,

srcplatformID IN binary_integer,

srcplatformName IN varchar2,

highest_data_objnum IN number,

highest_lob_sequence IN number,

n_ts IN number,

has_clobs IN number DEFAULT 1,

has_nchars IN number DEFAULT 1,

char_semantics_on IN number DEFAULT 1);

 

-- Pass information about the pluggable set to the PL/SQL package.

-- Among them is the release version of the Oracle executable that

-- created the pluggable set, which is used for checking compatibility.

-- This procedure call appears in the export file.

--

-- Parameters:

-- clone_oracle_version IN the release version of the Oracle

-- executable that created the pluggable set

-- charsetID IN character set ID

-- ncharsetID IN nchar set ID, in varchar2 format

-- (May be NULL if generated by 8.1.5)

-- platformID IN platform ID

-- platformName IN platform name

-- highest_data_objnum IN highest data object # in pluggable set

-- highest_lob_sequence IN highest LOB sequence # in pluggable set

-- n_ts IN number of tablespace to be plugged in.

-- has_clobs IN whether tablespaces have CLOB data

-- has_nchars IN whether tablespaces have nchar data

-- char_smeantics_on IN whether tablespaces have char semantic data

 

, , , .   젠 , . highest_data_objnum highest_lob_sequence 젠 - , , 砠 젠 젠 , . 蠠 , 砠 - .

, checkCompType  , 堠 .

beginImpTablespace checkDatafile

 

PROCEDURE beginImpTablespace (tsname IN varchar2,

tsID IN number,

owner IN varchar2,

n_files IN binary_integer,

contents IN binary_integer,

blkSize IN binary_integer,

inc_num IN binary_integer,

clean_SCN IN number,

dflminext IN number,

dflmaxext IN number,

dflinit IN number,

dflincr IN number,

dflminlen IN number,

dflextpct IN binary_integer,

dflogging IN binary_integer,

affstrength IN number,

bitmapped IN number,

dbID IN number,

directallowed IN number,

flags IN binary_integer,

creation_SCN IN number,

groupname IN varchar2,

spare1 IN number,

spare2 IN number,

spare3 IN varchar2,

spare4 IN date,

seg_fno IN number

DEFAULT 0,

seg_bno IN number

DEFAULT 0,

seg_blks IN number

DEFAULT 0);

-- Pass to dbms_plugts package the information needed to create the

-- tablespace in target database. This procedure also checks to

-- make sure the tablespace name does not conflict with any existing

-- tablespaces already in the database. And the user name match with the

-- USERS list in the import comamnd line. It also make sure the blcok size

-- is the same as that in the target database. Begin importing meta data

-- for the tablespace. This procedure call appears in the export file.

--

-- The parameter list includes all columns for ts$, except those that

-- will for sure be discarded (online$, undofile#, undoblock#,

-- ownerinstance, backupowner). The spares are included so that the

-- interface does not have to be changed even when we use these

-- spares in the future.

--

-- There are three extra parameters added for transporting migrated

-- tablespaces. seg_fno, seg_bno and seg_blks represent the dictionary

-- information held in SEG$ for any tablespace which was migrated from

-- dictionary managed to locally managed. The file#, block# gives the

-- location of bitmap space header for the migrated tablespace and the

-- blocks parameter represnts the size of the space header in blocks.

--

-- Parameters:

-- tsname IN tablespace name

-- tsID IN tablespace ID in original database

-- owner IN owner of tablespace

-- n_files IN number of datafiles in the tablespace

-- contents IN contents column of ts$ (TEMPORARY/PERMANENT)

-- blkSize IN size of block in bytes

-- inc_num IN incarnation number of extent

-- clean_SCN IN tablespace clean SCN,

-- dflminext IN default minimum number of extents

-- dflmaxext IN default maximum number of extents

-- dflinit IN default initial extent size

-- dflincr IN default initial extent size

-- dflminlen IN default minimum extent size

-- dflextpct IN default percent extent size increase

-- dflogging IN default logging attribute

-- affstrength IN Affinity strength

-- bitmapped IN If bitmapped

-- dbID IN database ID

-- directallowed IN allowed

-- flags IN flags

-- creation_SCN IN tablespace creation SCN

-- groupname IN Group name

-- spare1 IN spare1 in ts$

-- spare2 IN spare2 in ts$

-- spare3 IN spare3 in ts$

-- spare4 IN spare4 in ts$

-- seg_fno IN file# for space_hdr in seg$

-- seg_bno IN block# for space_hdr in seg$

-- seg_blks IN blocks, size of space_hdr in seg$

 

Tsname, tsID, blkSize, inc_num, creation_SCN, dbID , .   clean_SCN checkpoint SCN. Owner , -.

 

PROCEDURE checkDatafile (name IN varchar2,

databaseID IN number,

absolute_fno IN binary_integer,

curFileBlks IN number,

tablespace_ID IN number,

relative_fno IN binary_integer,

maxextend IN number,

inc IN number,

creation_SCN IN number,

checkpoint_SCN IN number,

reset_SCN IN number,

spare1 IN number,

spare2 IN number,

spare3 IN varchar2,

spare4 IN date);

 

-- Call statically linked C routines to associate datafile with

-- tablespace, validate file headers. This procedure appears in the

-- export file. The parameter list includes all columns in file$,

-- except those that will for sure be discarded (status$, ownerinstance).

--

-- Parameters:

-- name IN file name (excluding path)

-- databaseID IN database ID

-- absolute_fno IN absolute file number

-- curFileBlks IN size of file in blocks

-- tablespace_ID IN tablespace ID in original database,

-- relative_fno IN relative file number,

-- maxextend IN maximum file size

-- inc IN increment amount

-- creation_SCN IN file creation SCN

-- checkpoint_SCN IN file checkpoint SCN

-- reset_SCN IN file reset SCN

-- spare1 IN spare1 in file$

-- spare2 IN spare2 in file$

-- spare3 IN spare3 in file$

-- spare4 IN spare4 in file$

 

Ƞ 蠠 ⠠ .

, , :

- ;

- ;

- object id;

- .

, 堠 (, 堠 ), ࠠ - , - ࠠ , , .   , , - , .   ࠠ . , - 젠 block_analyzer.xls . ꠠ , .  - 젠 , , object_id, - 頠 ( - ). , , , -, Ҡ ., ,  򠠠 蠠 ⠠ .

頠 ( ) .

, 頠 , , , .. ,  shutdown abort. 堠 蠠 , 젠 - , , ࠠ SCN . 젠 .

ࠠ  .

, ࠠ 堠 , .堠 ⠠ dbms_plugts.beginImport

clone_oracle_version - 10.2.0.3.0

charsetID - 171 (CL8MSWIN1251)

ncharsetID - 2000 (AL32UTF8)

srcplatformID - 10

srcplatformName - Linux IA (32-bit)

 , , 젠 . :

SQL> create user test_tts identified by test;

User created.

SQL> grant dba to test_tts;

Grant succeeded.

SQL> create tablespace test datafile '/opt/oracle/oradata/mts/test01.dbf' size 100M;

Tablespace created.

SQL> create table test_tts.main tablespace test as select * from dba_objects;

Table created.

SQL> alter system checkpoint;

System altered.

SQL> shutdown abort;

ORACLE instance shut down.

, shutdown abort '/opt/oracle/oradata/mts/test01.dbf' 젠 .

젠 -, .

.

SQL> create user tts_owner identified by test;

User created.

SQL> grant dba to tts_owner;

Grant succeeded.

, users

SQL> alter tablespace users read only;

Tablespace altered.

exp \'sys as sysdba\' transport_tablespace=y tablespaces=(users) file=users log=users constraints=n tts_full_check=n

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production

With the Partitioning, OLAP and Data Mining options

Export done in US7ASCII character set and AL16UTF16 NCHAR character set

server uses CL8MSWIN1251 character set (possible charset conversion)

Note: table data (rows) will not be exported

Note: constraints on tables will not be exported

About to export transportable tablespace metadata...

For tablespace users ...

. exporting cluster definitions

. exporting table definitions

. . exporting table WWW

. exporting triggers

. end transportable tablespace metadata export

Export terminated successfully without warnings.

젠 젠 users.dmp

 

>>

Oracle Transportable Tablespaces (TTS)