zoukankan      html  css  js  c++  java
  • ORA-12154: TNS:could not resolve the connect identifier specified--sys密码包含@符号

    问题描述:在操作系统登录数据库时,由于忘记了sys密码,重新修改的sys密码包含@符号,登录时报错,

     ORA-12154: TNS:could not resolve the connect identifier specified

    要使用在线恢复恢复DG,所以要连接到主库测试tns的连通情况

    备库上验证:

    [2021/4/23 20:51:13] [oracle@PEKPBSDIHDBP02 dbs]$ sqlplus "sys/elcarO@321qwe"@ORCLDG1 as sysdba

    [2021/4/23 20:51:14]

    [2021/4/23 20:51:14] SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 23 20:44:06 2021

    [2021/4/23 20:51:14]

    [2021/4/23 20:51:14] Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    [2021/4/23 20:51:14]

    [2021/4/23 20:52:34] ERROR:

    [2021/4/23 20:52:34] ORA-12154: TNS:could not resolve the connect identifier specified

    登录密码包含@,在界面登录需要转义

    主库上验证:

    [2021/4/23 20:55:11] [oracle@PEKPBSDIHDBP02 dbs]$ sqlplus sys/"elcarO@321qwe"@orcl_stb as sysdba

    [2021/4/23 20:55:11]

    [2021/4/23 20:55:11] SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 23 20:48:03 2021

    [2021/4/23 20:55:11]

    [2021/4/23 20:55:11] Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    [2021/4/23 20:55:11]

    [2021/4/23 20:55:11]

    [2021/4/23 20:55:11] Connected to:

    [2021/4/23 20:55:11] Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

    [2021/4/23 20:55:11] With the Partitioning, OLAP, Data Mining and Real Application Testing options

    转义写法:sqlplus sys/"密码"@tnsname

  • 相关阅读:
    k8s中service 的iptables
    xbak 备份
    tcp/ip 拥塞控制、重传、丢包、优化
    mysql 主从详细原理 以及prom 监控的对象
    内核参数优化limit.conf与sysctl.conf
    k8s 中(生产|测试)环境隔离问题
    mysql锁以及配置优化
    mysql5.6迁移mysql5.7(生产中、短中断)
    mysql 日志方面与备份、恢复
    Apollo&&Eureka安装配置
  • 原文地址:https://www.cnblogs.com/houzhiheng/p/14703195.html
Copyright © 2011-2022 走看看