这道题目的知识点是要你熟悉外部表,怎么建外部表,外部表的数据是怎么存储的等等。请给出正确答案,并解释A B C D每项,最好用实验测试证明!

外部表的metadata(元数据)是存在数据库中,但它的数据是存储在数据库外部的操作系统文件,oracle 可以以只读的方式来访问该文件,也就是说,可以在查询语句中将 External Table 与数据库中其他表进行连接(Join),但是不能给 External Table 加上索引,并且不能插入/更新/删除数据,不能添加虚拟列,因为它不是真正的数据库表。

A是错误的

The defaultrejection limit is zero

参考:SQL Language Reference

REJECT LIMIT Thisclause lets you specify an integer as an upper limit for the
number of errors tobe logged before the statement terminates and rolls back any
changes made by thestatement. The default rejection limit is zero. For parallel DML
operations, thereject limit is applied to each parallel server.

B是错误的

外部表的元数据是在数据库里面的,数据是存储在外部的

参考:Concept
external table

A read-only tablewhose metadata is stored in the database but whose data in stored in filesoutside the database. The database uses the metadata describing external tablesto expose their data as if they were relational tables.

C是错误的

ORACLE_LOADER是从外部表转载数据入数据库表
ORACLE_DATAPUMP是从数据库表卸载数据入外部表

2个驱动的功能是相反的

参考:Concept
About ExternalTables

Oracle Databaseprovides two access drivers for external tables. The default access driver isORACLE_LOADER, which allows the reading of data from external files using theOracle loader technology. The ORACLE_LOADER access driver provides data mappingcapabilities which are a subset of the control file syntax of SQL*Loaderutility. The second access driver, ORACLE_DATAPUMP, lets you unload data—thatis, read data from the database and insert it into an external table,represented by one or more external files—and then reload it into an OracleDatabase.

D是正确的

外部表可以用CREATE TABLE AS SELECT with the ORACLE_DATAPUMP access driver来创建

参考:Concept

External TableCreation
External tables areread-only unless created with CREATE TABLE AS SELECT with the ORACLE_DATAPUMPaccess driver. Restrictions for external tables include no support for indexedcolumns, virtual columns, and column objects.

创建外部表及卸载、加载数据操作
(1)、Loader生成外部表加载文件:Administrator's Guide 15章结尾 create external table
In the scriptsdirectory, you will find prod_master.dat and prod_master.ctl. Using theinformation found in these files, 
create an externaltable names PROD_MASTER in the SH schema of the PROD database.
[oracle@rptdb1external]$ cat prod_master.ctl
load data
infile'/home/oracle/dir/prod_master.dat'
append
into table costs
fields terminatedby ","
(channel_id,prod_id,promo_id,time_id,unit_cost,unit_price)
[oracle@rptdb1external]$
[oracle@rptdb1external]$ cat prod_master.dat
6,6,6,6,6,600
7,7,7,7,7,700

create directorydir as '/opt/oracrs/external';
grant read,write ondirectory dir to sh;
create tablecosts(channel_id number,prod_id number,promo_id number,time_id number,unit_costnumber,unit_price number
);
sqlldr gyj/gyjcontrol=prod_master.ctl external_table=GENERATE_ONLY

(2)、Datapump外部表卸载:DatabaseData Warehousing Guide 12章结尾部分Extractinginto Export Files Using External Tables
CREATE TABLE ext_t1
ORGANIZATIONexternal
(
  TYPEORACLE_DATAPUMP
  DEFAULTDIRECTORY dump_file_dir
  location('t1.dat')
)
as SELECT * FROM T1WHERE ID=1;

(3)、Datapump外部表加载
SQL> createtable ext_t1
(id number,
name varchar2(100)
)
organizationexternal
(
type oracle_datapump
default directoryDUMP_FILE_DIR
location ('t1.dat')
);

