Oracle orapwd 工具建立密码文件遵守的命名方法

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:1090

Oracle orapwd 工具建立密码文件遵守的命名方法

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网友http://www.itpub.net/viewpro.php?uid=13103372]lwjnbtx 查的官方文档
1. unix 环境:

查了http://download.oracle.com/docs/cd/B19306_01/server.102/b15658.pdf]Administrator’s Reference 10g Release 2 (10.2) for UNIX-Based Operating Systems.

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 环境:
查了http://download.oracle.com/docs/cd/B19306_01/win.102/b14304.pdf]Platform. Guide 10g Release 2 (10.2) for Microsoft Windows (32-Bit) (没查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+实例名

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】