设为首页收藏本站

Botang唐波's Oracle Station

查看: 651|回复: 0

数据仓库活动总结帖

[复制链接]

659

主题

1018

帖子

7486

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
7486
发表于 2017-12-14 19:49:27 | 显示全部楼层 |阅读模式
第42/43次活动:2017-12-14(星期四晚上7:00-9:30)和2017-12-19(星期二晚上7:00-9:30)
文本原文:
  1. 1234 BAKER      10 9999 101 102 103
  2. 1234 JOKER      10 9999 777 888 999
  3. 2664 YOUNG      20 2893 425 abc 102
  4. 5321 OTOOLE     10 9999 321  55  40
  5. 2134 FARMER     20 4555 236 456
  6. 2414 LITTLE     20 5634 236 456  40
  7. 6542 LEE        10 4532 102 321  14
  8. 2849 EDDS       xx 4555     294  40
  9. 4532 PERKINS    10 9999  40
  10. 1244 HUNT       11 3452 665 133 456
  11. 123 DOOLITTLE  12 9940         132
  12. 1453 MACDONALD  25 5532     200  
复制代码
有问题的行:
  1. 1234 BAKER      10 9999 101 102 103
  2. --1234 JOKER      10 9999 777 888 999
  3. --2664 YOUNG      20 2893 425 abc 102
  4. 5321 OTOOLE     10 9999 321  55  40
  5. 2134 FARMER     20 4555 236 456
  6. 2414 LITTLE     20 5634 236 456  40
  7. 6542 LEE        10 4532 102 321  14
  8. --2849 EDDS       xx 4555     294  40
  9. 4532 PERKINS    10 9999  40
  10. 1244 HUNT       11 3452 665 133 456
  11. 123 DOOLITTLE  12 9940         132
  12. 1453 MACDONALD  25 5532     200  
复制代码
控制文件的写法:

  1. -- Copyright (c) 1991 by Oracle Corporation
  2. --   NAME
  3. --     ulcase5.ctl - <one-line expansion of the name>
  4. --   DESCRIPTION
  5. --     <short description of component this file declares/defines>
  6. --   RETURNS
  7. --
  8. --   NOTES
  9. --     <other useful comments, qualifications, etc.>
  10. --   MODIFIED   (MM/DD/YY)
  11. --    ksudarsh   04/08/94 -  merge changes from branch 1.3.710.1
  12. --    ksudarsh   02/21/94 -  quote dat file
  13. --    ksudarsh   03/11/93 -  make filename lowercase
  14. --    ksudarsh   11/06/92 -  infile is ulcase5
  15. --    cheigham   08/28/91 -  Creation
  16. --
  17. -- $Header: ulcase5.ctl,v 1.4 1994/04/08 13:44:31 ksudarsh Exp $ case5.ctl
  18. --
  19. -- Loads EMP records from first 23 characters
  20. -- Creates and loads PROJ records for each PROJO listed
  21. -- for each employee

  22. LOAD DATA
  23. INFILE 'ulcase5.dat'
  24. BADFILE 'ulcase5.bad'
  25. DISCARDFILE 'ulcase5.dis'
  26. REPLACE

  27. INTO TABLE EMP
  28.   (EMPNO    POSITION(1:4)   INTEGER EXTERNAL,
  29.    ENAME    POSITION(6:15)  CHAR,
  30.    DEPTNO   POSITION(17:18) CHAR,
  31.    MGR      POSITION(20:23) INTEGER EXTERNAL)

  32. INTO TABLE PROJ
  33. -- PROJ has two columns, both not null: EMPNO and PROJNO
  34. WHEN PROJNO != '   '
  35.   (EMPNO    POSITION(1:4)   INTEGER EXTERNAL,
  36.    PROJNO   POSITION(25:27) INTEGER EXTERNAL)   -- 1st proj

  37. INTO TABLE PROJ
  38. WHEN PROJNO != '   '
  39.   (EMPNO    POSITION(1:4)   INTEGER EXTERNAL,
  40.    PROJNO   POSITION(29:31) INTEGER EXTERNAL)   -- 2nd proj

  41. INTO TABLE PROJ
  42. WHEN PROJNO != '   '
  43.   (EMPNO    POSITION(1:4)   INTEGER EXTERNAL,
  44.    PROJNO   POSITION(33:35) INTEGER EXTERNAL)   -- 3rd proj        
复制代码

sqlldr  hr/oracle_4U  control=ulcase5.ctl  direct=y
写不写direct=y差别很大,写了能加载进尽量多的行(多表插入的时候,表是分开来看的)。


  1. select  i.index_name , i.status
  2. from dba_indexes i
  3. where i.table_owner='HR' and i.table_name='EMP';

  4. select  * from hr.emp  order by 1;

  5. select  * from dba_constraints c
  6.   where c.table_name='EMP' and c.owner='HR';
  7.   
  8.   --------------
  9.   select * from hr.proj  order  by 2;
  10.   
  11.   
