orapwd 工具建立建立的密碼文件 一定要orapw+實例名嗎
我在11g和10g 測試是必須要 orapw+實例名 才能登錄成功
以下是驗證過程
[oracle@asm dbs]$ rm orapwasm
[oracle@asm dbs]$ orapwd file=orapwdasm password=abcdefg entries=10
[oracle@asm dbs]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jul 26 17:24:07 2008
Copyright (c) 1982, 2005, Oracle.??All rights reserved.
SQL> conn sys/abcdefg@asm as sysdba
ERROR:
ORA-01031: insufficient privileges
SQL> exit
[oracle@asm dbs]$ ls
ab_+ASM.dat??hc_+ASM.dat??initdw.ora??lkASM? ?orapw+ASM??spfile+ASM.ora
hc_asm.dat? ?initasm.ora??init.ora? ? lk+ASM??orapwdasm??sqlnet.log
[oracle@asm dbs]$ rm orapwdasm
[oracle@asm dbs]$ ls
ab_+ASM.dat??hc_+ASM.dat??initdw.ora??lkASM? ?orapw+ASM? ?? ? sqlnet.log
hc_asm.dat? ?initasm.ora??init.ora? ? lk+ASM??spfile+ASM.ora
[oracle@asm dbs]$ orapwd file=orapwasm password=abcdefg entries=10
[oracle@asm dbs]$ ls
ab_+ASM.dat??hc_+ASM.dat??initdw.ora??lkASM? ?orapwasm? ?spfile+ASM.ora
hc_asm.dat? ?initasm.ora??init.ora? ? lk+ASM??orapw+ASM??sqlnet.log
[oracle@asm dbs]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jul 26 17:25:03 2008
Copyright (c) 1982, 2005, Oracle.??All rights reserved.
SQL> conn sys/abcdefg@asm as sysdba
Connected.
SQL>
這是itpub網友lwjnbtx? 查的官方文檔
1. unix 環境:
查了
1. Log in as the Oracle software owner.
2. Use the orapwd utility to create the password file as follows:
$ $ORACLE_HOME/bin/orapwd file=filename password=password entries=max_users
...
filename The name of the file in which password information is written
The name of the file must be orapwsid, and you must supply the full
path name.Its contents are encrypted. Typically, the password file is
created in the $ORACLE_HOME/dbs directory.
請注意黑體字, 所以unix環境中, password file 一定是要用 orapw, 沒有例外.
2. windows 環境:
查了 (沒查64-bit)
To create and populate a password file:
1. Create a password file with the Password Utility:
C:> orapwd FILE=PWDsid.ora PASSWORD=password ENTRIES=max_users
where
| FILE specifies the password filename.
| SID identifies the database instance.
| PASSWORD sets the password for account SYS.
| ENTRIES sets maximum number of entries in password file. This corresponds
to maximum number of distinct users allowed to connect to the database
simultaneously with either the SYSDBA or the SYSOPER DBA privilege.
2. Set initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE to
exclusive, shared, or none.
In search of the password file, Oracle Database looks in the registry for the value of parameter
ORA_SID_PWFILE. If no value is specified, then it looks in the registry for the
value of parameter ORA_PWFILE, which points to a file containing usernames,
passwords, and privileges. If that is not set, then it uses the default:
ORACLE_BASEORACLE_HOMEDATABASEPWDsid.ORA.
The default value is shared.
請注意黑體字, windows 環境中, 很大的部分是基于 registry 中變量 ora_sid_pwfile 或者 ora_pwfile 的設置, 缺省的值, 正如paulyibinyi兄弟指出的, 是 pwd.ora (unix中是沒有這個.ora后綴的).
總結下密碼文件命名方法
linux下orapw+實例名
windows下pwd+實例名