使用SYS用户远程登陆报权限不足的解决:ORA-01031: insufficient privileges

1.监听及tnsnames.ora正常,普通用户使用服务名可以登陆数据库。

[oracle@orale admin]$ cat tnsnames.ora
mypl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.22.55)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mypl)
    )
  )
[oracle@orale admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-NOV-2013 22:30:55
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-NOV-2013 20:13:45
Uptime                    0 days 2 hr. 17 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/orale stener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orale)(PORT=1521)))
Services Summary...
Service "mypl" has 1 instance(s).
  Instance "mypl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@orale admin]$ sqlplus xiaoming/xiaoming@mypl
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 15 22:26:52 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
#########################################################################

2.使用SYS用户登陆报权限不足--上一步验证了监听及tnsnames.ora是正确的。

[oracle@orale admin]$ sqlplus sys/oracle@mypl as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 15 22:27:31 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
##########################################

3.检查$ORACLE_HOME/dbs目录下的密码文件,当前实例名是mypl。

[oracle@orale dbs]$ ls
hc_DBUA0.dat  init.ora  spfilemypl.ora
hc_mypl.dat   orapwocm    peshm_plocp_0
检查发现密码文件格式与当前实例名不符。
此时可以重建密码文件或者将orapwocm重命令为orapwmypl

创建密码文件--注意WINDOWS下和LINUX下的密码文件格式是不一样的
注意:WIN下文件夹名和LINUX下不一样。WIN下$ORACLE_HOME/database  LINUX下是:$ORACLE_HOME\dbs\
如实例名为orcl,则WINDOWS下密码文件格式为:PWDorcl.ORA   LINUX下为orapworcl
如下创建密码文件,密码为oracle,实例名为orapwbys3
orapwd  file=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/ orapwbys3  password= oracle entries=3 force=y

4.重命令为用SYS用户可以正常登陆--就不演示了。

你可能感兴趣的:(使用SYS用户远程登陆报权限不足的解决:ORA-01031: insufficient privileges)