Skip to Main Content
  • Questions
  • Unable to connect to Oracle server(vm) from my laptop cmd prompt using sqlplus

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments, but we might still sneak in a few Office Hours sessions! Thanks for being a member of the AskTOM community.

Question and Answer

Connor McDonald

Thanks for the question.

Asked: October 11, 2024 - 11:55 am UTC

Last updated: October 28, 2024 - 5:09 am UTC

Version: Oracle 19c enterprise edition

Viewed 100+ times

You Asked

Oracle 19 server cloud vm and from my laptop I am able to connect to the same database using sql developer tool .
And I have installed oracle 19 client on my laptop and intention is to connect oracle from python script. when I tried
to connect database using sqlplus from command prompt , getting error saying "ORA-12547: TNS:lost contact".
Kindly let me know how to resolve this.

sqlplus userid/pwd@oracleserver:port/servicename

and Connor said...

ORA-12547: TNS:lost contact

normally means we established contact but subsequently network access get blocked. This typically means a firewall issue, or network configuration issue.

Assuming you're using Virtualbox you'll likely need to tinker around with the HostOnly or Bridged network adapter to get this to work.

I've often resolved this by reinstalling Virtualbox or manually setting up the HostOnly network via the Tools option

We're not taking comments currently, so please try again later if you want to add a comment.