关于oracle sql loader的直接路径装载

zm_stone 2000-07-18 10:22:00
oracle的服务器是hp unix,客户机是windows 98,从客户机装载数据,可以使用直接路径装载的选项吗?我使用时总是出错,客户机和服务器必须是相同操作系统吗?或使用直接路径装载有其他限制?
...全文
249 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zm_stone 2000-08-22
  • 打赏
  • 举报
回复
catldr.sql有什么用,必须要执行吗?
zm_stone 2000-07-20
  • 打赏
  • 举报
回复
出错号是:ora-02352:出错提示是:直接路径连接必须在同类间进行.
请高手们指点迷津.
Tommy Chang 2000-07-20
  • 打赏
  • 举报
回复
参数没什么特别的,除了direct=true指明是direct path。
CATLDR.SQL执行了吗?
过程挺麻烦的,例子不够详细。

查到的文档范例如下
\server.815\a67792\ch04.htm#1774

Case 6: Loading Using the Direct Path Load Method
This case study loads the EMP table using the direct path load method and concurrently builds all indexes. It illustrates the following functions:

Use of the direct path load method to load and index data. See Chapter 8, "SQL*Loader: Conventional and Direct Path Loads".

How to specify the indexes for which the data is pre-sorted. See Pre-sorting Data for Faster Indexing.

Loading all-blank numeric fields as null. See Loading All-Blank Fields.

The NULLIF clause. See NULLIF Keyword.

Note: Specify the name of the table into which you want to load data; otherwise, you will see LDR-927. Specifying DIRECT=TRUE as a command-line parameter is not an option when loading into a synonym for a table.

In this example, field positions and datatypes are specified explicitly.

Control File
The control file is ULCASE6.CTL.

LOAD DATA
INFILE 'ulcase6.dat'
INSERT
INTO TABLE emp
1) SORTED INDEXES (empix)
2) (empno POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
ename POSITION(06:15) CHAR,
job POSITION(17:25) CHAR,
mgr POSITION(27:30) INTEGER EXTERNAL NULLIF mgr=BLANKS,
sal POSITION(32:39) DECIMAL EXTERNAL NULLIF sal=BLANKS,
comm POSITION(41:48) DECIMAL EXTERNAL NULLIF comm=BLANKS,
deptno POSITION(50:51) INTEGER EXTERNAL NULLIF deptno=BLANKS)


Notes:

The SORTED INDEXES clause identifies indexes:presorting data:case study the indexes on which the data is sorted. This clause indicates that the datafile is sorted on the columns in the EMPIX index. This clause allows SQL*Loader to optimize index creation by eliminating the sort phase for this data when using the direct path load method.

The NULLIF...BLANKS clause specifies that the column should be loaded as NULL if the field in the datafile consists of all blanks. For more information, refer to Loading All-Blank Fields.

Invoking SQL*Loader
Run the script ULCASE6.SQL as SCOTT/TIGER then enter the following at the command line:

sqlldr scott/tiger ulcase6.ctl direct=true log=ulcase6.log


Additional Information: The command "sqlldr" is a UNIX-specific invocation. To invoke SQL*Loader on your operating system, see your Oracle operating system-specific documentation.

Log File
The following is a portion of the log file:

Control File: ulcase6.ctl
Data File: ulcase6.dat
Bad File: ulcase6.bad
Discard File: none specified

(Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Continuation: none specified
Path used: Direct

Table EMP, loaded from every logical record.
Insert option in effect for this table: REPLACE

Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
EMPNO 1:4 4 CHARACTER
ENAME 6:15 10 CHARACTER
JOB 17:25 9 CHARACTER
MGR 27:30 4 CHARACTER
NULL if MGR = BLANKS
SAL 32:39 8 CHARACTER
NULL if SAL = BLANKS
COMM 41:48 8 CHARACTER
NULL if COMM = BLANKS
DEPTNO 50:51 2 CHARACTER
NULL if EMPNO = BLANKS


The following index(es) on table EMP were processed:
index SCOTT.EMPIX loaded successfully with 7 keys

Table EMP:
7 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.

Bind array size not used in direct path.
Space allocated for memory besides bind array: 0 bytes

Total logical records skipped: 0
Total logical records read: 7
Total logical records rejected: 0
Total logical records discarded: 0

Run began on Sun Nov 08 11:15:28 1998
Run ended on Sun Nov 08 11:15:31 1998

Elapsed time was: 00:00:03.22
CPU time was: 00:00:00.10

zm_stone 2000-07-20
  • 打赏
  • 举报
回复
datafile和control file没有问题,我用的参数只有direct = true,如果不direct = true则没有问题.
Tommy Chang 2000-07-20
  • 打赏
  • 举报
回复
ORA-02352 Direct path connection must be homogeneous
Cause: The user-side to kernel-side connection is heterogeneous.
Action: Make the connection between identical hardware and operating systems.

你的datafile,control file没问题吧?sql loader参数是什么?

:)
jhc 2000-07-18
  • 打赏
  • 举报
回复
出错号是什么?客户机和服务器肯定不要求是相同操作系统。

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