先看有没有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]$
手动创建一个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<SID>):
[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<SID>的文件来对应。
[oracle@localhost dbs]$ orapwd file=orapworcl
Enter password for SYS:
[oracle@localhost dbs]$
输入的口令是刚才在数据库中设置的口令。
然后,再登陆看看:
此时,可以登陆成功了:
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:47:58 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:
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>
Oracle的sqlnet.ora与password文件试验的更多相关文章
-
Oracle 使用sqlnet.ora/trigger限制/允许某IP或IP段访问指定用户
Oracle 使用sqlnet.ora/trigger限制/允许某IP或IP段访问指定用户 学习了:http://blog.itpub.net/28602568/viewspace-2092858/ ...
-
[转帖]Oracle 使用sqlnet.ora/trigger限制/允许某IP或IP段访问指定用户
Oracle 使用sqlnet.ora/trigger限制/允许某IP或IP段访问指定用户 原创 Oracle 作者:maohaiqing0304 时间:2016-05-03 17:05:46 17 ...
-
Oracle的sqlnet.ora文件配置
DBA对这个文件一定不会陌生,大家了解最多的也一定是sqlnet.ora用来决定oracle怎么解析一个连接中出现的字符串,例如: sqlplus sys/oracle@orcl 那么这个orcl怎么 ...
-
oracle的sqlnet.ora , tnsnames.ora , Listener.ora 文件的作用(转)
oracle网络配置三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下.1. sqlnet.o ...
-
oracle的sqlnet.ora,tnsnames.ora,listener.ora三个配置文件
总结: 1 .三个配置文件都是放在$ORACLE_HOME\network\admin目录下. 2 .sqlnet.ora确定解析方式 3 .listener.ora上设SID_NAME,通常用于JD ...
-
Oracle 通过sqlnet.ora文件控制对Oracle数据库的访问
一.通过sqlnet.ora文件控制对Oracle数据库的访问 出于数据安全考虑,对Oracle数据库的IP做一些限制,只有固定的IP才能访问.修改$JAVA_HOME/NETWORK/ADMIN/s ...
-
Oracle非重要文件恢复,redo、暂时文件、索引文件、password文件
增量备份的应用在recovery阶段.不再restore阶段 了解数据库设置表: SQL>desc database_properties Name ...
-
Oracle的tnsnames.ora配置(PLSQL Developer)
首先打开tnsnames.ora的存放目录,一般为D:\app\Administrator\product\11.2.0\client_1\network\admin,就看安装具体位置了. 步骤阅读 ...
-
转载《Oracle的tnsnames.ora配置(PLSQL Developer)》
源地址:https://www.cnblogs.com/qq3245792286/p/6212617.html. 首先打开tnsnames.ora的存放目录,一般为D:\app\Administrat ...
随机推荐
-
ie6,ie7,ie8 css bug兼容解决方法
IE浏览器以不支持大量的css 属性出名,同时也因其支持的css属性中存在大量bug. 这里收集了好多的bug以及其解决的办法,都在这个文章里面记录下来了!希望以后解决类似问题的时候能够快速解决,也希 ...
-
[LeetCode] Wiggle Sort
Problem Description: Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[ ...
-
EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secu ...
-
Java EE开发平台随手记2——Mybatis扩展1
今天来记录一下对Mybatis的扩展,版本是3.3.0,是和Spring集成使用,mybatis-spring集成包的版本是1.2.3,如果使用maven,如下配置: <properties&g ...
-
管理员必备的Linux系统监控工具
管理员必备的Linux系统监控工具 #1: top - 进程活动 top提供一个当前运行系统实时动态的视图, 也就是正在运行进程.在默认情况下,显示系统 中CPU使用率最高的任务,并每5秒钟刷新一次. ...
-
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
归档日志被物理删除后执行rman操作报错: RMAN> backup database plus archivelog; Starting backup at -JUL- :: current ...
-
2015-11-04 asp.net 弹出式日历控件 选择日期 Calendar控件
html代码: <%@ Page Language="C#" CodeFile="calendar.aspx.cs" Inherits="cal ...
-
梯度下降之随机梯度下降 -minibatch 与并行化方法
问题的引入: 考虑一个典型的有监督机器学习问题,给定m个训练样本S={x(i),y(i)},通过经验风险最小化来得到一组权值w,则现在对于整个训练集待优化目标函数为: 其中为单个训练样本(x(i),y ...
-
(贪心 优先队列)P1090合并果子 洛谷
题目描述 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆. 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和.可 ...
-
Android动画-View动画
View动画 Android动画分为三类:View动画,帧动画,和属性动画.帧动画也是View动画的一种. View动画的作用对象是View,之所以强调这一点是因为其作用对象有别于Android的另一 ...