|
- create tablespace tbs3 datafile '/u01/app/oracle/oradata/orcl2/tbs3.dbf' size 10M autoextend on maxsize 3G;
- select *
- from dba_objects o
- where o.owner='HR'
- order by 2;
-
-
- create table hr.t062iu11_g ( a number ) tablespace tbs3;
-
- insert into HR.t062iu11_g values ( 999);
-
- commit;
-
- create index hr.i062iu11_g on HR.t062iu11_g (a) tablespace users;
-
- create table hr.t062iu11_part ( a number ) tablespace tbs3
- partition by range (a)
- ( partition p1 values less than (100) tablespace tbs3,
- partition p2 values less than (maxvalue) tablespace users );
-
- insert into hr.t062iu11_part values ( 99) ;
-
- insert into hr.t062iu11_part values ( 100) ;
-
- commit;
-
- select * from hr.t062iu11_part;
-
- select * from hr.t062iu11_part partition ( p1);
-
- select * from hr.t062iu11_part partition ( p2);
-
- select * from dba_segments
- where segment_name ='T062IU11_PART';
-
- select * from dba_objects where object_name like 'DBMS%TTS';
- desc dbms_tts;
-
- begin
- dbms_tts.TRANSPORT_SET_CHECK('TBS3');
- end;
-
- select * from transport_set_violations;
-
复制代码
-------
- [oracle@classroom orcl2]$ impdp system/oracle_4U directory=dir1 dumpfile=xtts2.dmp transport_datafiles='/u01/app/oracle/oradata/orcl/tbs3.dbf'
- Import: Release 12.1.0.2.0 - Production on Thu Sep 3 21:04:05 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
- and Real Application Testing options
- Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
- Source time zone is +00:00 and target time zone is +08:00.
- Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/******** directory=dir1 dumpfile=xtts2.dmp transport_datafiles=/u01/app/oracle/oradata/orcl/tbs3.dbf
- Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- ORA-39123: Data Pump transportable tablespace job aborted
- ORA-01565: error in identifying file '/u01/app/oracle/oradata/orcl/tbs3.dbf'
- ORA-27048: skgfifi: file header information is invalid
- Additional information: 13
- Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at Thu Sep 3 21:04:15 2020 elapsed 0 00:00:05
- [oracle@classroom orcl2]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on Thu Sep 3 21:04:41 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1574592120)
- RMAN> convert datafile '/u01/app/oracle/oradata/orcl/tbs3.dbf' from platform 'Solaris[tm] OE (32-bit)' format '/u01/app/oracle/oradata/orcl/tbs3-trans.dbf'
- 2> ;
- Starting conversion at target at 2020-09-03:21:07:21
- using target database control file instead of recovery catalog
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=7 device type=DISK
- channel ORA_DISK_1: starting datafile conversion
- input file name=/u01/app/oracle/oradata/orcl/tbs3.dbf
- converted datafile=/u01/app/oracle/oradata/orcl/tbs3-trans.dbf
- channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
- Finished conversion at target at 2020-09-03:21:07:24
- RMAN> exit
- Recovery Manager complete.
- [oracle@classroom orcl2]$ cd /u01/app/oracle/
- [oracle@classroom oracle]$ ls
- admin cfgtoollogs Clusterware fast_recovery_area man_recovery_area oradiag_oracle wallet
- audit checkpoints crsdata flash_recovery_area man_recovery_area.11g product
- botangdir01 classroom diag log oradata station90
- [oracle@classroom oracle]$ cd oradata/
- [oracle@classroom oradata]$ ls
- em12rep orcl orcl2 rcat RCAT rcat.11g RCAT.11g rcat.12c RCAT.12c rcat.12c.test RCAT.12c.test
- [oracle@classroom oradata]$ cd orcl
- [oracle@classroom orcl]$ ls
- sysaux01.dbf system01.dbf tbs1.dbf tbs2.dbf tbs3.dbf tbs3-trans.dbf temp01.dbf undotbs01.dbf users01.dbf
- [oracle@classroom orcl]$ mv tbs3-trans.dbf tbs3.dbf
- [oracle@classroom orcl]$ impdp system/oracle_4U directory=dir1 dumpfile=xtts2.dmp transport_datafiles='/u01/app/oracle/oradata/orcl/tbs3.dbf'
- Import: Release 12.1.0.2.0 - Production on Thu Sep 3 21:08:25 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
- and Real Application Testing options
- Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
- Source time zone is +00:00 and target time zone is +08:00.
- Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/******** directory=dir1 dumpfile=xtts2.dmp transport_datafiles=/u01/app/oracle/oradata/orcl/tbs3.dbf
- Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
- Processing object type TRANSPORTABLE_EXPORT/TABLE
- Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
- Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at Thu Sep 3 21:08:55 2020 elapsed 0 00:00:29
- [oracle@classroom orcl]$
复制代码
|
|