溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle登錄驗證方式詳解

發(fā)布時間:2020-07-06 16:59:43 來源:網(wǎng)絡 閱讀:2179 作者:rm_rf_db 欄目:關系型數(shù)據(jù)庫

Oracle有三種登錄驗證方式
1.OS認證
登錄oracle數(shù)據(jù)庫操作系統(tǒng),且必須屬于dba組,如果用戶是sysdba身份登錄則不需要密碼;
`[oracle@oracle11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 1 22:28:46 2018

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user;
USER is "SYS"
SQL> <br/>**2.口令文件認證**<br/>是一種通過網(wǎng)絡的遠程認證方式,只有 sysdba權限的用戶可以使口令文件;<br/>口令文件:<br/>[oracle@oracle11g dbs]$ ll
total 28
-rw-rw---- 1 oracle oinstall 1544 Jan 1 22:28 hc_orcl.dat
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r-- 1 oracle oinstall 1062 Dec 31 23:12 initorcl.ora
-rw-r----- 1 oracle oinstall 24 Sep 17 20:25 lkORCL
-rw-r----- 1 oracle oinstall 1536 Dec 31 13:44 orapworcl——口令文件
-rw-r----- 1 oracle oinstall 1536 Oct 15 12:07 orapworcl.bak
-rw-r----- 1 oracle oinstall 3584 Jan 1 22:28 spfileorcl.ora
[oracle@oracle11g dbs]$ `
登錄以sysdba:sqlplus sys/oracle@orcl as sysdba
3.口令密碼認證
指普通用戶非sysdba用戶登錄數(shù)據(jù)庫,必須在數(shù)據(jù)庫打開的情況下才可以登錄,因為普通用戶的密碼是保存在數(shù)據(jù)字典里。
如果sys用戶密碼忘記了,可以直接登錄操作系統(tǒng),sqlplus / as sysdba進行修改

SQL> alter user sys identified by "niceman";

User altered.

強制重新生成密碼文件
orapwd file=orapw+sid password=oracle force=y
spfile/pfile參數(shù)文件中的remote_login_passwordfile參數(shù)說明
三種設定模式:(可以通過show parameter remote命令查看當前模式)
1) remote_login_passwordfile = EXCLUSIVE,要密碼文件認證,自己獨占使用(默認值)
2) remote_login_passwordfile = SHARE,要密碼文件認證,不同實例dba用戶可以共享密碼文件
3) remote_login_passwordfile = NONE,不使密碼文件認證,需要通過操作系統(tǒng)認證,即數(shù)據(jù)庫的特權用戶只能從操作系統(tǒng)進行登錄
remote_login_passwordfile是靜態(tài)參數(shù),修改后需要重啟才能生效
sqlnet.ora中的相關設置
SQLNET.AUTHENTICATION_SERVICES = none | all | ntf(windows)
none: 表示關閉操作系統(tǒng)認證,只能密碼認證
all : 用于linux或unix平臺,關閉本機密碼文件認證,采用操作系統(tǒng)認證,但遠程<異機>可以使用密碼文件認證
nts : 用于windows平臺

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI