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

来源:互联网 发布:清雅源茗茶淘宝买吗 编辑:程序博客网 时间:2024/05/29 15:09

最近在使用官方给出的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 reserved.ERROR:ORA-01017: invalid username/password; logon deniedEnter user-name: 

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


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


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


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

# .bashrc# Source global definitionsif [ -f /etc/bashrc ]; then        . /etc/bashrcfi# Uncomment the following line if you don't like systemctl's auto-paging feature:# export SYSTEMD_PAGER=# User specific aliases and functionsif test "m$JAVAENV" = "m"thenexport 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/binexport JAVAENV=truefiif test "m$DBENV" = "m"thenexport TMP=/tmpexport TMPDIR=$TMPexport ORACLE_UNQNAME=orcl12cexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1export ORACLE_SID=orcl12cexport PATH=$ORACLE_HOME/bin:/usr/sbin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport DBENV=true#export SQL_OR_SQLPLUS=sql -ociexport SQL_OR_SQLPLUS=sqlplusfiif test "m$DONOTSETTWO_TASK" = "m"thenexport TWO_TASK=ORCLfi
尝试取消 unset TWO_TASK
unset TWO_TASK
[oracle@vbgeneric ~]$ echo $TWO_TASKORCL[oracle@vbgeneric ~]$ echo $ORACLE_SIDorcl12c[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 ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> show con_name
CON_NAME------------------------------CDB$ROOT

0 0
原创粉丝点击