Question

Oracle 11g: instantclient problems. I can not connect to server.

Asked by: epifanio67

Hello Experts,

I need to be able to connect to Oracle 11g server (tower) from my laptop. I am losing my mind. Please help.

Please see server configuration below, am I missing something?

on my laptop (centos 5:3), I have the instant client and sqlplus libraries on /usr/lib/oracle
here is the command I am running from my laptop,
./sqlplus "/ as sysdba"

this is the error I get:
ORA-12545: Connect failed because target host or object does not exist

All variables have been set on my tower and laptop....

Please help...
thx,

# Oracle 11g Server (Tower)
# ORACLE_HOME/network/admin/listener.ora
 
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = DEMO11)
      (ORACLE_HOME = /opt/oracle/product/11.1.0/db_1)
    )
    (SID_DESC =
      (SID_NAME = donna)
      (ORACLE_HOME = /opt/oracle/product/11.1.0/db_1)
    )
  )
 
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    )
  )
 
 
# sqlnet.ora Network Configuration File: ORACLE_HOME/network/admin/sqlnet.ora
 
# The domain from which clients requests names
names.default_domain = 192.168.0.71
 
# Determine number of connections a client may have open
names.max_open_connections = 60
 
# Specify a list of Onames servers in the client region
names.preferred_servers = (address_list =
  (address=(protocol=ipc)(key=n23))
  (address=(protocol=tcp)(host=192.168.0.77)(port=1521))
  (address=(protocol=tcp)(host=192.168.0.77)(port=4040))
)
 
# Order for naming adaptors
names.directory_path = (TNSNAMES,HOSTNAME)
 
# TODO: pending note
sqlnet.authentication_services = (ALL)
names.authority_required = FALSE
 
 
# SQL*NET will bypass the network layer and make direct local
# connections to the database. This is useful on db servers
automatic_ipc = ON
 
# ORACLE_HOME/network/admin/tnsnames.ora
 
DEMO11 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEMO11)
    )
  )
 
DONNA =
(DESCRIPTION =
  (ADDRESS_LIST =
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=localhost.localdomain)
    (PORT=1521)
    )
  )
  (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = donna)
    )
  )
 
 
GENESYS =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS=
        (PROTOCOL=TCP)
        (HOST=192.168.0.77)
        (PORT=4040)
      )
    )
    (CONNECT_DATA =
      (SERVICE_NAME=genesys)
    )
)
 
DONNA_LOCAL =
(DESCRIPTION=
  (ADDRESS=
    (PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)
  )
)
 
GENESYS_REMOTE =
(DESCRIPTION =
  (ADDRESS=
    (PROTOCOL=TCP)(HOST=192.168.0.77)(PORT=4040)
  )
)

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-22 at 14:29:04ID24753164
Topic

Oracle 11.x Database

Participating Experts
2
Points
500
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. sqlplus
    I work with oracle 8 on solaris2.6 I have sqlplus installed under user oracle and only from there it works. when another user tries to run this executable it says: Message file sp1<lang>.msb not found Error 6 initializing SQL*Plus. How can I install sqlplus so all the u...
  2. Connecting as SYSDBA
    Hi, Is there is short-cut to logging into SQLPlus as a SYSDBA from the command line? i.e. Is there an option to do something like this: sqlplus sys/change_on_install@servicename as sysdba I know is possible to issue a connect sys/change_on_install as sysdba once you're in ...
  3. Password of sysdba
    Hello, I have installed Oracle 9i and now I'm installing its patch. I have to connect to sql*plus as sysdba, but I don't know its password. When I installed Oracle, I remember to set up passwords only for system or sys. Can anyone help, me please?
  4. sys/oracle as sysdba
    What is the equivalent with "sys/oracle as sysdba" when you get in SQL*PLUS? I used to use "sys/oracle as sysdba" in "User Name". How do we break it down to User Name, Password, and Host String. jl
  5. connecting / as sysdba (problem).
    Hi experts; connecting / as sysdba (problem). I have sun box . oracle 8i already running and now i installed oracle9i on same system, while connection to oracle9i server as sysdba . $ sqlplus SQL*Plus: Release 9.2.0.1.0 - Production on Wed Apr 9 09:51:52 2008 Copyright ...
  6. how to block  sqlplus '/as sysdba'
    how to block sqlplus '/as sysdba'? I Don't want anybody to access Database using <sqlplus '/as sysdba'>, the user has to give the user name and password to access the database

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mrjoltcolaPosted on 2009-09-22 at 20:39:32ID: 25399851

