>  기사  >  데이터 베이스  >  【密码文件丢失--恢复-1】

【密码文件丢失--恢复-1】

WBOY
WBOY원래의
2016-06-07 16:12:561149검색

以oracle10g作为测试版本,删除10g的密码文件: 【本文来自鸿网互联 (http://www.68idc.cn)】 [oracle@oracle ~]$ rm /u01/oracle/10g/dbs/orapwjadl10g 远程登录数据库,密码文件在远程登录时才会起作用:(此时远程登录不能连接上DB) [oracle@oracle ~]$ sq

以oracle10g作为测试版本,删除10g的密码文件:

【本文来自鸿网互联 (http://www.68idc.cn)】

[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存在密码文件。

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.