Oracle的sqlnet.ora与password文件试验
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Oracle的sqlnet.ora与password文件试验,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4389字,纯文字阅读大概需要7分钟。
内容图文
![Oracle的sqlnet.ora与password文件试验](/upload/InfoBanner/zyjiaocheng/554/df426278d35446d0b485f63628009fef.jpg)
Oracle的sqlnet.ora与password文件试验
先看有没有sqlnet.ora
[Oracle@localhost ~]$ cd $ORACLE_HOME
[oracle@localhost dbhome_1]$ cd network
[oracle@localhost network]$ cd admin
[oracle@localhost admin]$ ls
listener.ora samples shrept.lst
[oracle@localhost admin]$
VMware+Linux+Oracle 10G RAC全程详细图解
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
Oracle 11gR2 在VMWare虚拟机中安装步骤
手动创建一个sqlnet.ora文件
[oracle@localhost admin]$ touch sqlnet.ora
[oracle@localhost admin]$ vim sqlnet.ora
[oracle@localhost admin]$ cat sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES=(none);
[oracle@localhost admin]$
试验登陆情况:
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:26:25 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
*********************************
查看口令文件情况:
[oracle@localhost dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@localhost dbs]$ ls
hc_orcl.dat init.ora initorcl.ora lkORCL orapworcl spfileorcl.ora
[oracle@localhost dbs]$
现在执行口令文件处理:
用老的口令文件改口令不被允许:
[oracle@localhost dbs]$ orapwd file=orapworcl password=gaojian
OPW-00005: File with same name exists - please delete or renam
只好再作一个新的:
[oracle@localhost dbs]$ orapwd file=orapwgaojian password=gaojian
[oracle@localhost dbs]$ ls
hc_orcl.dat initorcl.ora orapwgaojian spfileorcl.ora
init.ora lkORCL orapworcl
[oracle@localhost dbs]$
用刚刚作好的口令,还是不行(因为它和oracle中的sys口令不一致,是我随便设的,所以不行,其实登陆到哪个实例,就会用哪个口令文件--orapw
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:32:23 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys as sysdba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@localhost admin]$
*******************************
考虑删除orapworcl (这个操作实际上有一定的危险性):
[oracle@localhost dbs]$ rm orapworcl
[oracle@localhost dbs]$
一样也是登陆不进去:
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:34:24 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys as sysdba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@localhost admin]$
*******************************
把sqlnet.ora中的 SQLNET.AUTHENTICATION_SERVICES=(none); 注释掉,再试验:
[oracle@localhost admin]$ cat sqlnet.ora
#SQLNET.AUTHENTICATION_SERVICES=(none);
[oracle@localhost admin]$
[oracle@localhost dbs]$ strings orapwgaojian
]\[Z
ORACLE Remote Password file
INTERNAL
FE406C76B620912C
861BAF16E111B672
[oracle@localhost dbs]$
登陆到数据库中,,来更改口令:
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:44:08 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user sys identified by oracle;
User altered.
SQL>exit
[oracle@localhost dbs]$ strings orapwgaojian
]\[Z
ORACLE Remote Password file
INTERNAL
FE406C76B620912C
861BAF16E111B672
[oracle@localhost dbs]$
口令文件似乎无变化。
还是登陆不进去:
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:45:41 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys as sysdba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
*******************************
看来还得用orapw
[oracle@localhost dbs]$ orapwd file=orapworcl
内容总结
以上是互联网集市为您收集整理的Oracle的sqlnet.ora与password文件试验全部内容,希望文章能够帮你解决Oracle的sqlnet.ora与password文件试验所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。