Bo's Oracle Station

查看: 2304|回复: 0

课程第36次(2017-06-06星期二)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-6-7 10:00:04 | 显示全部楼层 |阅读模式
上完1Z0-05319章
传送表空间三个实验(1. win32 AL32UTF8不能自包含出错;2. win32 AL32UTF8
自包含;3. win32 ZHS16GBK只能导出表空间,不能传送表空间
1Z0-0
52共19章(上完12章),1Z0-053共21章(上完13章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的25章

源头win32:

PL/SQL Developper连接utforcl库:
  1. select   * from dba_data_files;

  2. create tablespace tbsutforcl1 datafile 'C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\tbsutforcl1.dbf' size 10M ;

  3. create table hr.tutforcl1( a  number )  tablespace tbsutforcl1  ;

  4. insert into hr.tutforcl1 values ( 12345678) ;

  5. create table sys.tutforcl3( a  number )  tablespace tbsutforcl1  ;


  6. insert into sys.tutforcl3 values ( 12345678) ;

  7. select  * from dba_segments s where s.tablespace_name='TBSUTFORCL1';

  8. ----
  9. begin
  10.    dbms_tts.transport_set_check('TBSUTFORCL1');
  11. end;

  12. select  * from transport_set_violations;

  13. alter table tutforcl3 move tablespace system;


  14. alter tablespace tbsutforcl1 read only;

  15. select  * from v$transportable_platform;


  16. select  * from dba_directories;


  17. select  * from dba_tablespaces;

  18. alter tablespace tbsutforcl1 read write ;


  19. ----

  20. create tablespace tbsutforcl2 datafile 'C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\tbsutforcl2.dbf' size 10M ;

  21. create table hr.tutforcl2( a  number )  tablespace tbsutforcl2  ;

  22. insert into hr.tutforcl2 values ( 12345678) ;

  23. select  * from dba_segments s where s.tablespace_name='TBSUTFORCL2';

  24. alter tablespace tbsutforcl2 read only;

  25. alter tablespace tbsutforcl2 read write ;
复制代码
PL/SQL Developper连接orcl库:
  1. select   * from dba_data_files;

  2. create tablespace tbsorcl datafile 'C:\APP\ADMINISTRATOR\ORADATA\ORCL\tbsorcl.dbf' size 10M ;

  3. create table hr.torcl( a  number )  tablespace tbsorcl  ;

  4. insert into hr.torcl values ( 12345678) ;

  5. select  * from dba_segments s where s.tablespace_name='TBSORCL';

  6. alter tablespace tbsorcl read only ;

  7. select  * from dba_directories;

  8. create directory dir1 as 'c:\data';
复制代码
SQL*Plus:

  1. ATA_OPTIONS
  2. 数据层选项标记。
  3. 有效的关键字值为: XML_CLOBS。

  4. IRECTORY
  5. 用于转储文件和日志文件的目录对象。

  6. UMPFILE
  7. 指定目标转储文件名的列表 [expdat.dmp]。
  8. 例如, DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp。

  9. NCRYPTION
  10. 加密某个转储文件的一部分或全部。
  11. 有效的关键字值为: ALL, DATA_ONLY, ENCRYPTED_COLUMNS_ONLY, METADATA_ONLY 和 NONE


  12. NCRYPTION_ALGORITHM
  13. 指定加密的方式。
  14. 有效的关键字值为: [AES128], AES192 和 AES256。

  15. NCRYPTION_MODE
  16. 生成加密密钥的方法。
  17. 有效的关键字值为: DUAL, PASSWORD 和 [TRANSPARENT]。

  18. NCRYPTION_PASSWORD
  19. 用于在转储文件中创建加密数据的口令密钥。

  20. STIMATE
  21. 计算作业估计值。
  22. 有效的关键字值为: [BLOCKS] 和 STATISTICS。

  23. STIMATE_ONLY
  24. 计算作业估计值而不执行导出。

  25. XCLUDE
  26. 排除特定对象类型。
  27. 例如, EXCLUDE=SCHEMA:"='HR'"。

  28. ILESIZE
  29. 以字节为单位指定每个转储文件的大小。

  30. LASHBACK_SCN
  31. 用于重置会话快照的 SCN。

  32. LASHBACK_TIME
  33. 用于查找最接近的相应 SCN 值的时间。

  34. ULL
  35. 导出整个数据库 [N]。

  36. ELP
  37. 显示帮助消息 [N]。

  38. NCLUDE
  39. 包括特定对象类型。
  40. 例如, INCLUDE=TABLE_DATA。

  41. OB_NAME
  42. 要创建的导出作业的名称。

  43. OGFILE
  44. 指定日志文件名 [export.log]。

  45. ETWORK_LINK
  46. 源系统的远程数据库链接的名称。

  47. OLOGFILE
  48. 不写入日志文件 [N]。

  49. ARALLEL
  50. 更改当前作业的活动 worker 的数量。

  51. ARFILE
  52. 指定参数文件名。

  53. UERY
  54. 用于导出表的子集的谓词子句。
  55. 例如, QUERY=employees:"WHERE department_id > 10"。

  56. EMAP_DATA
  57. 指定数据转换函数。
  58. 例如, REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO。

  59. EUSE_DUMPFILES
  60. 覆盖目标转储文件 (如果文件存在) [N]。

  61. AMPLE
  62. 要导出的数据的百分比。

  63. CHEMAS
  64. 要导出的方案的列表 [登录方案]。

  65. OURCE_EDITION
  66. 用于提取元数据的版本。

  67. TATUS
  68. 监视作业状态的频率, 其中
  69. 默认值 [0] 表示只要有新状态可用, 就立即显示新状态。

  70. ABLES
  71. 标识要导出的表的列表。
  72. 例如, TABLES=HR.EMPLOYEES,SH.SALES:SALES_1995。

  73. ABLESPACES
  74. 标识要导出的表空间的列表。

  75. RANSPORTABLE
  76. 指定是否可以使用可传输方法。
  77. 有效的关键字值为: ALWAYS 和 [NEVER]。

  78. RANSPORT_FULL_CHECK
  79. 验证所有表的存储段 [N]。

  80. RANSPORT_TABLESPACES
  81. 要从中卸载元数据的表空间的列表。

  82. ERSION
  83. 要导出的对象版本。
  84. 有效的关键字值为: [COMPATIBLE], LATEST 或任何有效的数据库版本。

  85. -----------------------------------------------------------------------------

  86. 下列命令在交互模式下有效。
  87. 注: 允许使用缩写。

  88. DD_FILE
  89. 将转储文件添加到转储文件集。

  90. ONTINUE_CLIENT
  91. 返回到事件记录模式。如果处于空闲状态, 将重新启动作业。

  92. XIT_CLIENT
  93. 退出客户机会话并使作业保持运行状态。

  94. ILESIZE
  95. 用于后续 ADD_FILE 命令的默认文件大小 (字节)。

  96. ELP
  97. 汇总交互命令。

  98. ILL_JOB
  99. 分离并删除作业。

  100. ARALLEL
  101. 更改当前作业的活动 worker 的数量。

  102. EUSE_DUMPFILES
  103. 覆盖目标转储文件 (如果文件存在) [N]。

  104. TART_JOB
  105. 启动或恢复当前作业。
  106. 有效的关键字值为: SKIP_CURRENT。

  107. TATUS
  108. 监视作业状态的频率, 其中
  109. 默认值 [0] 表示只要有新状态可用, 就立即显示新状态。

  110. TOP_JOB
  111. 按顺序关闭作业执行并退出客户机。
  112. 有效的关键字值为: IMMEDIATE。



  113. :\Users\Administrator>expdp system/oracle_4U  directory=dir1  dumpfile=tbsutfor
  114. l1.dmp  TRANSPORT_TABLESPACES=tbsutforcl1

  115. xport: Release 11.2.0.1.0 - Production on 星期二 6月 6 21:03:13 2017

  116. opyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  117. DE-28002: 操作产生了 ORACLE 错误 28002
  118. RA-28002: 7 天之后口令将过期

  119. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  120. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  121. 启动 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dum
  122. file=tbsutforcl1.dmp TRANSPORT_TABLESPACES=tbsutforcl1
  123. 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  124. 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  125. 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  126. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
  127. *****************************************************************************
  128. YSTEM.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
  129. C:\DATA\TBSUTFORCL1.DMP
  130. *****************************************************************************
  131. 可传输表空间 TBSUTFORCL1 所需的数据文件:
  132. C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTFORCL1.DBF
  133. 作业 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已于 21:03:49 成功完成


  134. :\Users\Administrator>expdp system/oracle_4U  directory=dir1  dumpfile=tbsutfor
  135. l2.dmp  TRANSPORT_TABLESPACES=tbsutforcl2

  136. xport: Release 11.2.0.1.0 - Production on 星期二 6月 6 21:21:50 2017

  137. opyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  138. DE-28002: 操作产生了 ORACLE 错误 28002
  139. RA-28002: 7 天之后口令将过期

  140. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  141. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  142. 启动 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dum
  143. file=tbsutforcl2.dmp TRANSPORT_TABLESPACES=tbsutforcl2
  144. 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  145. 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  146. 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  147. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
  148. *****************************************************************************
  149. YSTEM.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
  150. C:\DATA\TBSUTFORCL2.DMP
  151. *****************************************************************************
  152. 可传输表空间 TBSUTFORCL2 所需的数据文件:
  153. C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTFORCL2.DBF
  154. 作业 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已于 21:22:23 成功完成


  155. :\Users\Administrator>set ORACLE_SID=orcl

  156. :\Users\Administrator>rman target /

  157. 恢复管理器: Release 11.2.0.1.0 - Production on 星期二 6月 6 21:28:23 2017

  158. opyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  159. 连接到目标数据库: ORCL (DBID=1347195613)

  160. MAN> convert tablespace tbsorcl to platform 'Linux IA (64-bit)' format 'c:\data
  161. %U';

  162. 启动 conversion at source 于 06-6月 -17
  163. 使用目标数据库控制文件替代恢复目录
  164. 分配的通道: ORA_DISK_1
  165. 通道 ORA_DISK_1: SID=17 设备类型=DISK
  166. 通道 ORA_DISK_1: 启动数据文件转换
  167. 输入数据文件: 文件号=00006 名称=C:\APP\ADMINISTRATOR\ORADATA\ORCL\TBSORCL.DBF
  168. 已转换的数据文件 = C:\DATA\DATA_D-ORCL_I-1347195613_TS-TBSORCL_FNO-6_06S65516
  169. 通道 ORA_DISK_1: 数据文件转换完毕, 经过时间: 00:00:01
  170. 完成 conversion at source 于 06-6月 -17

  171. MAN> exit


  172. 恢复管理器完成。

  173. :\Users\Administrator>expdp system/oracle_4U  directory=dir1  dumpfile=tbsorcl.
  174. mp  TRANSPORT_TABLESPACES=tbsorcl

  175. xport: Release 11.2.0.1.0 - Production on 星期二 6月 6 21:30:16 2017

  176. opyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  177. DE-28002: 操作产生了 ORACLE 错误 28002
  178. RA-28002: 7 天之后口令将过期

  179. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  180. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  181. 启动 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dum
  182. file=tbsorcl.dmp TRANSPORT_TABLESPACES=tbsorcl
  183. 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  184. 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  185. 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  186. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
  187. *****************************************************************************
  188. YSTEM.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
  189. C:\DATA\TBSORCL.DMP
  190. *****************************************************************************
  191. 可传输表空间 TBSORCL 所需的数据文件:
  192. C:\APP\ADMINISTRATOR\ORADATA\ORCL\TBSORCL.DBF
  193. 作业 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已于 21:30:54 成功完成


  194. :\Users\Administrator>expdp system/oracle_4U  directory=dir1  dumpfile=tbsorcl.
  195. mp  TABLESPACES=tbsorcl

  196. xport: Release 11.2.0.1.0 - Production on 星期二 6月 6 21:34:11 2017

  197. opyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  198. DE-28002: 操作产生了 ORACLE 错误 28002
  199. RA-28002: 7 天之后口令将过期

  200. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  201. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  202. 启动 "SYSTEM"."SYS_EXPORT_TABLESPACE_01":  system/******** directory=dir1 dumpfi
  203. e=tbsorcl.dmp TABLESPACES=tbsorcl
  204. 正在使用 BLOCKS 方法进行估计...
  205. 处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
  206. 使用 BLOCKS 方法的总估计: 64 KB
  207. 处理对象类型 TABLE_EXPORT/TABLE/TABLE
  208. . 导出了 "HR"."TORCL"                                5.007 KB       1 行
  209. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TABLESPACE_01"
  210. *****************************************************************************
  211. YSTEM.SYS_EXPORT_TABLESPACE_01 的转储文件集为:
  212. C:\DATA\TBSORCL.DMP
  213. 作业 "SYSTEM"."SYS_EXPORT_TABLESPACE_01" 已于 21:34:17 成功完成


  214. :\Users\Administrator>
复制代码
目的地linux64:
PL/SQL Developper:
  1. select  * from v$log;

  2. select  * from v$logfile;

  3. alter database add logfile group 4 ('+data','+fra') size 52428800 blocksize 512;

  4. select  * from dba_directories;

  5. create directory dir1 as '/home/oracle/dir1';

  6. select  * from dba_tablespaces;

  7. select  * from hr.tutforcl1;

  8. alter tablespace tbsutforcl1 read write ;

  9. select  * from v$transportable_platform;

  10. alter tablespace tbsutforcl2 read write ;

  11. select  * from hr.tutforcl2;

  12. select  * from hr.torcl;

  13. select  * from dba_tables t where t.table_name='TORCL' and t.owner='HR';


复制代码
SQL*Plus:
  1. [root@station90 ~]# su - oracle
  2. [oracle@station90 ~]$ cd /u01/app/
  3. [oracle@station90 app]$ ls
  4. oracle  oraInventory
  5. [oracle@station90 app]$ cd oracle/
  6. [oracle@station90 oracle]$ ls
  7. admin  cfgtoollogs  checkpoints  diag  flash_recovery_area  man_recovery_area  man_recovery_area.11g  oradata  product
  8. [oracle@station90 oracle]$ cd oradata/
  9. [oracle@station90 oradata]$ ls
  10. rcat
  11. [oracle@station90 oradata]$ mkdir orcl
  12. [oracle@station90 oradata]$ cd orcl/
  13. [oracle@station90 orcl]$ ls
  14. [oracle@station90 orcl]$ pwd
  15. /u01/app/oracle/oradata/orcl
  16. [oracle@station90 orcl]$ ls
  17. DATA_D-UTFORCL_I-454057935_TS-TBSUTFORCL1_FNO-7_01S653C2
  18. [oracle@station90 orcl]$ mv DATA_D-UTFORCL_I-454057935_TS-TBSUTFORCL1_FNO-7_01S653C2 tbsutforcl1.dbf  
  19. [oracle@station90 orcl]$ ls
  20. tbsutforcl1.dbf
  21. [oracle@station90 orcl]$ pwd
  22. /u01/app/oracle/oradata/orcl
  23. [oracle@station90 orcl]$ cd
  24. [oracle@station90 ~]$ ls
  25. copytape-root.sh         mail            rac_tns                  tnsnames.ora              update_t04209_uname.sql  视频  下载
  26. create_t04209_uname.sql  oradiag_oracle  revertape-root.sh        ttio.rcv                  公共的                   图片  音乐
  27. dir1                     osb.txt         select_t04209_uname.sql  update2_t04209_uname.sql  模板                     文档  桌面
  28. [oracle@station90 ~]$ exit
  29. logout
  30. [root@station90 ~]# chown oracle:oinstall /home/oracle/dir1/TBSUTFORCL1.DMP
  31. [root@station90 ~]# su - oracle
  32. [oracle@station90 ~]$ impdp help=y

  33. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:08:28 2017

  34. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


  35. The Data Pump Import utility provides a mechanism for transferring data objects
  36. between Oracle databases. The utility is invoked with the following command:

  37.      Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

  38. You can control how Import runs by entering the 'impdp' command followed
  39. by various parameters. To specify parameters, you use keywords:

  40.      Format:  impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
  41.      Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

  42. USERID must be the first parameter on the command line.

  43. ------------------------------------------------------------------------------

  44. The available keywords and their descriptions follow. Default values are listed within square brackets.

  45. ATTACH
  46. Attach to an existing job.
  47. For example, ATTACH=job_name.

  48. CONTENT
  49. Specifies data to load.
  50. Valid keywords are: [ALL], DATA_ONLY and METADATA_ONLY.

  51. DATA_OPTIONS
  52. Data layer option flags.
  53. Valid keywords are: SKIP_CONSTRAINT_ERRORS.

  54. DIRECTORY
  55. Directory object to be used for dump, log and sql files.

  56. DUMPFILE
  57. List of dumpfiles to import from [expdat.dmp].
  58. For example, DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.

  59. ENCRYPTION_PASSWORD
  60. Password key for accessing encrypted data within a dump file.
  61. Not valid for network import jobs.

  62. ESTIMATE
  63. Calculate job estimates.
  64. Valid keywords are: [BLOCKS] and STATISTICS.

  65. EXCLUDE
  66. Exclude specific object types.
  67. For example, EXCLUDE=SCHEMA:"='HR'".

  68. FLASHBACK_SCN
  69. SCN used to reset session snapshot.

  70. FLASHBACK_TIME
  71. Time used to find the closest corresponding SCN value.

  72. FULL
  73. Import everything from source [Y].

  74. HELP
  75. Display help messages [N].

  76. INCLUDE
  77. Include specific object types.
  78. For example, INCLUDE=TABLE_DATA.

  79. JOB_NAME
  80. Name of import job to create.

  81. LOGFILE
  82. Log file name [import.log].

  83. NETWORK_LINK
  84. Name of remote database link to the source system.

  85. NOLOGFILE
  86. Do not write log file [N].

  87. PARALLEL
  88. Change the number of active workers for current job.

  89. PARFILE
  90. Specify parameter file.

  91. PARTITION_OPTIONS
  92. Specify how partitions should be transformed.
  93. Valid keywords are: DEPARTITION, MERGE and [NONE].

  94. QUERY
  95. Predicate clause used to import a subset of a table.
  96. For example, QUERY=employees:"WHERE department_id > 10".

  97. REMAP_DATA
  98. Specify a data conversion function.
  99. For example, REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO.

  100. REMAP_DATAFILE
  101. Redefine datafile references in all DDL statements.

  102. REMAP_SCHEMA
  103. Objects from one schema are loaded into another schema.

  104. REMAP_TABLE
  105. Table names are remapped to another table.
  106. For example, REMAP_TABLE=EMP.EMPNO:REMAPPKG.EMPNO.

  107. REMAP_TABLESPACE
  108. Tablespace object are remapped to another tablespace.

  109. REUSE_DATAFILES
  110. Tablespace will be initialized if it already exists [N].

  111. SCHEMAS
  112. List of schemas to import.

  113. SKIP_UNUSABLE_INDEXES
  114. Skip indexes that were set to the Index Unusable state.

  115. SOURCE_EDITION
  116. Edition to be used for extracting metadata.

  117. SQLFILE
  118. Write all the SQL DDL to a specified file.

  119. STATUS
  120. Frequency (secs) job status is to be monitored where
  121. the default [0] will show new status when available.

  122. STREAMS_CONFIGURATION
  123. Enable the loading of Streams metadata

  124. TABLE_EXISTS_ACTION
  125. Action to take if imported object already exists.
  126. Valid keywords are: APPEND, REPLACE, [SKIP] and TRUNCATE.

  127. TABLES
  128. Identifies a list of tables to import.
  129. For example, TABLES=HR.EMPLOYEES,SH.SALES:SALES_1995.

  130. TABLESPACES
  131. Identifies a list of tablespaces to import.

  132. TARGET_EDITION
  133. Edition to be used for loading metadata.

  134. TRANSFORM
  135. Metadata transform to apply to applicable objects.
  136. Valid keywords are: OID, PCTSPACE, SEGMENT_ATTRIBUTES and STORAGE.

  137. TRANSPORTABLE
  138. Options for choosing transportable data movement.
  139. Valid keywords are: ALWAYS and [NEVER].
  140. Only valid in NETWORK_LINK mode import operations.

  141. TRANSPORT_DATAFILES
  142. List of datafiles to be imported by transportable mode.

  143. TRANSPORT_FULL_CHECK
  144. Verify storage segments of all tables [N].

  145. TRANSPORT_TABLESPACES
  146. List of tablespaces from which metadata will be loaded.
  147. Only valid in NETWORK_LINK mode import operations.

  148. VERSION
  149. Version of objects to import.
  150. Valid keywords are: [COMPATIBLE], LATEST or any valid database version.
  151. Only valid for NETWORK_LINK and SQLFILE.

  152. ------------------------------------------------------------------------------

  153. The following commands are valid while in interactive mode.
  154. Note: abbreviations are allowed.

  155. CONTINUE_CLIENT
  156. Return to logging mode. Job will be restarted if idle.

  157. EXIT_CLIENT
  158. Quit client session and leave job running.

  159. HELP
  160. Summarize interactive commands.

  161. KILL_JOB
  162. Detach and delete job.

  163. PARALLEL
  164. Change the number of active workers for current job.

  165. START_JOB
  166. Start or resume current job.
  167. Valid keywords are: SKIP_CURRENT.

  168. STATUS
  169. Frequency (secs) job status is to be monitored where
  170. the default [0] will show new status when available.

  171. STOP_JOB
  172. Orderly shutdown of job execution and exits the client.
  173. Valid keywords are: IMMEDIATE.


  174. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSUTFORCL1.DMP TRANSPORT_DATAFILES='/u01/app/oracle/oradata/orcl/tbsutforcl1.dbf'

  175. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:09:53 2017

  176. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  177. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  178. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  179. and Real Application Testing options
  180. Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  181. Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=TBSUTFORCL1.DMP TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutforcl1.dbf
  182. Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  183. Processing object type TRANSPORTABLE_EXPORT/TABLE
  184. Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  185. Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 21:09:58

  186. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSUTFORCL2.DMP TRANSPORT_DATAFILES='/u01/app/oracle/oradata/orcl/tbsutforcl2.dbf'  

  187. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:23:25 2017

  188. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  189. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  190. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  191. and Real Application Testing options
  192. Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  193. Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=TBSUTFORCL2.DMP TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutforcl2.dbf
  194. Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  195. ORA-39123: Data Pump transportable tablespace job aborted
  196. ORA-19722: datafile /u01/app/oracle/oradata/orcl/tbsutforcl2.dbf is an incorrect version

  197. Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 21:23:27

  198. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSUTFORCL2.DMP TRANSPORT_DATAFILES='/u01/app/oracle/oradata/orcl/tbsutforcl2.dbf'  

  199. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:26:07 2017

  200. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  201. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  202. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  203. and Real Application Testing options
  204. Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  205. Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=TBSUTFORCL2.DMP TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutforcl2.dbf
  206. Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  207. Processing object type TRANSPORTABLE_EXPORT/TABLE
  208. Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  209. Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 21:26:08

  210. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSORCL.DMP TRANSPORT_DATAFILES='/u01/app/oracle/oradata/orcl/tbsorcl.dbf'  

  211. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:32:59 2017

  212. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  213. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  214. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  215. and Real Application Testing options
  216. Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  217. Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=TBSORCL.DMP TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsorcl.dbf
  218. Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  219. ORA-39123: Data Pump transportable tablespace job aborted
  220. ORA-29345: cannot plug a tablespace into a database using an incompatible character set

  221. Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 21:33:00

  222. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSORCL.DMP

  223. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:36:04 2017

  224. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  225. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  226. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  227. and Real Application Testing options
  228. Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
  229. Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=dir1 dumpfile=TBSORCL.DMP
  230. Processing object type TABLE_EXPORT/TABLE/TABLE
  231. ORA-39083: Object type TABLE:"HR"."TORCL" failed to create with error:
  232. ORA-00959: tablespace 'TBSORCL' does not exist
  233. Failing sql is:
  234. CREATE TABLE "HR"."TORCL" ("A" NUMBER) SEGMENT CREATION IMMEDIATE 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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TBSORCL"

  235. Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  236. Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at 21:36:05

  237. [oracle@station90 ~]$ impdp system/oracle_4U  directory=dir1 dumpfile=TBSORCL.DMP remap_tablespace=TBSORCL:users

  238. Import: Release 11.2.0.1.0 - Production on Tue Jun 6 21:36:57 2017

  239. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  240. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  241. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  242. and Real Application Testing options
  243. Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
  244. Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=dir1 dumpfile=TBSORCL.DMP remap_tablespace=TBSORCL:users
  245. Processing object type TABLE_EXPORT/TABLE/TABLE
  246. Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  247. . . imported "HR"."TORCL"                                5.007 KB       1 rows
  248. Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 21:36:58

  249. [oracle@station90 ~]$
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-22 05:56 , Processed in 0.044730 second(s), 25 queries .

快速回复 返回顶部 返回列表