您好,登錄后才能下訂單哦!
這篇文章主要介紹了orapwd如何建立密碼及驗(yàn)證,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
orapwd file=$ORACLE_HOME/dbs/orapwSID password=xx
file名的格式必須是orapw+ORACLE_SID,否則不會(huì)正常
[oracle@GI_Softwareonly_64 dbs]$ orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line,
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
ignorecase - passwords are case-insensitive (optional),
nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
There must be no spaces around the equal-to (=) character.
CREATE DATABASE TDB
USER SYS IDENTIFIED BY sys_password
....
雖然會(huì)有sys用戶,且用戶狀態(tài)OPNE,但是
$ORACLE_HOME/dbs下面不會(huì)有密碼文件
SQL> select * from v$pwfile_users沒有結(jié)果
sqlplus sys/XX@PROD1 as sysdba報(bào)錯(cuò)權(quán)限不夠
sqlplus sys/XX@PROD1無法登陸,提示需要sysdba或sysopen
SQL> grant sysdba to sys報(bào)錯(cuò)ORA-01994: GRANT failed: password file missing or disabled
一旦$ORACLE_HOME/dbs下面有密碼文件,則alter user sys identified時(shí),ls -tl時(shí),密碼文件的時(shí)間會(huì)變成alter user sys identified的執(zhí)行時(shí)間
試驗(yàn)證明1:先使用orapwd建立了密碼A,再使用create database user sys建立了密碼B,真正的密碼是A,使用密碼B登錄時(shí)sqlplus sys/B@prod_s as sysdba是會(huì)報(bào)錯(cuò)ORA-01017: invalid username/password; logon denied,使用密碼A登錄時(shí)sqlplus sys/A@prod_s as sysdba正常
試驗(yàn)證明2:CREATE DATABASE TDB USER SYSTEM發(fā)現(xiàn),system用戶自動(dòng)有DBA權(quán)限了
比如ORACLE_SID=PROD1,對(duì)應(yīng)的tns也是PROD1
1、
sqlplus sys/XX@PROD1 as sysdba
報(bào)錯(cuò)ORA-01017: invalid username/password; logon denied,說明正常配置,只是sys后面的密碼XX錯(cuò)誤了
報(bào)錯(cuò)ORA-01031: insufficient privileges,說明沒有配置成功
2、
SQL> select * from v$pwfile_users;
有結(jié)果,說明正常配置
沒有結(jié)果,說明沒有配置成功
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“orapwd如何建立密碼及驗(yàn)證”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。