透過sqlldr匯入到sys使用者

qqmengxue發表於2010-07-06

版本 :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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章