版本 :9i、10g
今天突然想到用sqlldr导入到sys用户下是否可以实现,因为登陆sys用户要使用sysdba的权限
[oracle@localhost data]$ sqlldr / control=SYS_TEST.ctl
SQL*Loader: Release 10.2.0.4.0 - Production on Mon Feb 17 23:04:47 2020
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01017: ???/????; ?????
[oracle@localhost data]$ sqlldr userid='sys/sys123 as sysdba' control=SYS_TEST.ctl
LRM-00112: multiple values not allowed for parameter 'userid'
SQL*Loader: Release 10.2.0.4.0 - Production on Mon Feb 17 23:05:18 2020
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-100: Syntax error on command-line
方法一:
[oracle@localhost data]$ sqlldr "'sys/sys123 as sysdba' control=SYS_TEST.ctl"
SQL*Loader: Release 10.2.0.4.0 - Production on Mon Feb 17 23:08:37 2020
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Commit point reached - logical record count 1
方法二:
alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;
??????
SQL> startup force;
ORACLE ???????
Total System Global Area 348127232 bytes
Fixed Size 1267428 bytes
Variable Size 113248540 bytes
Database Buffers 230686720 bytes
Redo Buffers 2924544 bytes
????????
????????
SQL> show parameter O7_DICTIONARY_ACCESSIBILITY;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean TRUE
[oracle@localhost data]$ sqlldr sys/sys123 control=SYS_TEST.ctl
SQL*Loader: Release 10.2.0.4.0 - Production on Mon Feb 17 23:13:18 2020
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Commit point reached - logical record count 1
[oracle@localhost data]$
可以参考:metalink DOC:212638.1
附:
linux下sqlplus命令行乱码解决:
export NLS_LANG=american_america.utf8
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10130206/viewspace-667360/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10130206/viewspace-667360/