許多人都知道,在數(shù)據(jù)庫沒有正式啟動前,數(shù)據(jù)庫的內(nèi)建用戶是無法通過數(shù)據(jù)庫來驗證身份的,但口令文件中存放sysdba/sysoper用戶的用戶名及口令卻允許用戶通過口令文件驗來證,它可以在數(shù)據(jù)庫未啟動之前登錄,然后再啟動數(shù)據(jù)庫。
。偃鐩]有口令文件,在數(shù)據(jù)庫未啟動之前就只能通過操作系統(tǒng)認證)
在我們使用Rman時,許多情況下需要在nomount,mount等狀態(tài)下對數(shù)據(jù)庫進行處理,因此這就要求sysdba權(quán)限如果屬于本地DBA組,才可以通過操作系統(tǒng)認證登錄。
。偃缡沁h程sysdba登錄,需要通過passwordfile認證)
1.remote_login_passwordfile = NONE
在此處我們需要停用口令文件驗證,因為Oracle不允許遠程SYSDBA/SYSOPER身份登錄。
local:
[oracle@jumper oracle]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.3.0 - Production on Thu Apr 15 09:58:45 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> alter user sys identified by oracle;
User altered.
SQL> show parameter pass
NAME TYPE VALUE
--------------------- ----------- ------------------------------
remote_login_passwordfile string NONE
remote:
E:\Oracle\ora92\bin>sqlplus /nologSQL*Plus: Release 9.2.0.4.0 -
Production on 星期四 4月 15 09:39:22 2004Copyright (c) 1982, 2002, Oracle
Corporation. All rights reserved.SQL> connect sys/oracle@hsjf as
sysdbaERROR:ORA-01017: invalid username/password; logon denied
大家可以發(fā)現(xiàn),此處是無法通過口令文件驗證的。
2.remote_login_passwordfile = exclusive
SQL> alter system set remote_login_passwordfile=exclusive scope=spfile;
System altered.
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
Database mounted.
Database opened.
SQL> show parameter pass
NAME TYPE VALUE
------------------------------ ----------- --------------
remote_login_passwordfile string EXCLUSIVE
SQL> alter user sys identified by oracle;
User altered.
remote:
E:\Oracle\ora92\bin>sqlplus /nologSQL*Plus: Release 9.2.0.4.0 -
Production on 星期四 4月 15 09:47:11 2004Copyright (c) 1982, 2002, Oracle
Corporation. All rights reserved.SQL> connect sys/oracle@hsjf as
sysdba已連接。SQL> show userUSER 為"SYS"SQL>
此處等同于通過口令文件驗證登錄。
3.繼續(xù)測試
假如此時我們刪除passwdfile,sysdba/sysoper將會無法認證,從而無法登錄數(shù)據(jù)庫。
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
本新聞共
3頁,當(dāng)前在第
1頁
1 2 3