【密碼檔案丟失--恢複-1】,密碼丟失---1
以oracle10g作為測試版本,刪除10g的密碼檔案:
[oracle@oracle ~]$ rm /u01/oracle/10g/dbs/orapwjadl10g
遠程登入資料庫,密碼檔案在遠程登入時才會起作用:(此時遠程登入不能串連上DB)
[oracle@oracle ~]$ sqlplus sys/123456@192.168.1.187:1521/jadl10g as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 09:11:13 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
執行以下的命令建立10g的密碼檔案:
[oracle@oracle ~]$ 10g
[oracle@oracle ~]$ orapwd file=$ORACLE_HOME/dbs/orapwjadl10g password=123456 force=y;
建立完成後,遠程登入DB,發現是可以串連的:
[oracle@oracle ~]$ sqlplus sys/123456@192.168.1.187:1521/jadl10g as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 09:13:07 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
SQL>
11g 增加了一個 ignorecase是否區分大寫;
orapwd file=$ORACLE_HOME/dbs/orapwjadl10g password=123456 force=y ignorecase=true/false;
12c
orapwd file=$ORACLE_HOME/dbs/orapwjadl10g password=123456 force=y format=12 sysbackup=y syskm=y sysdg=y;
設定3個密碼;注意12c多了幾個特權使用者,可以執行以下SQL比較10g/11g/12c三個版本的差異性:
select * from v$pwfile_users;
12c的pdb是不存在密碼檔案,只有cdb存在密碼檔案。