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

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-24 09:22:24

来源:赛迪网    作者:Henry

3.继续测试

假如此时我们删除passwdfile,sysdba/sysoper将会无法认证,从而无法登陆数据库。

Server:

SQL> !

[oracle@jumper oracle]$ cd $ORACLE_HOME/dbs

[oracle@jumper dbs]$ ls orapwhsjf

orapwhsjf

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

[oracle@jumper dbs]$

Remote:

E:\Oracle\ora92\bin>sqlplus /nolog

SQL*Plus: Release 9.2.0.4.0 - Production on 星期四 4月 15 09:50:14 2004

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

SQL> connect sys/oracle@hsjf as sysdba

ERROR:

ORA-01031: insufficient privileges

SQL>

这实际上就是无法通过口令文件验证身份

4.假如丢失了passwdfile

假如你使用passwdfile后却意外丢失,那么此时将不能启动数据库。

SQL> startup force;

ORACLE instance started.

Total System Global Area 131142648 bytes

Fixed Size 451576 bytes

Variable Size 104857600 bytes

Database Buffers 25165824 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

我们可以通过orapwd重建口令文件来解决此问题

此处我们恢复口令文件就可以了

SQL> !

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

[oracle@jumper oracle]$ exit

exit

SQL> alter database open;

Database altered.

SQL>

5. remote_login_passwordfile = shared

Oracle9i文档说明:

SHARED

More than one database can use a password file. However, the only user recognized by the password file is SYS.

--多个数据库可以共享一个口令文件,但是只可以识别一个用户:SYS

SQL> select * from v$pwfile_users;

USERNAME SYSDB SYSOP

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

SYS TRUE TRUE

SQL> grant sysdba to eygle;

grant sysdba to eygle

*

ERROR at line 1:

ORA-01994: GRANT failed: cannot add users to public password file

SQL> show parameter password

NAME TYPE VALUE

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

remote_login_passwordfile string SHARED

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