Chinaunix首页 | 论坛 | 博客
  • 博客访问: 100889860
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-24 09:22:47

     来源:赛迪网    作者:Henry

大家可以发现,此时的口令文件中是不能添加用户的。

很多人可能会问:口令文件的缺省名称是orapw,如何才能共享?

其实Oracle数据库在启动时,首先查找的是orapw的口令文件,假如该文件不存在,则开始查找,orapw的口令文件。如果口令文件命名为orapw,多个数据库就可以共享。

再来看一下测试:

[oracle@jumper dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.3.0 - Production on Tue Jul 6 09:40:34 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.3.0 - Production

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> !

[oracle@jumper dbs]$ ls

hsjf initdw.ora inithsjf.ora init.ora lkHSJF orapwhsjf spfilehsjf.ora

[oracle@jumper dbs]$ mv orapwhsjf orapwhsjf.bak

[oracle@jumper dbs]$ exit

exit

SQL> startup

ORACLE instance started.

Total System Global Area 235999908 bytes

Fixed Size 451236 bytes

Variable Size 201326592 bytes

Database Buffers 33554432 bytes

Redo Buffers 667648 bytes

ORA-01990: error opening password file '/opt/oracle/product/9.2.0/dbs/orapw'

--它是最后查找的文件

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

建立orapw口令文件,此时可以打开数据库。

SQL> !

[oracle@jumper dbs]$ ls

hsjf initdw.ora inithsjf.ora init.ora lkHSJF orapwhsjf.bak spfilehsjf.ora

[oracle@jumper dbs]$ cp orapwhsjf.bak orapw

[oracle@jumper dbs]$ exit

exit

SQL> alter database open;

Database altered.

SQL> show parameter passw

NAME TYPE VALUE

------------------------------------ ----------- ---------------

remote_login_passwordfile string SHARED

SQL>

很多人可能会产生有这样的疑问,多个Exclusive的数据库是否可以共享一个口令文件(orapw)呢?

继续回到试验中:

SQL> show parameter passwordNAME TYPE VALUE

------------------------------------ ----------- ---------------

remote_login_passwordfile string SHARED

[oracle@jumper dbs]$ strings orapw

]\[Z

ORACLE Remote Password file

INTERNAL

AB27B53EDC5FEF41

8A8F025737A9097A

阅读(272) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~