oracle 12c 无法使用 os 认证登录数据库 ERROR: ORA-01017: invalid username/password; logon denied

最近在使用官方给出的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, 2014, 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值