Oracle的SYS用户登录报权限不足(insufficient privileges)




D:\Users\xiaomaimiao>sqlplus sys/lhr@192.168.1.31/orastrac  as sysdba 


SQL*Plus: Release 11.2.0.1.0 Production on Sat Jul 15 11:36:54 2017 


Copyright (c) 1982, 2010, Oracle.  All rights reserved. 


ERROR: 
ORA-01031: insufficient privileges 


 

 

注意多个数据库实例时候, set   ORACLE_SID='',

、检查 ( 下位于 目录)是否包含这句: ,没有的话加上 linux SQLNET.AUTHENTICATION_SERVICES = (ALL)

、检查登陆 的用户 或安装 时候使用的用户 是不是在包含在 组中,域用户没有连上域服务器时就可能出现这种现象。

要保证 参数 、 orapassw , 口令文件是否存在

C:\Users\Administrator> orapwd file="E:\oracle\ora8i\DATABASE\PWDortest.ORA" password=lhr 
[oracle@robinson dbs]$  orapwd file=$ORACLE_HOME/dbs/orapworcl password=oracle force=y 

 

一种解决方法案例:

、检查系统参数:

SQL> show parameter password

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

remote_login_passwordfile            string      EXCLUSIVE

select * from v$pwfile_users;

SQL>

为空

SQL> grant sysdba to sys;

grant sysdba to sys

*

ERROR at line 1:

ORA-01994: GRANT failed: password file missing or disabled

、建立 password 文件

D:/>orapwd file="D:/oracle/product/10g/db_1/database/PWDoratest.ora" password=gp   oswong entries=10

 

SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP

------------------------------ ----- -----

SYS                            TRUE  TRUE

SYS 正常显示出来。

、重新在远程以 SYSDBA 登录,可正常使用。

 

如果口令文件创建的有问题,也是会报如下的错误:

ora-01031:insufficient privileges

口令文件的命名格式应为 orapwsid ,并且 sid 是区分大小写的。由于 Target Database 连接 Auxiliary Database 时需要验证口令,

如果违反了以上规则,将会提示 ORA-01031: insufficient privileges 

 

我在用 linux 创建 duplicate 数据库的时候 就是因为口令文件创建的路径和名称不对才遇到这个错误

 

 



 

 

 




windows 下  sqlplus / as sysdba 登录报权限不足  

 

系统是xp系统的虚拟机,由于之前是在Administrator用户下登陆的,后边换了个用户名lhr,登陆进去后发现sqlplus连不上了,具体:

 

 

Microsoft Windows XP [版本 5.1.2600] 
(C) 版权所有 1985-2001 Microsoft Corp. 
C:\Documents and Settings\lhr>sqlplus "/as sysdba" 
SQL*Plus: Release 11.2.0.1.0 Production on 星期四 月 10 00:02:59 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved. 
ERROR: 
ORA-01031: insufficient privileges 
请输入用户名 
ERROR: 
ORA-01017: 无效的用户名 口令;拒绝登录 
请输入用户名 
ERROR: 
ORA-01017: 无效的用户名 口令;拒绝登录 
SP2-0157: 在 次尝试之后无法 CONNECT 到 ORACLE ,  退出  SQL*Plus 
C:\Documents and Settings\lhr>sqlplus "sys/lhr as sysdba" 
SQL*Plus: Release 11.2.0.1.0 Production on 星期四 月 10 00:04:06 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

 连接到 :

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options 
SQL> 

不能直接 "/as sysdba" 登录,可以输入用户名跟密码登录。 
  
判断应为用户与组策略的问题。 

解决办法:

 

 

 

重新登陆:

C:\Documents and Settings\lhr>sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on 星期四 7月 10 00:06:18 2014

 

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

 

 

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

 

SQL>

©著作权归作者所有:来自51CTO博客作者小麦苗DB宝的原创作品,如需转载,请注明出处,否则将追究法律责任

更多相关文章

  1. 【DB笔试面试265】在Oracle中,Oracle的SYS用户登录报权限不足的常
  2. 【DB笔试面试543】Oracle用户的状态有几种?分别表示什么含义?
  3. 使用python的tkinter模块实现的GUI版用户登录程序(附源码)
  4. 【MySQL】有关登录连接的几个参数(max_connections等)及其相关错误
  5. Vsftpd虚拟用户登录
  6. mysql基本知识学习
  7. 密码错误频繁登录引发的“library cache lock”或“row cache lo
  8. 用ldap作为django后端用户登录验证
  9. 五行代码实现在小程序中接入微信登录

随机推荐

  1. Android RelativeLayout 的属性
  2. android中使用 EditText 时,设定 inputTyp
  3. 浅谈android的selector,背景选择器
  4. 如何解析 android 中的 XML?
  5. 解决 Android(安卓)Studio:Failed to reso
  6. 别人学习android的用到的书和路线
  7. ImageView 常用属性的分析
  8. Android 设置完autoLink属性后自定义跳转
  9. Android(安卓)Jetpack-Navigation 初见
  10. android 常用 属性