Yesterday I sent a question about the password file name & SYSDBA to Metalink.oracle.com.
The question was that SYS couldn't grant SYSDBA to another user and client couldn't login by SYSDBA. as follows:
[@more@]SQL> grant sysdba to shiyihai;
grant sysdba to shiyihai
第 1 行出现错误:
ORA-01994: GRANT 失败: 口令文件缺失或已禁用"
SQL> conn system/manager@db134
Connected.
SQL> conn sys/sys@db134 as sysdba
ERROR:
ORA-01031: insufficient privileges
Warning: You are no longer connected to ORACLE.
SQL>
With the help of the Oracle Global Customer Services I Resolved this problem.
The name of the password file wasn't right!(here is "orapwdora10g.ora")
under Windows the password file name must be pwdSID.ora.
notes:
UNIX : PASSWORDFILE AUTHENTICATION
==================================
1] To create a passwordfile on Unix:
$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=
2] REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE / SHARED
3] To list users recorded in the passwordfile with SYSDBA and SYSOPER privileges:
SQL> select * from v$pwfile_users;
4] After recreating the passwordfile, the database needs to be restarted. *)
5] Grant SYSDBA or SYSOPER to users to add them to the passwordfile in case
it is exclusive.
References:
-----------
Note 1029539.6 UNIX: How to Set up the Oracle Password File
Note 184696.1 Adding Users to Passwordfile Using Passwordfile Authentication
Note 185703.1 How to Avoid Common Flaws and Errors Using Passwordfile
WINDOWS : PASSWORDFILE AUTHENTICATION
=====================================
1] To create a passwordfile on Windows:
C:> ORAPWD file=
2] To list users recorded in the passwordfile with SYSDBA and SYSOPER privileges:
SQL> select * from v$pwfile_users;
3] remote_login_passwordfile = EXCLUSIVE / SHARED
4] After recreating the passwordfile, the database needs to be restarted. *)
5] Grant SYSDBA or SYSOPER to users to add them to the passwordfile in case
it is exclusive.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/38542/viewspace-917098/ ,如需转载,请注明出处,否则将追究法律责任。