[每日一题] OCP1z0-047 :2013-08-06 外表部――相关描述的更多相关文章

  1. [Buzz.Today]2013.08.06

    # 用简单方案解决80%的问题,再慢慢解决剩下20% [先完成,后完美]美国工程院院士.Google Fellow辛格的哲学:先用个简单方案解决80%的问题,再慢慢解决剩下20%.许多优秀人才都败在这 ...

  2. <每日一题>题目15:mysql创建表及相关约束

    题目: 解答: 第一个表创建: create table class( cid int not null auto_increment primary key, caption char(20) no ...

  3. 【js】Leetcode每日一题-完成所有工作的最短时间

    [js]Leetcode每日一题-完成所有工作的最短时间 [题目描述] 给你一个整数数组 jobs ,其中 jobs[i] 是完成第 i 项工作要花费的时间. 请你将这些工作分配给 k 位工人.所有工 ...

  4. 【JavaScript】Leetcode每日一题-二叉搜索树的范围和

    [JavaScript]Leetcode每日一题-二叉搜索树的范围和 [题目描述] 给定二叉搜索树的根结点 root,返回值位于范围 [low, high] 之间的所有结点的值的和. 示例1: 输入: ...

  5. 【js】Leetcode每日一题-停在原地的方案数

    [js]Leetcode每日一题-停在原地的方案数 [题目描述] 有一个长度为 arrLen 的数组,开始有一个指针在索引 0 处. 每一步操作中,你可以将指针向左或向右移动 1 步,或者停在原地(指 ...

  6. 老男孩IT教育-每日一题汇总

    老男孩IT教育-每日一题汇总 第几天 第几周 日期 快速访问链接 第123天 第二十五周 2017年8月25日 出现Swap file….already exists以下错误如何解决? 第122天 2 ...

  7. PL/SQL Challenge 每日一题:2014-3-14 11gR2中带RELIES_ON子句的RESULT_CACHE函数

    PL/SQL Challenge 每日一题:2014-3-14 11gR2中带RELIES_ON子句的RESULT_CACHE函数 最先答对且答案未经编辑的puber将获得纪念章一枚(答案不可编辑但可 ...

  8. 【JavaScript】【dp】Leetcode每日一题-解码方法

    [JavaScript]Leetcode每日一题-解码方法 [题目描述] 一条包含字母 A-Z 的消息通过以下映射进行了 编码 : 'A' -> 1 'B' -> 2 ... 'Z' -& ...

  9. 【Java每日一题】20170106

    20170105问题解析请点击今日问题下方的"[Java每日一题]20170106"查看(问题解析在公众号首发,公众号ID:weknow619) package Jan2017; ...

随机推荐

  1. LoadRunner中常见参数和变量

    1.参数和字符串变量的交换 ①lr_save_string(“hello world”,“param”)         将hello world 保存在参数 param中 ②lr_eval_stri ...

  2. selenium webdriver+windows+python+chrome遇见的问题

    win7系统,在python中调用ChromeDriver 一直报错 “ selenium.common.exceptions.WebDriverException: Message: 'Chrome ...

  3. bzoj1391 最大权闭合子图(also最小割、网络流)

    一道裸的最小割的题,写一下只是练练手. 表示被卡M,RE不开心.一道裸题至于吗? 再次复习一下最大权闭合子图: 1.每一个点若为正权,与源点连一条容量为绝对值权值的边.否则连向汇点一条容量为绝对值权值 ...

  4. java Comparable 比较器的使用

    /** * */ package com.mindreader; import java.util.Arrays; /** * @作者 Mind reader * @内容 对象数组排序——Compar ...

  5. 数往知来 asp.net 聊天室问题解决方案<十六>

      1:在服务端创建了一个负责监听的sokcet   //三个:采用TCP协议.              ListenSocket = new Socket(AddressFamily.InterN ...

  6. Maven依赖

    可传递的依赖: 1.具体调用哪个版本?最短依赖长度的那个 如:A -> B -> C -> D 2.0 , A -> E -> D 1.0,那么调用D 1.0 为了避免这 ...

  7. HttpClient 操作总结

    1.HttpClient4.3和之前版本设置超时(set timeout)区别: 参考:http://my.oschina.net/u/577453/blog/173724 解析:如果不设置超时的话, ...

  8. Strider安装(Ubuntu)

    安装: git clone https://github.com/Strider-CD/strider.git && cd strider nam install 然而还是出现一大波错 ...

  9. tmux的使用方法和个性化配置

    介绍 tmux是一个优秀的终端复用软件,即使非正常掉线,也能保证当前的任务运行,这一点对于远程SSH访问特别有用,网络不好的情况下仍然能保证工作现场不丢失!此外,tmux完全使用键盘控制窗口,实现窗口 ...

  10. 第三百四十天 how can I 坚持

    感觉还是要制定个计划,做不做不到是一回事,但是得制定.目标,一年时间进小米,加油,fordream 计划好好想想,技不在多,精就好. 晚上写了写杨辉三角,都不记得什么是杨辉三角了. 人言落日是天涯,望 ...