学习oracle技术,每天学一点,每天进步一点

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

上一篇 / 下一篇  2008-07-28 15:09:51 / 个人分类:数据库维护

orapwd 工具建立建立的密码文件 一定要orapw+实例名吗ITPUB个人空间%W h7O)V7Pd
ITPUB个人空间 ?E-_Qt9SN3}n
我在11g和10g 测试是必须要 orapw+实例名 才能登录成功ITPUB个人空间,~f[\E1q

以下是验证过程

ITPUB个人空间2sK%md2\#r
[oracle@asm dbs]$ rm orapwasmITPUB个人空间YO,z/ro
[oracle@asm dbs]$ orapwd file=orapwdasm password=abcdefg entries=10
f \MM(w{ {.x0[oracle@asm dbs]$ sqlplus /nologITPUB个人空间z4|+KR*ku*j*cz p
ITPUB个人空间8L)dt3H X^P
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jul 26 17:24:07 2008
EOCji$Mp o0
!Ju(h'T4x|'eZc)g+I0Copyright (c) 1982, 2005, Oracle.  All rights reserved.
B+Z N7@ cwb'R)[0
,q4B:`Ed:M4EdQ5E0SQL> conn sys/abcdefg@asm as sysdba                                             
5\XwnV&`D*ATF.R0ERROR:ITPUB个人空间X4V x4[*Z2G
ORA-01031: insufficient privileges

ig\ M"u6|0ITPUB个人空间v._cIlXZwf8I5m

KO ^.E9P%A&Y0SQL> exit                                                                       
;M-A?"Y{Te0[oracle@asm dbs]$ lsITPUB个人空间+x!~G5NK&e9o
ab_+ASM.dat  hc_+ASM.dat  initdw.ora  lkASM   orapw+ASM  spfile+ASM.oraITPUB个人空间)L9weC%npN
hc_asm.dat   initasm.ora  init.ora    lk+ASM  orapwdasm  sqlnet.log
$X;n+j!ZI0[oracle@asm dbs]$ rm orapwdasmITPUB个人空间K`jKo8r|
[oracle@asm dbs]$ lsITPUB个人空间how6{$SF9xR
ab_+ASM.dat  hc_+ASM.dat  initdw.ora  lkASM   orapw+ASM       sqlnet.log
EJj0AMuM0hc_asm.dat   initasm.ora  init.ora    lk+ASM  spfile+ASM.oraITPUB个人空间0k;V&K(@2Cv4I tb5s0Z
[oracle@asm dbs]$ orapwd file=orapwasm password=abcdefg entries=10
*g0r Wv^5KHh!Q0[oracle@asm dbs]$ lsITPUB个人空间3d$P(_6I O A;FV,|d:p
ab_+ASM.dat  hc_+ASM.dat  initdw.ora  lkASM   orapwasm   spfile+ASM.ora
c4U*h G#q0hc_asm.dat   initasm.ora  init.ora    lk+ASM  orapw+ASM  sqlnet.log
^R;Eqx2PnKej0[oracle@asm dbs]$ sqlplus /nolog
Y!s |w~x-N0ITPUB个人空间 G;ZM;h;nA |R&|v3Q
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jul 26 17:25:03 2008
J9W$~/g,S%Ypis0ITPUB个人空间h$E }Jd'lup
Copyright (c) 1982, 2005, Oracle.  All rights reserved.ITPUB个人空间j3w+oteoo(~4?

mvE/b*G2Q&QZ[0SQL> conn sys/abcdefg@asm as sysdba                                             ITPUB个人空间2NOFhF(C+nE9vL m
Connected.
-k k!h r7oR.}0SQL>ITPUB个人空间uI!v;R s4Y7U

这是itpub网友lwjnbtx  查的官方文档

1. unix 环境:
.?~F*v@Bf0ITPUB个人空间&P:vb}C{C"q
查了Administrator’s Reference 10g Release 2 (10.2) for UNIX-Based Operating Systems.
6w I+GkR"Z0   ITPUB个人空间c+^[*} [H8G.N3|ux
1. Log in as the Oracle software owner.ITPUB个人空间}I7|,Ym:s!nz
2. Use the orapwd utility to create the password file as follows:
!c-E[/N(jP0$ $ORACLE_HOME/bin/orapwd file=filename password=password entries=max_users
z;nP1eXF0...
I;q m&I*G&?x0ITPUB个人空间)rN4S}6H Z
filename The name of the file in which password information is written
+O\:h {.k\sL0
W)G!O]"N-O)k0The name of the file must be orapwsid, and you must supply the fullITPUB个人空间*ut7xo`!o.A3p(rI
path name.
Its contents are encrypted. Typically, the password file isITPUB个人空间3W7UG4x4o#}
created in the $ORACLE_HOME/dbs directory.
j [g,DPv1VG0
+\ O#|'L0sZ9c+sF0请注意黑体字, 所以unix环境中, password file 一定是要用 orapw<SID>, 没有例外.ITPUB个人空间3?4X,@5zNNX3vR#wU@
ITPUB个人空间n0I?Y/[
2. windows 环境:
3dY B1Vb B0查了Platform. Guide 10g Release 2 (10.2) for Microsoft Windows (32-Bit)(没查64-bit)
)X/M$B-W(QIF0ITPUB个人空间WL` Z YL4J
To create and populate a password file:ITPUB个人空间 S8o ET?%Mq wS7q
1. Create a password file with the Password Utility:ITPUB个人空间:VU-L6s7m'H9mz D
C:> orapwd FILE=PWDsid.ora PASSWORD=password ENTRIES=max_users
C(m*i|0ECiU0whereITPUB个人空间'U%bYTb5mP%[i
¦ FILE specifies the password filename.ITPUB个人空间c{@+_5y s
¦ SID identifies the database instance.
G'WB%j#_&j G%{+E b0¦ PASSWORD sets the password for account SYS.ITPUB个人空间-V,vr'uvQ g dEM
¦ ENTRIES sets maximum number of entries in password file. This corresponds
|z H ^vJqS&K1kga/Q0to maximum number of distinct users allowed to connect to the database
;Ob(far0simultaneously with either the SYSDBA or the SYSOPER DBA privilege.ITPUB个人空间vjxk%C^Y2V

}O%n&P4J&f K3O.e02. Set initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE toITPUB个人空间#kA%S M'M ~ Y_
exclusive, shared, or none.
/?3kN7c3l(qg0
V4b/@w:r @#?KG3M;B0In search of the password file, Oracle Databaselooks in the registryfor the value of parameter
u0G*I r!snW#Y Q0ORA_SID_PWFILE. If no value is specified, then it looks in the registry for the
0iv)n$J`)iy P0value of parameterORA_PWFILE, which points to a file containing usernames,ITPUB个人空间-xW1u+d"n$Y
passwords, and privileges. If that is not set, then it uses the default:
oD?1R)N6b9jj*[P0ORACLE_BASEORACLE_HOMEDATABASEPWDsid.ORA.
d;| um;A(~&?8@0The default value is shared.
aDq.tLQZ2D0ITPUB个人空间J6p/f?7Mu't.v
请注意黑体字, windows 环境中, 很大的部分是基于 registry 中变量 ora_sid_pwfile 或者 ora_pwfile 的设置, 缺省的值, 正如paulyibinyi兄弟指出的, 是 pwd<SID>.ora (unix中是没有这个.ora后缀的).
1\5Qr3[vS0

 

总结下密码文件命名方法ITPUB个人空间 ]f(u{_2Z G5\
linux下orapw+实例名
\5lYjU UQ0windows下pwd+实例名
ITPUB个人空间Q.Vehk!wD


TAG:

paul oracle my love 引用 删除 paulyibinyi   /   2008-07-29 21:20:30
原帖由giantbear于2008-07-29 19:36:00发表
照着eygle的书做试验发现搞不定,自己猜是不是orapw&lt;sid&gt;.ora写法不对,因为看到默认的那个是PWD&l


引用 删除 giantbear   /   2008-07-29 19:36:00
照着eygle的书做试验发现搞不定,自己猜是不是orapw<sid>.ora写法不对,因为看到默认的那个是PWD<SID>.ORA的写法,然后改了一下发现正确,然后想找点资料核实一下自己想法,就搜到lz这里来了,呵呵
看来凡事还是得靠自己多写多试验才有收获
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-12-02  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 26110
  • 日志数: 312
  • 图片数: 2
  • 建立时间: 2007-12-11
  • 更新时间: 2008-11-28

RSS订阅

Open Toolbar