加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle 12c 无法使用 os 认证登录数据库 ERROR: ORA-01017: inva

发布时间:2020-12-12 15:37:05 所属栏目:百科 来源:网络整理
导读:最近在使用官方给出的priv-build vm 的 oracle 12c 数据库,使用操作系统认证登录遇到错误: [oracle@vbgeneric dbs]$ sqlplus / as sysdbaSQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 5 23:48:33 2016Copyright (c) 1982,2014,Oracle. All rights

最近在使用官方给出的priv-build vm 的 oracle 12c 数据库,使用操作系统认证登录遇到错误:

[oracle@vbgeneric dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 5 23:48:33 2016

Copyright (c) 1982,2014,Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: 

检查数据库 参数 remote_login_passwordfile 都是正确的设置


检查密码文件也是正确,查看sys 密码 与 密码文件的字符是否一致


密码加密也是一致,查看数据库参数 thread 线程是否为true


查看当前环境变量,发现有个疑问 变量 TWO_TASK

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

if test "m$JAVAENV" = "m"
then
export TMZ="GMT"
export JAVA_HOME=`ls -d /home/oracle/java/jdk*`
export PATH=$JAVA_HOME/bin:/home/oracle/sqlcl/bin:/home/oracle/sqldeveloper:/opt/datamodeler:$PATH:/home/oracle/sqlcl/bin:/home/oracle/sqldeveloper:/home/oracle/bin
export JAVAENV=true
fi
if test "m$DBENV" = "m"
then
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_UNQNAME=orcl12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=orcl12c
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DBENV=true
#export SQL_OR_SQLPLUS=sql -oci
export SQL_OR_SQLPLUS=sqlplus
fi
if test "m$DONOTSETTWO_TASK" = "m"
then
export TWO_TASK=ORCL
fi
尝试取消 unset TWO_TASK
unset TWO_TASK
 
 
  
  [oracle@vbgeneric ~]$ echo $TWO_TASK
ORCL
[oracle@vbgeneric ~]$ echo $ORACLE_SID
orcl12c
[oracle@vbgeneric ~]$ unset TWO_TASK
[oracle@vbgeneric ~]$ echo $TWO_TASK
 
 
 
 

 
 
 
 
  
  [oracle@vbgeneric ~]$ sqlplus / as sysdba
 
 
 
 

 
 
 
 
  
  SQL*Plus: Release 12.1.0.2.0 Production on Mon Dec 5 23:47:26 2016
 
 
 
 

 
 
 
 
  
  Copyright (c) 1982,Oracle. All rights reserved.
 
 
 
 

 
 
 
 
  
  
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning,OLAP,Advanced Analytics and Real Application Testing options
 
 
 
 

 
 
 
 
  
  SQL> show con_name
 
 
 
 

 
 
 
 
  
  CON_NAME
------------------------------
CDB$ROOT
 
 

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读