I don't see the tnsnames.ora file for your laptop.

Your laptop tnsnames.ora file should have similar entries to the tnsnames.ora from the server, except the IP / host addresses will be changed from localhost.localdomain to whatever the remote IP is.



 

by: schwertnerPosted on 2009-09-22 at 23:54:18ID: 25400554

Try to ping the server computer from the laptop (possibility for running firewall, antivirus or wrong hastname/IP).
After successfull ping look in TNSNAMES.ORA for correct domainmae/IP of the server.

 

by: epifanio67Posted on 2009-09-23 at 09:59:22ID: 25405352

Thk u experts,

the tower, where Oracle 11g resides, has its firewall disabled.

I am also able to ping the tower successfully.

Below is the laptop config (sorry I didn't include before)

A side note: I am able to connect via sqldeveloper; but not sqlplus... this makes my head spin...
I need sqlplus...

Thx experts.... I really need to make this work...

regards,

 

# laptop config
# etc/oracle/tnsnames.ora
DONNA =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = 192.168.0.71)
      (PORT = $1521)
    )
    (CONNECT_DATA =
       (SID = donna)
       (INSTANCE_NAME = donna)
    )
  )
 
# /etc/profile.d/oracle.sh 
 
export TNS_ADMIN=/etc/oracle
export SQLPATH=/usr/lib/oracle
export LD_LIBRARY_PATH=/usr/lib/oracle:$LD_LIBRARY_PATH
export PATH=$PATH:$SQLPATH
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

Select allOpen in new window

 

by: mrjoltcolaPosted on 2009-09-23 at 10:38:20ID: 25405754

>>(PORT = $1521)

Not sure where that $ came from but that does not belong. Remove it, it is likely the problem.



(PORT = 1521)

 

by: epifanio67Posted on 2009-09-23 at 11:10:34ID: 25406102

thk u mrjoltcola...

I can't believe I didn't notice that... I have been looking at these files for hours... my eyes are crossing...

I corrected it. But, still can't connect.

below is the error

ERROR:
ORA-12162: TNS:net service name is incorrectly specified
                                              
1:
2:

Select allOpen in new window

 

by: mrjoltcolaPosted on 2009-09-23 at 11:17:15ID: 25406173

I cannot remember, does instant client from with NETCA? Try typing netca at the command prompt.

If so, simply move tnsnames.ora to tnsnames.ora.bad and use NETCA to add the new one.

If not, consider switching from instant client to the standard client that _does_ include NETCA

Or try this below.

DONNA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.71)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = DONNA)
    )
  )
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:

Select allOpen in new window

 

by: epifanio67Posted on 2009-09-23 at 11:28:17ID: 25406276

thk u mrjoltcola.... really thk u so much...

well, I tried your second option on the tnsnames.ora... and I get the error below...

The first option, I type netca on the directory where instantclient and sqlplus resides and get "command no found"
I am not sure if I understand your first suggestion, could you explain it?

thx
regards,

ERROR:
ORA-12545: Connect failed because target host or object does not exist
                                              
1:
2:

Select allOpen in new window

 

by: mrjoltcolaPosted on 2009-09-23 at 11:35:51ID: 25406367

NETCA is the Oracle Network Configuration Assistant.

If you install the regular client option (not the instant client) you will have that utility to help you.


Anyway, to the problem at hand.

You have 3 instances, DEMO1, DONNA and GENESYS.

Can you tell me which hosts those reside on?

 

by: epifanio67Posted on 2009-09-23 at 11:37:14ID: 25406382

Oh, thk u mrjoltcola....

