转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/11358497
正确答案:AB
SQL*Loader加载数据从外部文件到Oracle数据库表。它有一个强大的数据解析引擎,用控制文件把数据文件中的数据按一定的格式做限制加载到数据库的表中。以下是使用SQL*Loader特点:
1、通过网络加载数据。这表示您可以在客户端运行SQL*Loader加载数据到数据库服务器端。
2、在同一会话下可以从多个数据文件来完成数据加载。
3、在同一会话下数据可以加载到多个表。
4、指定字符集的数据。
5、选择性地加载数据(你可以基于记录的值加载记录)。
6、使用SQL函数加载数据。
7、在指定的字段中产生唯一的序列的键值。
8、把操作系统的文件数据当成数据库中表的数据来访问。
9、数据可以从磁盘、磁带或命名管道加载。
10、可以生成详细的错误报告,这大大帮助多们快速找到故障原因。
11、可以加载任何复杂的对象关系数据。
12可以使用二次数据文件来完成加载lob和集合。
无论是常规使用或直接路径加载。而传统的路径加载非常灵活,直接路径加载提供了优越的加载性能。
解析答案:
答案A正确,同一个数据文件可以加载到多个表,实验如下
(1)创建两张表
gyj@OCM> create table gyj_test1 (xm varchar2(20),sfzh varchar2(20));
Table created.
gyj@OCM> create table gyj_test2 (xm varchar2(20),sfzh varchar2(20));
Table created.
(2)文件中的数据
[oracle@mydb ~]$vi /home/oracle/gyj_test.dat
A Joe 433101196303180048
B Tom 432325197810254019
(3)控制文件
[oracle@mydb ~]$ vi /home/oracle/gyj_test.ctl
load data
infile '/home/oracle/gyj_test.dat'
discardfile gyj_test.dat.dsc
into table gyj_test1
when tab='A'
(tab filler position(1:1),
xm position(3:5),
sfzh position(*+1:24)
)
into table gyj_test2
when tab='B'
(tab filler position(1:1),
xm position(3:5),
sfzh position(*+1:24)
)
(4)加载数据
oracle@mydb ~]$ sqlldr userid=gyj/gyj control=/home/oracle/gyj_test.ctl
SQL*Loader: Release 11.2.0.3.0 - Production on Tue Sep 10 13:08:38 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 2
(5)验证两表的数据
gyj@OCM> select * from gyj_test1;
XM SFZH
-------------------- --------------------
Joe 433101196303180048
gyj@OCM> select * from gyj_test2;
XM SFZH
-------------------- --------------------
Tom 432325197810254019
答案B正确,多个数据文件的数据可以加载到同一张表,实验如下:
(1)创建两张表
gyj@OCM> create table gyj_test3 (xm varchar2(20),sfzh varchar2(20));
Table created.
(2)文件中的数据
[oracle@mydb ~]$vi /home/oracle/gyj_test1.dat
Joe|433101196303180048
[oracle@mydb ~]$vi /home/oracle/gyj_test2.dat
Tom|432325197810254019
(3)控制文件
[oracle@mydb ~]$ vi /home/oracle/gyj_test3.ctl
load data
infile '/home/oracle/gyj_test1.dat'
infile '/home/oracle/gyj_test2.dat'
into table gyj_test3
fields terminated by '|'
(xm,sfzh)
(4)加载数据
[oracle@mydb ~]$ sqlldr userid=gyj/gyj control=/home/oracle/gyj_test3.ctl
SQL*Loader: Release 11.2.0.3.0 - Production on Tue Sep 10 13:16:13 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
Commit point reached - logical record count 2
(5)验证这张表的数据
gyj@OCM> select * from gyj_test3;
XM SFZH
-------------------- --------------------
Joe 433101196303180048
Tom 432325197810254019
答案C不正确,是可以按记录来导的,比如以下实验,我只导后两条记录
(1)创建一张表
gyj@OCM> create table gyj_test4 (xm varchar2(20),sfzh varchar2(20));
Table created.
(2)文件中的数据
[oracle@mydb ~]$ vi /home/oracle/gyj_test4.dat
Tom|432325197810254019|
Joe|433101196303180048|
Rose|433101195709120024|
Jack|43310119691229004x|
Linda|433101196711270050|
Jeny|433101197306101514|
(3)控制文件
[oracle@mydb ~]$ vi /home/oracle/gyj_test4.ctl
load data
infile '/home/oracle/gyj_test4.dat'
into table gyj_test4
fields terminated by '|'
(xm,sfzh)
(4)加载数据
[oracle@mydb ~]$ sqlldr userid=gyj/gyj control=/home/oracle/gyj_test4.ctl skip=3
SQL*Loader: Release 11.2.0.3.0 - Production on Tue Sep 10 13:33:25 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 3
gyj@OCM> select * from gyj_test4;
(5)验证这张表的数据
XM SFZH
-------------------- --------------------
Jack 43310119691229004x
Linda 433101196711270050
Jeny 433101197306101514
答案D明显不正确这里不再解释了
答案E不正确: 数据可以从磁盘、磁带或命名管道加载
QQ:252803295
技术交流:
DSI&Core Search Ⅰ 群:127149411(2000人技术群:未满)
DSI&Core Search Ⅱ 群:177089463(1000人技术群:未满)
DSI&Core Search Ⅲ 群:284596437(500人技术群:未满)
DSI&Core Search Ⅳ 群:192136702(500人技术群:未满)
DSI&Core Search Ⅴ 群:285030382(500人闲聊群:未满)
MAIL:dbathink@hotmail.com
BLOG:http://blog.csdn.net/guoyjoe
WEIBO:http://weibo.com/guoyJoe0218
ITPUB:http://www.itpub.net/space-uid-28460966.html
OCM: http://education.oracle.com/education/otn/YGuo.HTM
分享到:
相关推荐
- IMPROVED: Change the way of registering bitmap font. - FIXED: A GButton pivot issue. - FIXED: Correct text align behavior. 2.3.0 - NEW: Allow loader to load component. - NEW: Add text template ...
It computes a MD5 or SHA1 cryptographic hash of the content of the file. If the file is modified, the hash is different. With fciv, you can compute hashes of all your sensitive files. When you ...
Applies to: Oracle Server - Enterprise Edition - Version: 10.2.0.4 to 11.1.0.6 ...NOTE:419871.1 - Failures due to "skgxpvfymmtu: process failed because of a resource problem in the OS" on 32-bit Linux
ISO-TR 8550-1:2007 Guidance on the selection and usage of acceptance sampling systems for inspection of discrete items in lots - Part 1:Acceptance sampling - 完整英文版(43页).pdf
ISO-TR 8550-1:2007 Guidance on the selection and usage of accept
perl-Pod-Usage-1.63-3.el7.noarch 4:perl-libs-5.16.3-286.el7.x86_64 4:perl-macros-5.16.3-286.el7.x86_64 perl-Storable-2.45-3.el7.x86_64 perl-Exporter-5.68-3.el7.noarch perl-constant-1.27-2.el7....
ISO-TR 8550-3:2007 Guidance on the selection and usage of accept
ISO-TR 8550-2:2007 Guidance on the selection and usage of accept
ISO-TR 8550-3:2007 Guidance on the selection and usage of acceptance sampling systems for inspection of discrete items in lots - Part 3:Sampling by variables - 完整英文版(45页).pdf
ISO-TR 8550-2:2007 Guidance on the selection and usage of acceptance sampling systems for inspection of discrete items in lots - Part 2:Sampling by attributes - 完整英文版(19页).pdf
** 本程序是在微机版的GrADS1.8SL11和2.0.a4.oga.1上测试通过, ** 在redhat linux 9.0环境下测试通过,其他的版本没有做过测试。 ** 在脚本中使用writeslhz命令。格式如下: ** ** Usage: writeslhz x y ...
// When building OkHttpClient, the OkHttpClient.Builder() is passed to the with() method to initialize the configuration OkHttpClient = RetrofitUrlManager.getInstance().with(new OkHttpClient.Builder...
1) Unpack the archive where you would like to store the binaries, eg: Unix-based operating systems (Linux, Solaris and Mac OS X) tar zxvf apache-maven-3.x.y.tar.gz Windows unzip apache-maven-3.x...
7)....Added: Streaming unpacked debug info into temporal files instead of memory - this greatly reduces run-time application memory usage at cost of slightly slower exception processing. This also ...
ftp工具 192.168.0.202 tools-toolss 老师测评网址 http://172.16.0.198:8080/poll/ 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和...
1. The Main Components of a PC. The Computer and Peripherals. Inside the Personal Computer. How to Open the Case. Protecting Yourself Against Electric Shocks. Pearson Techonology Group - ...
The library is a DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible. It doesn't provide you with a drawer builder. Gradle ...
The intent of this book is to provide examples of SQL usage that can be understood simply by reading. Second, topics are organized in an intuitive and logical sequence. SQL keywords are introduced ...
NEWS for OpenSC -- History of user visible changes Complete change history is available online: http://www.opensc-project.org/opensc/timeline New in 0.12.0; 2010-12-22 * OpenSC uses a single reader ...
* Description: This is the Sample code to show the usage of EDSDK. * * * * * ******************************************************************************* * * * Written and developed by Camera ...