分享

UNIX+ORACLE - 博客园

 ylzrx 2011-04-22

今天用em的方式远程登入Linux AS3 上的Oracle 10G,始终无法用sys以sysdba,system以sysoper的身份登入,只能以normal的身份登入。

直接telnet到主机上检查,发现也无法以sysdba的身份登入。

[oracle@guohuias3 dbs]$ sqlplus sys/kelantas@orcl as sysdba

SQL
*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:40:24 2011

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

ERROR
:
ORA
-01031: insufficient privileges


Enter user
-name:

以internal的方式登入

[oracle@guohuias3 oracle]$ sqlplus /nolog

SQL
*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:13:41 2011

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

SQL
> connect /as sysdba
Connected
.
SQL
> show parameter password;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile
string EXCLUSIVE
SQL
> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line
1:
ORA
-01994: GRANT failed: password file missing or disabled


SQL
> select * from v$pwfile_users;

no rows selected

发现没有password文件;

检查password文件是否正确

[oracle@guohuias3 dbs]$ cd $ORACLE_HOME/dbs
[oracle@guohuias3 dbs]$ ls
-l orapw*
-rw-r----- 1 oracle oinstall 5120 Jul 9 2010 orapwAUXY.pwd
-rw-r----- 1 oracle oinstall 2560 Feb 18 20:26 orapworcl

检查当前 $ORACLE_SID=ORCL

发现password文件的orcl是小写的,把它改正过来

[oracle@guohuias3 dbs]$ mv orapworcl orapwORCL
并再次查询相关视图:
SQL
> select * from v$pwfile_users;

USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS
TRUE TRUE

可以看到有对应的password文件了。

现在再次登入

[oracle@guohuias3 dbs]$ sqlplus sys/kelantas@orcl as sysdba

SQL
*Plus: Release 10.2.0.1.0 - Production on Fri Feb 18 20:51:05 2011

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


Connected to
:
Oracle Database 10g Enterprise Edition Release
10.2.0.1.0 - Production
With the Partitioning
, OLAP and Data Mining options

SQL
>

问题解决了。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多