I see what you mean.... but, where do I get the standard client? all I see is the possibilities to download oracle 11g app, instant client, sql developer, sql developer data modeler...

may be I don't understand...

thx in advance..  

 

by: epifanio67Posted on 2009-09-23 at 12:17:20ID: 25406801

thk u mrjoltcola...

sure.. all three instances reside on the tower/oracle 11 server....
the one that I need to access from my laptop is DONNA.

All instances have been started.

thx

 

by: epifanio67Posted on 2009-09-23 at 12:17:54ID: 25406806

host = 192.168.0.71

 

by: epifanio67Posted on 2009-09-24 at 12:04:39ID: 25416617

Hello Experts,

please help... any thoughts? suggestions?

thx

 

by: mrjoltcolaPosted on 2009-09-24 at 12:09:45ID: 25416668

Can you show your Oracle related environment variables?
Is tnsnames.ora in $ORACLE_HOME/network/admin ?

 

by: epifanio67Posted on 2009-09-24 at 12:27:35ID: 25416839

Thx Mrjoltcola...

Sure... see variables below....

Yes, tnsnames.ora, sqlnet.ora, and listener.ora are under ORACLE_HOME/network/admin directory

[oracle@localhost bin]$ env
SSH_AGENT_PID=3759
HOSTNAME=localhost.localdomain
DESKTOP_STARTUP_ID=
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
WINDOWID=52428881
OLDPWD=/opt/oracle/product/11.1.0/db_1
USER=oracle
LD_LIBRARY_PATH=:/opt/oracle/product/11.1.0/db_1/lib
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
ORACLE_SID=donna
GNOME_KEYRING_SOCKET=/tmp/keyring-OG6DQV/socket
ORACLE_HOME_LISTNER=ORACLE_HOME
ORACLE_BASE=/opt/oracle/product
SSH_AUTH_SOCK=/tmp/ssh-oBpkUx3720/agent.3720
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/3720
USERNAME=oracle
MAIL=/var/spool/mail/oracle
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin
DESKTOP_SESSION=default
GDM_XSERVER_LOCATION=local
INPUTRC=/etc/inputrc
PWD=/opt/oracle/product/11.1.0/db_1/bin
XMODIFIERS=@im=none
LANG=en_US.UTF-8
GDMSESSION=default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=2
HOME=/home/oracle
GNOME_DESKTOP_SESSION_ID=Default
LOGNAME=oracle
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-DTGKPU5iyx,guid=ebca3f0ffa5a3dd6557321004abb8713
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:0.0
ORACLE_HOME=/opt/oracle/product/11.1.0/db_1
G_BROKEN_FILENAMES=1
COLORTERM=gnome-terminal
XAUTHORITY=/tmp/.gdm8W0V0U
_=/usr/bin/env

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:

Select allOpen in new window

 

by: schwertnerPosted on 2009-09-24 at 23:55:40ID: 25420523

What about firewall on your laptop?

Also see in the C:\windows\system32\drivers\etc\hosts file

You needed the line
27.0.0.1 localhost
in the hosts file

 

by: epifanio67Posted on 2009-09-25 at 07:53:34ID: 25423597

thx experts,

the laptop OS is centos 5:3 also...
no firewall..

I keep looping/reviewing all the files and see everything ok... I am not sure why the client is not working...

I am losing my mind....

pls help...

thx,

 

by: mrjoltcolaPosted on 2009-09-25 at 08:05:36ID: 25423738

Can you be clear if your TNSNAMES.ORA is using INSTANCE_NAME or SERVICE_NAME?
Please try SERVICE_NAME

For example, my systems are setup to use SERVICE_NAME:

DEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = win7)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = DEV)
    )
  )


But if I use INSTANCE_NAME it will fail with ORA-12514 (though that is not the same as your original ORA-12545):

DEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = win7)(PORT = 1521))
    (CONNECT_DATA =
      (INSTANCE_NAME = DEV)
    )
  )


This is why I encouraged you to uninstall your instant client, reinstall with the full client download and run NETCA to create a new TNSNAMES.ORA

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...