复制代码
1Z0-052 17-29ppt里,少掉的文本:


  1.                Today's Newly Hired Employees

  2. Dept  Job       Manager   MgrNo  Emp Name  EmpNo  Salary/Commission
  3. ----  --------  --------  -----  --------  -----  -----------------
  4. 20    Salesman  Blake      7698  Shepard    8061  $1,600.00 (3%)
  5.                                  Falstaff   8066  $1,250.00 (5%)
  6.                                  Major      8064  $1,250.00 (14%)

  7. 30    Clerk     Scott      7788  Conrad     8062  $1,100.00
  8.                 Ford       7369  DeSilva    8063    $800.00
  9.       Manager   King       7839  Provo      8065  $2,975.00
复制代码
  1. SQL*Loader Control File (continued)
  2. 1         -- This is a sample control file
  3. 2 LOAD DATA
  4. 3 INFILE ’SAMPLE.DAT’
  5. 4 BADFILE ’sample.bad’
  6. 5 DISCARDFILE ’sample.dsc’
  7. 6 APPEND
  8. 7 INTO TABLE emp
  9. 8 WHEN (57) = ’.’
  10. 9 TRAILING NULLCOLS
  11. 10 (hiredate SYSDATE,
  12.                  deptno POSITION(1:2) INTEGER EXTERNAL(3)
  13.             NULLIF deptno=BLANKS,
  14.                  job POSITION(7:14) CHAR TERMINATED BY WHITESPACE
  15.                  NULLIF job=BLANKS "UPPER(:job)",
  16.                  mgr POSITION(28:31) INTEGER EXTERNAL
  17.                  TERMINATED BY WHITESPACE, NULLIF mgr=BLANKS,
  18.             ename POSITION(34:41) CHAR
  19.                  TERMINATED BY WHITESPACE "UPPER(:ename)",
  20.                  empno POSITION(45) INTEGER EXTERNAL
  21.                  TERMINATED BY WHITESPACE,
  22.                  sal POSITION(51) CHAR TERMINATED BY WHITESPACE
  23.                  "TO_NUMBER(:sal,’$99,999.99’)",
  24.                  comm INTEGER EXTERNAL ENCLOSED BY ’(’ AND ’%’
  25.                  ":comm * 100"
  26.          )
  27. The explanation of this sample control file (by line numbers) is as follows:
  28. 1.        Comments can appear anywhere in the command section of the file, but they must not appear in the data. Precede any comment with two hyphens. All text to the right of the double hyphen is ignored until the end of the line.
  29. 2.        The LOAD DATA statement indicates to SQL*Loader that this is the beginning of a new data load. If you are continuing a load that has been interrupted in progress, use the CONTINUE LOAD DATA statement.
  30. 3.        The INFILE keyword specifies the name of a data file containing data that you want to load.
  31. 4.        The BADFILE keyword specifies the name of a file into which rejected records are placed.
  32. 5.        The DISCARDFILE keyword specifies the name of a file into which discarded records are placed.
  33. 6.        The APPEND keyword is one of the options that you can use when loading data into a table that is not empty. To load data into a table that is empty, use the INSERT keyword.
  34. 7.        The INTO TABLE keyword enables you to identify tables, fields, and data types. It defines the relationship between records in the data file and tables in the database.
  35. 8.        The WHEN clause specifies one or more field conditions that each record must match before SQL*Loader loads the data. In this example, SQL*Loader loads the record only if the 57th character is a decimal point. That decimal point delimits dollars and cents in the field and causes records to be rejected if SAL has no value.
  36. 9.        The TRAILING NULLCOLS clause prompts SQL*Loader to treat any relatively positioned columns that are not present in the record as null columns.
  37. 10.        The remainder of the control file contains the field list, which provides information about column formats in the table that is being loaded.
复制代码
  1. select * from dba_tablespaces;

  2. create  directory dirorcl as 'c:\data\dirorcl';

  3. select  * from database_properties;

  4. create tablespace tbszhs datafile 'C:\app\Administrator\oradata\orcl\tbszhs.dbf' size 10M ;

  5. create table hr.tzhs(a number ) tablespace tbszhs;

  6. insert into hr.tzhs values (100 ) ;

  7. alter tablespace tbszhs read only ;

  8. select  * from v$transportable_platform;

  9. alter tablespace tbszhs read write ;

  10. -----------------------------------------------

  11. select * from dba_tablespaces;

  12. create  directory dirutforcl as 'c:\data\dirutforcl';

  13. select  * from dba_tables t where t.tablespace_name='TBSUTF8_11G';

  14. begin
  15.   dbms_tts.transport_set_check('TBSUTF8_11G');
  16. end;


  17. select  * from transport_set_violations;


  18. alter table sys.TUTF8_11G_SYS  move tablespace system ;

  19. alter tablespace tbsutf8_11g read only;

  20. alter tablespace tbsutf8_11g read write;



  21. -----------------------------------------

  22. 数据泵导出实用程序提供了一种用于在 Oracle 数据库之间传输
  23. 数据对象的机制。该实用程序可以使用以下命令进行调用:

  24.   示例: expdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

  25. 您可以控制导出的运行方式。具体方法是: 在 'expdp' 命令后输入
  26. 各种参数。要指定各参数, 请使用关键字:

  27.   格式:  expdp KEYWORD=value 或 KEYWORD=(value1,value2,...,valueN)
  28.   示例: expdp scott/tiger DUMPFILE=scott.dmp DIRECTORY=dmpdir SCHEMAS=scott
  29.               或 TABLES=(T11,T12), 如果 T1 是分区表

  30. SERID 必须是命令行中的第一个参数。

  31. -----------------------------------------------------------------------------

  32. 以下是可用关键字和它们的说明。方括号中列出的是默认值。

  33. TTACH
  34. 连接到现有作业。
  35. 例如, ATTACH=job_name。

  36. OMPRESSION
  37. 减少转储文件大小。
  38. 有效的关键字值为: ALL, DATA_ONLY, [METADATA_ONLY] 和 NONE。

  39. ONTENT
  40. 指定要卸载的数据。
  41. 有效的关键字值为: [ALL], DATA_ONLY 和 METADATA_ONLY。

  42. ATA_OPTIONS
  43. 数据层选项标记。
  44. 有效的关键字值为: XML_CLOBS。

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

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

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


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

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

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

  61. STIMATE
  62. 计算作业估计值。
  63. 有效的关键字值为: [BLOCKS] 和 STATISTICS。

  64. STIMATE_ONLY
  65. 计算作业估计值而不执行导出。

  66. XCLUDE
  67. 排除特定对象类型。
  68. 例如, EXCLUDE=SCHEMA:"='HR'"。

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

  71. LASHBACK_SCN
  72. 用于重置会话快照的 SCN。

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

  75. ULL
  76. 导出整个数据库 [N]。

  77. ELP
  78. 显示帮助消息 [N]。

  79. NCLUDE
  80. 包括特定对象类型。
  81. 例如, INCLUDE=TABLE_DATA。

  82. OB_NAME
  83. 要创建的导出作业的名称。

  84. OGFILE
  85. 指定日志文件名 [export.log]。

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

  88. OLOGFILE
  89. 不写入日志文件 [N]。

  90. ARALLEL
  91. 更改当前作业的活动 worker 的数量。

  92. ARFILE
  93. 指定参数文件名。

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

  97. EMAP_DATA
  98. 指定数据转换函数。
  99. 例如, REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO。

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

  102. AMPLE
  103. 要导出的数据的百分比。

  104. CHEMAS
  105. 要导出的方案的列表 [登录方案]。

  106. OURCE_EDITION
  107. 用于提取元数据的版本。

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

  111. ABLES
  112. 标识要导出的表的列表。
  113. 例如, TABLES=HR.EMPLOYEES,SH.SALES:SALES_1995。

  114. ABLESPACES
  115. 标识要导出的表空间的列表。

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

  119. RANSPORT_FULL_CHECK
  120. 验证所有表的存储段 [N]。

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

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

  126. -----------------------------------------------------------------------------

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

  129. DD_FILE
  130. 将转储文件添加到转储文件集。

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

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

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

  137. ELP
  138. 汇总交互命令。

  139. ILL_JOB
  140. 分离并删除作业。

  141. ARALLEL
  142. 更改当前作业的活动 worker 的数量。

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

  145. TART_JOB
  146. 启动或恢复当前作业。
  147. 有效的关键字值为: SKIP_CURRENT。

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

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



  154. :\Users\Administrator>expdp system/oracle_4U directory=dirorcl dumpfile=tbszhs.
  155. mp  TRANSPORT_TABLESPACES=tbszhs

  156. xport: Release 11.2.0.1.0 - Production on 星期二 12月 19 19:17:20 2017

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

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

  160. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  161. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  162. 启动 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** directory=dirorcl
  163. umpfile=tbszhs.dmp TRANSPORT_TABLESPACES=tbszhs
  164. 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  165. 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  166. 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  167. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
  168. *****************************************************************************
  169. YSTEM.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
  170. C:\DATA\DIRORCL\TBSZHS.DMP
  171. *****************************************************************************
  172. 可传输表空间 TBSZHS 所需的数据文件:
  173. C:\APP\ADMINISTRATOR\ORADATA\ORCL\TBSZHS.DBF
  174. 作业 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已于 19:18:01 成功完成


  175. :\Users\Administrator>rman target /

  176. 恢复管理器: Release 11.2.0.1.0 - Production on 星期二 12月 19 19:18:24 2017

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

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

  179. MAN> convert tablespace tbszhs to platform 'Linux IA (64-bit)' format 'c:\tbszh
  180. .dbf';

  181. 启动 conversion at source 于 19-12月-17
  182. 使用目标数据库控制文件替代恢复目录
  183. 分配的通道: ORA_DISK_1
  184. 通道 ORA_DISK_1: SID=20 设备类型=DISK
  185. 通道 ORA_DISK_1: 启动数据文件转换
  186. 输入数据文件: 文件号=00006 名称=C:\APP\ADMINISTRATOR\ORADATA\ORCL\TBSZHS.DBF
  187. 已转换的数据文件 = C:\TBSZHS.DBF
  188. 通道 ORA_DISK_1: 数据文件转换完毕, 经过时间: 00:00:01
  189. 完成 conversion at source 于 19-12月-17

  190. MAN> exit


  191. 恢复管理器完成。

  192. :\Users\Administrator>export ORACLE_SID=utforcl
  193. export' 不是内部或外部命令,也不是可运行的程序
  194. 或批处理文件。

  195. :\Users\Administrator>set ORACLE_SID=utforcl

  196. :\Users\Administrator>expdp system/oracle_4U directory=dirutforcl dumpfile=tbsu
  197. f8_11g.dmp  TRANSPORT_TABLESPACES=tbsutf8_11g

  198. xport: Release 11.2.0.1.0 - Production on 星期二 12月 19 19:30:14 2017

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

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

  202. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  203. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  204. RA-39002: 操作无效
  205. RA-39070: 无法打开日志文件。
  206. RA-39087: 目录名 DIRUTFORCL 无效



  207. :\Users\Administrator>expdp system/oracle_4U directory=dirutforcl dumpfile=tbsu
  208. f8_11g.dmp  TRANSPORT_TABLESPACES=tbsutf8_11g

  209. xport: Release 11.2.0.1.0 - Production on 星期二 12月 19 19:31:10 2017

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

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

  213. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  214. ith the Partitioning, OLAP, Data Mining and Real Application Testing options
  215. 启动 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/******** directory=dirutfor
  216. l dumpfile=tbsutf8_11g.dmp TRANSPORT_TABLESPACES=tbsutf8_11g
  217. 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
  218. 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
  219. 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  220. 已成功加载/卸载了主表 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01"
  221. *****************************************************************************
  222. YSTEM.SYS_EXPORT_TRANSPORTABLE_01 的转储文件集为:
  223. C:\DATA\DIRUTFORCL\TBSUTF8_11G.DMP
  224. *****************************************************************************
  225. 可传输表空间 TBSUTF8_11G 所需的数据文件:
  226. C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G01.DBF
  227. 作业 "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" 已于 19:31:46 成功完成


  228. :\Users\Administrator>

  229. ------------------------------------------------------------
  230. Microsoft Windows [版本 6.1.7600]
  231. 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

  232. C:\Users\Administrator>rman target /

  233. 恢复管理器: Release 11.2.0.1.0 - Production on 星期二 12月 19 19:31:28 2017

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

  235. 连接到目标数据库: UTFORCL (DBID=454057935)

  236. RMAN> convert tablespace tbszhs to platform '
  237. 2>
  238. 3>

  239. RMAN-00571: ===========================================================
  240. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  241. RMAN-00571: ===========================================================
  242. RMAN-00558: 分析输入命令时出错
  243. RMAN-01006: 在进行语法分析时发出出错信号
  244. RMAN-02002: 到达意外的输入文件结尾

  245. RMAN> convert tablespace tbszhs to platform 'Solaris[tm] OE (32-bit)' format 'c:
  246. \data\tbsutf8_11g.dbf' ;

  247. 启动 conversion at source 于 19-12月-17
  248. 使用目标数据库控制文件替代恢复目录
  249. 分配的通道: ORA_DISK_1
  250. 通道 ORA_DISK_1: SID=142 设备类型=DISK
  251. RMAN-00571: ===========================================================
  252. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  253. RMAN-00571: ===========================================================
  254. RMAN-03002: conversion at source 命令 (在 12/19/2017 19:32:42 上) 失败
  255. RMAN-20202: 在恢复目录中未找到表空间
  256. RMAN-06019: 无法转换表空间名称"TBSZHS"

  257. RMAN> convert tablespace tbsutf8_11g to platform 'Solaris[tm] OE (32-bit)' forma
  258. t 'c:\data\tbsutf8_11g.dbf' ;

  259. 启动 conversion at source 于 19-12月-17
  260. 使用通道 ORA_DISK_1
  261. 通道 ORA_DISK_1: 启动数据文件转换
  262. 输入数据文件: 文件号=00006 名称=C:\APP\ADMINISTRATOR\ORADATA\UTFORCL\TBSUTF8_11G
  263. 01.DBF
  264. 已转换的数据文件 = C:\DATA\TBSUTF8_11G.DBF
  265. 通道 ORA_DISK_1: 数据文件转换完毕, 经过时间: 00:00:01
  266. 完成 conversion at source 于 19-12月-17

  267. RMAN>
复制代码
  1. [oracle@station90 ~]$ rman target /

  2. Recovery Manager: Release 11.2.0.3.0 - Production on Tue Dec 19 19:54:09 2017

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

  4. connected to target database: ORCL (DBID=1343950367)

  5. RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk;

  6. using target database control file instead of recovery catalog
  7. old RMAN configuration parameters:
  8. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
  9. new RMAN configuration parameters:
  10. CONFIGURE DEFAULT DEVICE TYPE TO DISK;
  11. new RMAN configuration parameters are successfully stored

  12. RMAN> convert datafile '/u01/app/oracle/oradata/orcl/tbsutf8_11g.dbf' from platform 'Solaris[tm] OE (32-bit)' format '/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf';

  13. Starting conversion at target at 2017-12-19:19:54:18
  14. allocated channel: ORA_DISK_1
  15. channel ORA_DISK_1: SID=73 device type=DISK
  16. allocated channel: ORA_DISK_2
  17. channel ORA_DISK_2: SID=130 device type=DISK
  18. allocated channel: ORA_DISK_3
  19. channel ORA_DISK_3: SID=202 device type=DISK
  20. allocated channel: ORA_DISK_4
  21. channel ORA_DISK_4: SID=15 device type=DISK
  22. allocated channel: ORA_DISK_5
  23. channel ORA_DISK_5: SID=68 device type=DISK
  24. allocated channel: ORA_DISK_6
  25. channel ORA_DISK_6: SID=139 device type=DISK
  26. allocated channel: ORA_DISK_7
  27. channel ORA_DISK_7: SID=204 device type=DISK
  28. allocated channel: ORA_DISK_8
  29. channel ORA_DISK_8: SID=14 device type=DISK
  30. channel ORA_DISK_1: starting datafile conversion
  31. input file name=/u01/app/oracle/oradata/orcl/tbsutf8_11g.dbf
  32. converted datafile=/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf
  33. channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
  34. Finished conversion at target at 2017-12-19:19:54:21

  35. RMAN>
复制代码
  1. impdp system/oracle_4U directory=dir1 dumpfile=tbsutf8_11g.dmp  TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf

  2.     Import: Release 11.2.0.3.0 - Production on Tue Dec 19 19:55:00 2017

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

  4.     UDI-28002: operation generated ORACLE error 28002
  5.     ORA-28002: the password will expire within 7 days

  6.     Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7.     With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8.     and Real Application Testing options
  9.     Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  10.     Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=tbsutf8_11g.dmp TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf
  11.     Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  12.     Processing object type TRANSPORTABLE_EXPORT/TABLE
  13.     Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  14.     Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 19:55:02
复制代码
  1.     impdp system/oracle_4U directory=dir1 dumpfile=tbsutf8_11g.dmp  TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf

  2.     Import: Release 11.2.0.3.0 - Production on Tue Dec 19 19:55:00 2017

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

  4.     UDI-28002: operation generated ORACLE error 28002
  5.     ORA-28002: the password will expire within 7 days

  6.     Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7.     With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8.     and Real Application Testing options
  9.     Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
  10.     Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** directory=dir1 dumpfile=tbsutf8_11g.dmp TRANSPORT_DATAFILES=/u01/app/oracle/oradata/orcl/tbsutf8_11g2.dbf
  11.     Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
  12.     Processing object type TRANSPORTABLE_EXPORT/TABLE
  13.     Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
  14.     Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 19:55:02
复制代码
  1. [oracle@station90 dir1]$ impdp system/oracle_4U  directory=dir1 dumpfile=tbszhs2.dmp  remap_tablespace=tbszhs:example

  2. Import: Release 11.2.0.3.0 - Production on Tue Dec 19 20:02:23 2017

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

  4. UDI-28002: operation generated ORACLE error 28002
  5. ORA-28002: the password will expire within 7 days

  6. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8. and Real Application Testing options
  9. Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
  10. Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=dir1 dumpfile=tbszhs2.dmp remap_tablespace=tbszhs:example
  11. Processing object type TABLE_EXPORT/TABLE/TABLE
  12. Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  13. . . imported "HR"."TZHS"                                     5 KB       1 rows
  14. Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 20:02:25

复制代码
  1. select * from dba_directories;

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

  3. select  *  from dba_tablespaces;

  4. select  * from v$transportable_platform;

  5. select  *  from dba_tablespaces;

  6. alter tablespace tbsutf8_11g read write ;

  7. select  * from hr.tutf8_11g;

  8. insert into  hr.tutf8_11g values ( 1) ;

  9. select  * from hr.tzhs;

  10. select  tablespace_name from dba_tables t where t.table_name='TZHS';

  11. create directory dir2 as '/home/oracle/dir2';
复制代码
  1. [oracle@station90 dir1]$ expdp system/oracle_4U directory=dir1 dumpfile=dir1:dir1_%U.dmp,dir2:dir2_%U.dmp  parallel=4 full=y job_name=fulljob

  2. Export: Release 11.2.0.3.0 - Production on Tue Dec 19 20:10:12 2017

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

  4. UDE-28002: operation generated ORACLE error 28002
  5. ORA-28002: the password will expire within 7 days

  6. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8. and Real Application Testing options
  9. Starting "SYSTEM"."FULLJOB":  system/******** directory=dir1 dumpfile=dir1:dir1_%U.dmp,dir2:dir2_%U.dmp parallel 4 full=y job_name=fulljob
  10. Estimate in progress using BLOCKS method...
  11. Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
  12. Total estimation using BLOCKS method: 165.6 MB
  13. Processing object type DATABASE_EXPORT/TABLESPACE
  14. Processing object type DATABASE_EXPORT/PROFILE
  15. Processing object type DATABASE_EXPORT/SYS_USER/USER
  16. Processing object type DATABASE_EXPORT/SCHEMA/USER
  17. Processing object type DATABASE_EXPORT/ROLE
  18. Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
  19. Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
  20. Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
  21. Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
  22. Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA
  23. Processing object type DATABASE_EXPORT/RESOURCE_COST
  24. Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
  25. Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
  26. Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
  27. Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY
  28. Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT
  29. Processing object type DATABASE_EXPORT/CONTEXT

  30. Export> help
  31. ------------------------------------------------------------------------------

  32. The following commands are valid while in interactive mode.
  33. Note: abbreviations are allowed.

  34. ADD_FILE
  35. Add dumpfile to dumpfile set.

  36. CONTINUE_CLIENT
  37. Return to logging mode. Job will be restarted if idle.

  38. EXIT_CLIENT
  39. Quit client session and leave job running.

  40. FILESIZE
  41. Default filesize (bytes) for subsequent ADD_FILE commands.

  42. HELP
  43. Summarize interactive commands.

  44. KILL_JOB
  45. Detach and delete job.

  46. PARALLEL
  47. Change the number of active workers for current job.

  48. REUSE_DUMPFILES
  49. Overwrite destination dump file if it exists [N].

  50. START_JOB
  51. Start or resume current job.
  52. Valid keyword values are: SKIP_CURRENT.

  53. STATUS
  54. Frequency (secs) job status is to be monitored where
  55. the default [0] will show new status when available.

  56. STOP_JOB
  57. Orderly shutdown of job execution and exits the client.
  58. Valid keyword values are: IMMEDIATE.


  59. Export> stop_job
  60. Are you sure you wish to stop this job ([yes]/no): yes

  61. [oracle@station90 dir1]$ expdp system/oracle_4U attach=fulljob

  62. Export: Release 11.2.0.3.0 - Production on Tue Dec 19 20:12:36 2017

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

  64. UDE-28002: operation generated ORACLE error 28002
  65. ORA-28002: the password will expire within 7 days

  66. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  67. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  68. and Real Application Testing options

  69. Job: FULLJOB
  70.   Owner: SYSTEM                        
  71.   Operation: EXPORT                        
  72.   Creator Privs: TRUE                           
  73.   GUID: 60B159517E2477ACE0535A00A8C0110D
  74.   Start Time: Tuesday, 19 December, 2017 20:12:37
  75.   Mode: FULL                           
  76.   Instance: orcl
  77.   Max Parallelism: 1
  78.   EXPORT Job Parameters:
  79.   Parameter Name      Parameter Value:
  80.      CLIENT_COMMAND        system/******** directory=dir1 dumpfile=dir1:dir1_%U.dmp,dir2:dir2_%U.dmp parallel 4 full=y job_name=fulljob
  81.   State: IDLING                        
  82.   Bytes Processed: 0
  83.   Current Parallelism: 1
  84.   Job Error Count: 0
  85.   Dump File: /home/oracle/dir1/dir1_%u.dmp
  86.   Dump File: /home/oracle/dir1/dir1_01.dmp
  87.     bytes written: 4,096
  88.   Dump File: /home/oracle/dir2/dir2_01.dmp
  89.     bytes written: 4,096
  90.   Dump File: /home/oracle/dir2/dir2_%u.dmp
  91.   Dump File: /home/oracle/dir1/parallel.dmp
  92.     bytes written: 4,096
  93.   Dump File: /home/oracle/dir1/4.dmp
  94.     bytes written: 4,096
  95.   
  96. Worker 1 Status:
  97.   Process Name: DW00
  98.   State: UNDEFINED                     

  99. Export> help
  100. ------------------------------------------------------------------------------

  101. The following commands are valid while in interactive mode.
  102. Note: abbreviations are allowed.

  103. ADD_FILE
  104. Add dumpfile to dumpfile set.

  105. CONTINUE_CLIENT
  106. Return to logging mode. Job will be restarted if idle.

  107. EXIT_CLIENT
  108. Quit client session and leave job running.

  109. FILESIZE
  110. Default filesize (bytes) for subsequent ADD_FILE commands.

  111. HELP
  112. Summarize interactive commands.

  113. KILL_JOB
  114. Detach and delete job.

  115. PARALLEL
  116. Change the number of active workers for current job.

  117. REUSE_DUMPFILES
  118. Overwrite destination dump file if it exists [N].

  119. START_JOB
  120. Start or resume current job.
  121. Valid keyword values are: SKIP_CURRENT.

  122. STATUS
  123. Frequency (secs) job status is to be monitored where
  124. the default [0] will show new status when available.

  125. STOP_JOB
  126. Orderly shutdown of job execution and exits the client.
  127. Valid keyword values are: IMMEDIATE.


  128. Export> START_JOB

  129. Export> status

  130. Job: FULLJOB
  131.   Operation: EXPORT                        
  132.   Mode: FULL                           
  133.   State: EXECUTING                     
  134.   Bytes Processed: 0
  135.   Current Parallelism: 1
  136.   Job Error Count: 0
  137.   Dump File: /home/oracle/dir1/dir1_%u.dmp
  138.   Dump File: /home/oracle/dir1/dir1_01.dmp
  139.     bytes written: 937,984
  140.   Dump File: /home/oracle/dir2/dir2_01.dmp
  141.     bytes written: 4,096
  142.   Dump File: /home/oracle/dir2/dir2_%u.dmp
  143.   Dump File: /home/oracle/dir1/parallel.dmp
  144.     bytes written: 4,096
  145.   Dump File: /home/oracle/dir1/4.dmp
  146.     bytes written: 4,096
  147.   
  148. Worker 1 Status:
  149.   Process Name: DW00
  150.   State: EXECUTING                     
  151.   Object Type: DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
  152.   Completed Objects: 4
  153.   Total Objects: 4
  154.   Worker Parallelism: 1

  155. Export> status

  156. Job: FULLJOB
  157.   Operation: EXPORT                        
  158.   Mode: FULL                           
  159.   State: EXECUTING                     
  160.   Bytes Processed: 0
  161.   Current Parallelism: 1
  162.   Job Error Count: 0
  163.   Dump File: /home/oracle/dir1/dir1_%u.dmp
  164.   Dump File: /home/oracle/dir1/dir1_01.dmp
  165.     bytes written: 937,984
  166.   Dump File: /home/oracle/dir2/dir2_01.dmp
  167.     bytes written: 4,096
  168.   Dump File: /home/oracle/dir2/dir2_%u.dmp
  169.   Dump File: /home/oracle/dir1/parallel.dmp
  170.     bytes written: 4,096
  171.   Dump File: /home/oracle/dir1/4.dmp
  172.     bytes written: 4,096
  173.   
  174. Worker 1 Status:
  175.   Process Name: DW00
  176.   State: EXECUTING                     
  177.   Object Schema: OLAPSYS
  178.   Object Name: CWM2$STOREDDIMLVLTPLS
  179.   Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE
  180.   Completed Objects: 223
  181.   Worker Parallelism: 1

  182. Export>
复制代码
201954jmmxex6j31z6ah79.png
  1.     [oracle@station90 dir1]$ expdp system/oracle_4U attach=fulljob

  2.     Export: Release 11.2.0.3.0 - Production on Tue Dec 19 20:20:47 2017

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

  4.     UDE-28002: operation generated ORACLE error 28002
  5.     ORA-28002: the password will expire within 7 days

  6.     Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7.     With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8.     and Real Application Testing options

  9.     Job: FULLJOB
  10.       Owner: SYSTEM                        
  11.       Operation: EXPORT                        
  12.       Creator Privs: TRUE                           
  13.       GUID: 60B175B5B0920533E0535A00A8C07D0D
  14.       Start Time: Tuesday, 19 December, 2017 20:18:09
  15.       Mode: FULL                           
  16.       Instance: orcl
  17.       Max Parallelism: 8
  18.       EXPORT Job Parameters:
  19.       Parameter Name      Parameter Value:
  20.          CLIENT_COMMAND        system/******** directory=dir1 dumpfile=dir1:dir1_%U.dmp,dir2:dir2_%U.dmp parallel=8 full=y job_name=fulljob
  21.       State: STOP PENDING                  
  22.       Bytes Processed: 123,975,896
  23.       Percent Done: 99
  24.       Current Parallelism: 8
  25.       Job Error Count: 0
  26.       Dump File: /home/oracle/dir1/dir1_%u.dmp
  27.       Dump File: /home/oracle/dir1/dir1_01.dmp
  28.         bytes written: 15,011,840
  29.       Dump File: /home/oracle/dir2/dir2_%u.dmp
  30.       Dump File: /home/oracle/dir2/dir2_01.dmp
  31.         bytes written: 25,686,016
  32.       Dump File: /home/oracle/dir1/dir1_02.dmp
  33.         bytes written: 13,152,256
  34.       Dump File: /home/oracle/dir2/dir2_02.dmp
  35.         bytes written: 31,580,160
  36.       Dump File: /home/oracle/dir1/dir1_03.dmp
  37.         bytes written: 21,139,456
  38.       Dump File: /home/oracle/dir2/dir2_03.dmp
  39.         bytes written: 12,341,248
  40.       Dump File: /home/oracle/dir1/dir1_04.dmp
  41.         bytes written: 6,176,768
  42.       Dump File: /home/oracle/dir2/dir2_04.dmp
  43.         bytes written: 4,096
  44.       
  45.     Worker 1 Status:
  46.       Process Name: DW00
  47.       State: WORK WAITING                  
  48.       
  49.     Worker 2 Status:
  50.       Process Name: DW01
  51.       State: WORK WAITING                  
  52.       
  53.     Worker 3 Status:
  54.       Process Name: DW02
  55.       State: WORK WAITING                  
  56.       
  57.     Worker 4 Status:
  58.       Process Name: DW03
  59.       State: WORK WAITING                  
  60.       
  61.     Worker 5 Status:
  62.       Process Name: DW04
  63.       State: WORK WAITING                  
  64.       
  65.     Worker 6 Status:
  66.       Process Name: DW05
  67.       State: WORK WAITING                  
  68.       
  69.     Worker 7 Status:
  70.       Process Name: DW06
  71.       State: WORK WAITING                  
  72.       
  73.     Worker 8 Status:
  74.       Process Name: DW07
  75.       State: WORK WAITING                  
  76.       
  77.     Worker 9 Status:
  78.       Process Name: DW08
  79.       State: WORK WAITING                  

  80.     Export>
复制代码
带并行度的作业不要去ctl+c中断。
parfile选择:
  1.     directory=dirutforcl
  2.     dumpfile=schema.dmp  
  3.     schemas=hr
  4.     job_name=schemajob  
  5.     exclude=table:"in ('T05217')", procedure:"in ('SECURE_DML')"  
  6.     query='employees:where department_id=90'
  7.     flashback_time='2017-12-19:20:43:36'
复制代码
  1. [oracle@station90 ~]$ expdp system/oracle_4U parfile=parfile.ora

  2. Export: Release 11.2.0.3.0 - Production on Tue Dec 19 20:47:21 2017

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

  4. UDE-28002: operation generated ORACLE error 28002
  5. ORA-28002: the password will expire within 7 days

  6. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8. and Real Application Testing options
  9. Starting "SYSTEM"."SCHEMAJOB":  system/******** parfile=parfile.ora
  10. Estimate in progress using BLOCKS method...
  11. Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
  12. Total estimation using BLOCKS method: 960 KB
  13. Processing object type SCHEMA_EXPORT/USER
  14. Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
  15. Processing object type SCHEMA_EXPORT/ROLE_GRANT
  16. Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
  17. Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
  18. Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
  19. Processing object type SCHEMA_EXPORT/TABLE/TABLE
  20. Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
  21. Processing object type SCHEMA_EXPORT/TABLE/COMMENT
  22. Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
  23. Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
  24. Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
  25. Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
  26. Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
  27. Processing object type SCHEMA_EXPORT/VIEW/VIEW
  28. Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
  29. Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
  30. Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  31. . . exported "HR"."PLAN_TABLE1"                          22.73 KB       9 rows
  32. . . exported "HR"."COUNTRIES"                            6.367 KB      25 rows
  33. . . exported "HR"."DEPARTMENTS"                          7.007 KB      27 rows
  34. . . exported "HR"."DEPT2"                                    7 KB      27 rows
  35. . . exported "HR"."EMP2"                                 16.80 KB     107 rows
  36. . . exported "HR"."EMPLOYEES"                            9.445 KB       3 rows
  37. . . exported "HR"."IOTEMP"                               7.976 KB       0 rows
  38. . . exported "HR"."JOBS"                                 6.992 KB      19 rows
  39. . . exported "HR"."JOB_HISTORY"                          7.054 KB      10 rows
  40. . . exported "HR"."LOCATIONS"                            8.273 KB      23 rows
  41. . . exported "HR"."REGIONS"                              5.476 KB       4 rows
  42. . . exported "HR"."T16949"                                   5 KB       1 rows
  43. . . exported "HR"."TUTF8_11G"                            5.007 KB       1 rows
  44. . . exported "HR"."TZHS"                                     5 KB       1 rows
  45. Master table "SYSTEM"."SCHEMAJOB" successfully loaded/unloaded
  46. ******************************************************************************
  47. Dump file set for SYSTEM.SCHEMAJOB is:
  48.   /home/oracle/dir1/schema.dmp
  49. Job "SYSTEM"."SCHEMAJOB" successfully completed at 20:47:52

  50. [oracle@station90 ~]$
复制代码
network link 建义用公共数据库链
源头用户user1目的地也要用user1进行:
  1.     [oracle@station90 ~]$ expdp system/oracle_4U parfile=parfile.ora

  2.     Export: Release 11.2.0.3.0 - Production on Tue Dec 19 20:47:21 2017

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

  4.     UDE-28002: operation generated ORACLE error 28002
  5.     ORA-28002: the password will expire within 7 days

  6.     Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7.     With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  8.     and Real Application Testing options
  9.     Starting "SYSTEM"."SCHEMAJOB":  system/******** parfile=parfile.ora
  10.     Estimate in progress using BLOCKS method...
  11.     Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
  12.     Total estimation using BLOCKS method: 960 KB
  13.     Processing object type SCHEMA_EXPORT/USER
  14.     Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
  15.     Processing object type SCHEMA_EXPORT/ROLE_GRANT
  16.     Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
  17.     Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
  18.     Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
  19.     Processing object type SCHEMA_EXPORT/TABLE/TABLE
  20.     Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
  21.     Processing object type SCHEMA_EXPORT/TABLE/COMMENT
  22.     Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
  23.     Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
  24.     Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
  25.     Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
  26.     Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
  27.     Processing object type SCHEMA_EXPORT/VIEW/VIEW
  28.     Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
  29.     Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
  30.     Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
  31.     . . exported "HR"."PLAN_TABLE1"                          22.73 KB       9 rows
  32.     . . exported "HR"."COUNTRIES"                            6.367 KB      25 rows
  33.     . . exported "HR"."DEPARTMENTS"                          7.007 KB      27 rows
  34.     . . exported "HR"."DEPT2"                                    7 KB      27 rows
  35.     . . exported "HR"."EMP2"                                 16.80 KB     107 rows
  36.     . . exported "HR"."EMPLOYEES"                            9.445 KB       3 rows
  37.     . . exported "HR"."IOTEMP"                               7.976 KB       0 rows
  38.     . . exported "HR"."JOBS"                                 6.992 KB      19 rows
  39.     . . exported "HR"."JOB_HISTORY"                          7.054 KB      10 rows
  40.     . . exported "HR"."LOCATIONS"                            8.273 KB      23 rows
  41.     . . exported "HR"."REGIONS"                              5.476 KB       4 rows
  42.     . . exported "HR"."T16949"                                   5 KB       1 rows
  43.     . . exported "HR"."TUTF8_11G"                            5.007 KB       1 rows
  44.     . . exported "HR"."TZHS"                                     5 KB       1 rows
  45.     Master table "SYSTEM"."SCHEMAJOB" successfully loaded/unloaded
  46.     ******************************************************************************
  47.     Dump file set for SYSTEM.SCHEMAJOB is:
  48.       /home/oracle/dir1/schema.dmp
  49.     Job "SYSTEM"."SCHEMAJOB" successfully completed at 20:47:52

  50.     [oracle@station90 ~]$
复制代码
210503xdb0137f7brl73b4.png



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-6-23 01:02 , Processed in 0.203895 second(s), 26 queries .

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