oracle用户中含$符号无法连接的问题 解决一次oracle用户无法连接pdb的问题解决

用户名和密码都没问题,其它的也没问题,不知道为啥连不上,最后总算找到原因了,是因为shell将用户名里面的$service解析成变量了

$ sqlplus "c##cloud$service/WelCome-123#@atpd-exa-8qhsc1:1521/SRCPDB1_high.atp.oraclecloud.com"

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 16 09:46:56 2020
Version 19.8.0.0.0

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

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


Enter user-name:

但是我在sqlplus里用connect却可以连上,百思不得其解,最后终于发现是shell将用户名的一部分解析成变量了

$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 16 09:49:26 2020
Version 19.8.0.0.0

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


Connected to:
Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.8.0.0.0

SQL> connect c##cloud$service/WelCome-123#@atpd-exa-8qhsc1:1521/SRCPDB1_high.atp.oraclecloud.com
Connected.

解决方法。
1.不要使用双引号,使用单引号

sqlplus “c##cloud$service/WelCome-123#@atpd-exa-8qhsc1:1521/SRCPDB1_high.atp.oraclecloud.com”

sqlplus ’c##cloud$service/WelCome-123#@atpd-exa-8qhsc1:1521/SRCPDB1_high.atp.oraclecloud.com‘

2.在$ 前加\

sqlplus "c##cloud\$service/WelCome-123#@atpd-exa-8qhsc1:1521/SRCPDB1_high.atp.oraclecloud.com"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值