- 最后登录
- 2017-10-17
- 在线时间
- 93 小时
- 威望
- 157
- 金钱
- 2803
- 注册时间
- 2012-5-18
- 阅读权限
- 50
- 帖子
- 98
- 精华
- 3
- 积分
- 157
- UID
- 437
|
8#
发表于 2014-3-28 16:55:13
数据库 11.2.0.2.0 Linux x86-64
操作系统 RHEL 5.5 x86-64
实验步骤
- [oracle@ora11202 ~]$ sqlplus system/oracle@192.168.2.21/orcl
- SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 28 16:49:25 2014
- Copyright (c) 1982, 2010, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> create tablespace tbs_nby datafile '/u01/oradata/orcl/tbs_nby.dbf' size 8M autoextend on next 8M maxsize 1024M;
- Tablespace created.
- SQL> create user nby identified by nby default tablespace tbs_nby;
- User created.
- SQL> grant create session,resource,unlimited tablespace to nby;
- Grant succeeded.
- SQL> conn nby/nby
- Connected.
- SQL> CREATE TABLE nby.t_part(ID number,Name varchar2(10),CONSTRAINT pk_part PRIMARY KEY(ID))
- 2 partition by range(id)(
- 3 partition p1 values less than ('11'),
- 4 partition p2 values less than ('21'),
- 5 partition p3 values less than ('31'));
- Table created.
- SQL> INSERT INTO t_part VALUES(1,'aaa');
- 1 row created.
- SQL> INSERT INTO t_part VALUES(2,'aaa');
- 1 row created.
- SQL> INSERT INTO t_part VALUES(3,'aaa');
- 1 row created.
- SQL> INSERT INTO t_part VALUES(4,'aaa');
- 1 row created.
- SQL> COMMIT;
- Commit complete.
- SQL> ALTER TABLE t_part MODIFY CONSTRAINT pk_part DISABLE VALIDATE;
- Table altered.
- SQL> quit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@ora11202 ~]$ cat test.dat
- 11,nby
- 12,nby
- 13,nby
- 14,nby
- [oracle@ora11202 ~]$ cat test.ctl
- Load DATA
- INFILE 'test.dat'
- BADFILE 'test.bad'
- APPEND
- INTO TABLE T_PART
- FIELDS TERMINATED BY ","
- (ID ,Name)
- [oracle@ora11202 ~]$ sqlldr nby/nby@192.168.2.21/orcl control=test.ctl
- SQL*Loader: Release 11.2.0.2.0 - Production on Fri Mar 28 16:52:08 2014
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- SQL*Loader-643: error executing INSERT statement for table T_PART
- ORA-25128: No insert/update/delete on table with constraint (NBY.PK_PART) disabled and validated
- SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
- [oracle@ora11202 ~]$
- [oracle@ora11202 ~]$ sqlldr nby/nby@192.168.2.21/orcl control=test.ctl direct=true
- SQL*Loader: Release 11.2.0.2.0 - Production on Fri Mar 28 16:52:12 2014
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- SQL*Loader-951: Error calling once/load initialization
- ORA-02373: Error parsing insert statement for table NBY.T_PART.
- ORA-25128: No insert/update/delete on table with constraint (NBY.PK_PART) disabled and validated
复制代码 |
|