oracle本機登錄不上dba的權限不足錯誤


說明:因遇到“sqlplus / as sysdba”登錄oracle時遇到權限不足(ora-01031)錯誤;百度到以下資料,原文鏈接:

http://www.xifenfei.com/2011/11/sqlnet-authentication_services%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E.html

SQLNET.AUTHENTICATION_SERVICES參數說明

聯系:手機(+86 13429648788) QQ(107644445)QQ咨詢惜分飛

標題:SQLNET.AUTHENTICATION_SERVICES參數說明

作者:惜分飛©版權所有[未經本人同意,不得以任何形式轉載,否則有進一步追究法律責任的權利.]

一、官方文檔說明

作用
Use the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authentication services.
If authentication has been installed,
it is recommended that this parameter be set to either none or to one of the authentication methods.
 
默認值
None
 
一般可選值
NONE for no authentication methods. A valid username and password can be used to access the database.
ALL for all authentication methods
NTS for Windows NT native authentication(An authentication method that enables
a client single login access to a Windows NT server and a database running on the server)

為了加深對這幾個參數的理解,通過實驗證明,這幾個參數在不同的系統中的作用

二、win系統

Microsoft Windows [版本 6.1.7601]
版權所有 (c) 2009 Microsoft Corporation。保留所有權利。
 
C:\Windows\system32>e:
 
E:\> cd E:\oracle\11_2_0\NETWORK\ADMIN
 
#sqlnet.ora文件不存在情況
E:\oracle\11_2_0\NETWORK\ADMIN> dir sqlnet.ora
  驅動器 E 中的卷沒有標簽。
  卷的序列號是 38D0-2A35
 
  E:\oracle\11_2_0\NETWORK\ADMIN 的目錄
 
找不到文件
 
E:\oracle\11_2_0\NETWORK\ADMIN>sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 11 22:13:57 2011
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
ERROR:
ORA-01031: 權限不足
 
 
請輸入用戶名:
 
#NTS情況
E:\oracle\11_2_0\NETWORK\ADMIN> more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES=(NTS)
 
E:\oracle\11_2_0\NETWORK\ADMIN>sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 11 22:16:20 2011
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
 
連接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
 
#NONE情況
E:\oracle\11_2_0\NETWORK\ADMIN> more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES=(NONE)
 
E:\oracle\11_2_0\NETWORK\ADMIN>sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 11 22:17:18 2011
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
ERROR:
ORA-01031: 權限不足
 
 
請輸入用戶名:
 
#ALL情況
E:\oracle\11_2_0\NETWORK\ADMIN> more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES=(ALL)
 
E:\oracle\11_2_0\NETWORK\ADMIN>sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 11 22:18:02 2011
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
ERROR:
ORA-12641: 驗證服務無法初始化
 
 
請輸入用戶名:

三、linux系統

[oracle@report ~]$ cd /opt/oracle/product/10 .2.0 /db_1/network/admin/
#NTS情況
[oracle@report admin]$ more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (NTS)
[oracle@report admin]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 11 22:03:51 2011
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
ERROR:
ORA-01031: insufficient privileges
 
 
Enter user-name:
 
#NONE情況
[oracle@report admin]$ more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (NONE)
[oracle@report admin]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 11 22:04:31 2011
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
ERROR:
ORA-01031: insufficient privileges
 
 
Enter user-name:
 
#ALL情況
[oracle@report admin]$ more sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (ALL)
[oracle@report admin]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 11 22:05:07 2011
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
#不存在sqlnet.ora文件情況
[oracle@report admin]$ ll sqlnet.ora
ls : sqlnet.ora: No such file or directory
[oracle@report admin]$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Nov 11 22:05:41 2011
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

四、補充說明
1、在win系統中使用all,提示ORA-12641,不是很清楚原因
2、在nts只有在win系統中有用,linux中無用
3、當不存在sqlnet.ora文件時,linux中可以正常登錄,win中不能


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM