Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLcl not using TNS

DaljitApr 20 2018 — edited Apr 20 2018

I downloaded the latest SQLcl and tried to use it but its not using TNS as it supposed to. Here is the error am getting:

C:\>java -version

java version "1.8.0_171"

Java(TM) SE Runtime Environment (build 1.8.0_171-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

C:\>sql /nolog

SQLcl: Release 18.1.1 Production on Fri Apr 20 10:08:43 2018

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

SQL>

SQL> conn scott/tiger@testdb

  USER          = scott

  URL           = jdbc:oracle:oci8:@testdb

  Error Message = Incompatible version of libocijdbc[Jdbc:122010, Jdbc-OCI:121020

  USER          = scott

  URL           = jdbc:oracle:thin:@testdb

  Error Message = IO Error: Unknown host specified

  USER          = scott

  URL           = jdbc:oracle:thin:@testdb:1521/testdb

  Error Message = IO Error: Unknown host specified

I am not sure why its using my tnsname as hostname in connection string. It should get the detailed connection string from tnsnames.ora file but its just using that alias as hostname and not going anywhere.

Please help me adopt this new [not really] cool tool.

Thanks

Comments

LeightonLNelson
Hi,
First I recommend to remove your hostname information from the output of your post.
From the output it seems to indicate that your OMS is down. Could you please verify that the OMS in question is up using emctl status oms.
What command did you use to remove the plug-in? Does emcli list_plugins_on_server show the deployed plug-in?

Thanks,
Leighton
EdSpn
Hi Leighton,

Thanks for the feedback. I just checked status oms and it seems fine:
[oracle@dwbi-durl-oel agent_inst]$ $OMS_HOME/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
Yes, my plugin is still listed. I always use the following commands to undeploy:
emcli delete_target -name="$TARGET_NAME"    -type="$TARGET_TYPE_NAME"
emcli undeploy_plugin_from_agent  -plugin="$PLUGINID" -agent_names="$AGENT_NAME"
emcli undeploy_plugin_from_server -plugin="$PLUGINID" -sys_password="$SYSPWD"
I think the issue may be caused by another plugin. Will dig further.

Thanks,
Ed

PS That hostname slipped through into the post. Just removed it :)
EdSpn
To complete the thread:

I have found the offending plugin, and undeployed it (using the OEM UI in browser).
After this, the issue was resolved, and I could successfully undeploy my own plugin.

Regards,
Ed
Which plugin did you undeployed ?
EdSpn
It was not an Oracle provided plugin, but one of our own.
1 - 5

Post Details

Added on Apr 20 2018
4 comments
3,117 views