orapwd 工具建立密碼檔案遵守的命名方法

paulyibinyi發表於2008-07-28

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+例項名

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-411987/,如需轉載,請註明出處,否則將追究法律責任。

相關文章