免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: camham
打印 上一主题 下一主题

低级错误,新手注意,ORA-01031: insufficient privileges(closed) [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-06-10 17:42 |只看该作者
看来没人知道问题了

论坛徽章:
0
12 [报告]
发表于 2008-06-10 18:09 |只看该作者
操作系统?版本?
oracle 版本?
直接连接还是通过 中间件,或是代理?
口令文件 重建过没?

论坛徽章:
0
13 [报告]
发表于 2008-06-14 23:15 |只看该作者
Version 10.2.0.1.0 windows32bit
直接连接
问题出在我把administrator从ora_dba组里删除,然后再加进来,结果就不能用了。
现在把oracle重装已经没问题,但这个问题还是不知道原因在哪。
还有一个疑问,在windows是不是只能用操作系统做用户验证?如果不用操作系统验证,sqlplus都没法登录,也就没法启动服务了。

论坛徽章:
0
14 [报告]
发表于 2008-06-15 08:47 |只看该作者
原帖由 camham 于 2008-6-14 23:15 发表
Version 10.2.0.1.0 windows32bit
直接连接
问题出在我把administrator从ora_dba组里删除,然后再加进来,结果就不能用了。
现在把oracle重装已经没问题,但这个问题还是不知道原因在哪。
还有一个疑问,在windows是不是只能用操作系统做用户验证?如果不用操作系统验证,sqlplus都没法登录,也就没法启动服务了。


不是的!通过配置sqlnet.ora,注释掉SQLNET.AUTHENTICATION_SERVICES = (NTS)一行,就可以该用口令文件验证,看我的:

C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 6月 15 08:43:44 2008
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> exit
从Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production中断开

注释了“SQLNET.AUTHENTICATION_SERVICES = (NTS)”一行后

C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 6月 15 08:44:14 2008
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
ERROR:
ORA-01031: insufficient privileges

请输入用户名:
C:\Documents and Settings\Administrator>sqlplus "sys/sys as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 6月 15 08:44:40 2008
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area  143727516 bytes
Fixed Size                   453532 bytes
Variable Size             109051904 bytes
Database Buffers           33554432 bytes
Redo Buffers                 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL>


当然,remote_login_passwordfile的值要是exclusive

[ 本帖最后由 gthboy 于 2008-6-15 09:00 编辑 ]

论坛徽章:
0
15 [报告]
发表于 2008-06-15 10:11 |只看该作者

回复 #14 gthboy 的帖子

我也这样做了,可怎么都登录不进去啊
password文件是不是必须要在指定位置呢?

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      NONE
SQL> alter system set remote_login_passwordfile='exclusive' scope=spfile;

系统已更改。

SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:\>sqlplus SYS/password as SYSDBA

SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 6月 15 10:10:09 2008

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

ERROR:
ORA-01031: insufficient privileges


请输入用户名:
C:\>orapwd file=c:\oracle\firstdb\PWDfirstdb.ora password=sys

C:\>sqlplus SYS/password as SYSDBA

SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 6月 15 10:11:13 2008

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

ERROR:
ORA-01031: insufficient privileges


请输入用户名:
C:\>

论坛徽章:
0
16 [报告]
发表于 2008-06-15 10:51 |只看该作者
是的,口令文件必须放在指定位置,而且文件名也是固定的。

你上面的贴的内容,是sqlnet.ora里面那行注释过了的?

论坛徽章:
0
17 [报告]
发表于 2008-06-15 11:06 |只看该作者

回复 #16 gthboy 的帖子

那问题出在口令文件的目录和名字上了。sid是firstdb,文件应该怎样命名?路径是?

论坛徽章:
0
18 [报告]
发表于 2008-06-15 11:22 |只看该作者
9i是pwdsid.ora,路径在oracle_home\database,10g的不清楚,你查一下了。

要重建口令文件必须把以前的文件删掉或者改名,你不记得文件路径和名称?

论坛徽章:
0
19 [报告]
发表于 2008-06-15 11:30 |只看该作者

回复 #18 gthboy 的帖子

多谢,是这个问题,我的pwd文件一直没放在默认路径下。
10g下也在$oracle_home/database内
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP