Bo's Oracle Station

查看: 2038|回复: 0

(52-27)第48/49次:2016-01-18星期一,2016-01-20星期三

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-1-19 09:46:40 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-1-21 09:52 编辑

parfile:
  1. exclude=table:"in ('T_BANK_INVOICE')", procedure:" in ('SECURE_DML')"
  2. query=hr.employees:"where department_id=90"
复制代码
(52-27)上完1Z0-052第17章
  1. CREATE TABLE ext1
  2.                   (employee_id       NUMBER(4),
  3.                    first_name        VARCHAR2(20),
  4.                     last_name         VARCHAR2(25),
  5.                      hire_date         DATE)
  6. ORGANIZATION EXTERNAL
  7.      ( TYPE ORACLE_LOADER DEFAULT DIRECTORY dir1
  8.        ACCESS PARAMETERS
  9.        ( records delimited by newline
  10.          badfile 'ext1_%a_%p.bad'
  11.          logfile 'ext1_%a_%p.log'
  12.          fields terminated by ','
  13.          missing field values are null
  14.      ( employee_id, first_name, last_name,
  15.       hire_date char date_format date mask "dd-mon-yyyy"))
  16.      LOCATION (dir1:'ext1.dat', dir2:'ext2.dat') )
  17.      PARALLEL 20   REJECT LIMIT UNLIMITED;
  18.      
  19.      select  * from ext1;
  20.      
  21.      delete from ext1;
  22.      
  23.      update ext1 set first_name='XXX' where employee_id=100;
  24.      
  25.      create index ind1 on ext1(employee_id);
  26.      
  27.      alter  table ext1 add constraint c1 check ( employee_id <500 ) ;
  28.      
  29.      select  * from user_tables t where t.TABLE_NAME='EXT1';
  30.      
  31.      select  * from user_external_tables ;
  32.      
  33.      ----
  34.      select  * from tpasswd;
  35.      
  36.      create table tpasswd (
  37.          i_name  varchar2(50),
  38.          i_passwd  char(1),
  39.          i_uid  number,
  40.          i_gid number,
  41.          i_comment  varchar2(70),
  42.          i_home  varchar2(30),
  43.          i_shell  varchar2(30))  ;
  44.      
  45. drop table tpasswd;

  46. select  * from tpasswd;
  47. ---
  48. CREATE TABLE ext_emp_query_results
  49. ORGANIZATION EXTERNAL
  50.   (
  51.     TYPE ORACLE_DATAPUMP
  52.     DEFAULT DIRECTORY dir1
  53.     LOCATION (dir1:'emp1.exp',dir2:'emp2.exp')
  54.   )
  55. PARALLEL 20
  56. AS
  57. SELECT e.first_name,e.last_name,d.department_name
  58. FROM   employees e, departments d
  59. WHERE  e.department_id = d.department_id AND
  60.        d.department_name in
  61.                      ('Marketing', 'Purchasing');
  62.                      
  63. delete from ext_emp_query_results;

  64. select  * from t05217_e;

  65. select  * from user_encrypted_columns;

  66. create table t5  ( a  encrypt identified by "redhat123")
  67. ORGANIZATION EXTERNAL
  68. ( TYPE ORACLE_DATAPUMP
  69.    DEFAULT DIRECTORY "DIR1"
  70.    LOCATION('empnew.dat') )
  71. REJECT LIMIT UNLIMITED
  72. as select * from t05217_e;


  73. create table t4( a  number )   
  74. ORGANIZATION EXTERNAL
  75. ( TYPE ORACLE_DATAPUMP
  76.    DEFAULT DIRECTORY "DIR1"
  77.    LOCATION('emp_ext.dat') )
  78. REJECT LIMIT UNLIMITED;

  79. create table t6( a  number )   
  80. ORGANIZATION EXTERNAL
  81. ( TYPE ORACLE_DATAPUMP
  82.    DEFAULT DIRECTORY "DIR1"
  83.    LOCATION('empnew.dat') )
  84. REJECT LIMIT UNLIMITED;



  85. select  * from t6;

  86. create table t7( a  number   encrypt  identified by "redhat123")   
  87. ORGANIZATION EXTERNAL
  88. ( TYPE ORACLE_DATAPUMP
  89.    DEFAULT DIRECTORY "DIR1"
  90.    LOCATION('empnew.dat') )
  91. REJECT LIMIT UNLIMITED;

  92. select  * from t7;
复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-29 08:16 , Processed in 0.032144 second(s), 24 queries .

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