You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OCI自治数据库PowerShell下SQL*Plus连接ORA-12154问题求助

OCI自治数据库SQL*Plus连接报错ORA-12154问题求助

我可通过OCI控制台及网页端连接自治数据库,但无法在个人Windows笔记本的PowerShell环境中使用SQLPlus 21c完成连接。已成功下载钱包并配置了tnsnames.ora和sqlnet.ora文件,主机网络连接正常。仅使用钱包中tnsnames.ora内的服务名时,SQLPlus连接失败,报错ORA-12154。请问是否有其他人遇到过此类问题?

执行的命令

PS G:\WINDOWS.X64_212000_db_home\instantclient_21_20> sqlplus admin/"PWD"@//adb.ap-mumbai-1.oraclecloud.com:1522/wrlvwfcfuxzhsfv_testing_medium.adb.oraclecloud.com

SQL*Plus: Release 21.0.0.0.0 - Production on Fri Apr 17 17:24:02 2026

Version 21.20.0.0.0

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

报错信息

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

tnsnames.ora配置

testing_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-mumbai-1.oraclecloud.com))(connect_data=(service_name=wrlvwfcfuxzhsfv_testing_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

testing_medium = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-mumbai-1.oraclecloud.com))(connect_data=(service_name=wrlvwfcfuxzhsfv_testing_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

testing_low = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-mumbai-1.oraclecloud.com))(connect_data=(service_name=wrlvwfcfuxzhsfv_testing_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

testing_tp = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-mumbai-1.oraclecloud.com))(connect_data=(service_name=wrlvwfcfuxzhsfv_testing_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

testing_tpurgent = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.ap-mumbai-1.oraclecloud.com))(connect_data=(service_name=wrlvwfcfuxzhsfv_testing_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))

sqlnet.ora配置

WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="G:\WINDOWS.X64_213000_db_home\network\admin\Wallet")))

SSL_SERVER_DN_MATCH=yes

SQLNET.USE_HTTPS_PROXY=on

内容的提问来源于stack exchange,提问作者Kishore Kosuri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.01 15:43:12