Home » RDBMS Server » Server Administration » oracle 10g server as client???
oracle 10g server as client??? [message #222056] Thu, 01 March 2007 09:47 Go to next message
kregan77
Messages: 21
Registered: January 2007
Junior Member
Hi, I installed a 10g database on a linux server. Is it possible to use this setup as a client to connect to a remote oracle database?

I tried just adding a new entry in tnsnames.ora - changing my ORACLE_SID envvar accordingly and shutting down the local instance. When I try to connect to the remote database I get:

ORA-Error 1034 ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory


I imagine that if this is possible I'm missing some steps... I've googled and looked through oracle documentation without any luck... do I need to explicitly install a client?

Thanks.

[Updated on: Thu, 01 March 2007 09:48]

Report message to a moderator

Re: oracle 10g server as client??? [message #222059 is a reply to message #222056] Thu, 01 March 2007 09:56 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Are you sure the remote database is up and running?
Re: oracle 10g server as client??? [message #222062 is a reply to message #222056] Thu, 01 March 2007 10:17 Go to previous messageGo to next message
kregan77
Messages: 21
Registered: January 2007
Junior Member
yes positive it is
Re: oracle 10g server as client??? [message #222085 is a reply to message #222062] Thu, 01 March 2007 13:05 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Why don't you provide constructive information instead of the usual "I tried something and it didn't work." How about you show us by capturing your session. Show us the command you typed, not just the result. And how about the TNS entry you put in?
Re: oracle 10g server as client??? [message #222248 is a reply to message #222056] Fri, 02 March 2007 08:48 Go to previous messageGo to next message
kregan77
Messages: 21
Registered: January 2007
Junior Member
Since my original post I installed the oracle client and am now getting a different error.. anyways here is some info:


USER=oracle
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/client_1
TNS_ADMIN=/u01/app/oracle/product/10.2.0/client_1/network/admin
ORACLE_SID=MYSID

I still have a db_1 directory for the local instance.


[oracle@xxx ~]$ cat /u01/app/oracle/product/10.2.0/client_1/network/admin/tnsnames.ora
MYSID =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 123.45.67.89)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = MYSID)
)
)
(ADDRESS=(PROTOCOL=TCP)(HOST=123.45.67.89)(PORT=1521))
[oracle@xxx ~]$

I had the exact same thing in the tnsnames.ora on the server (db_1) and got the error in my original post... with the client installed and ORACLE_HOME updated to point to the client I get this error:

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 2 09:44:47 2007

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

Enter user-name: validuseratremotedatabase
Enter password:
ERROR:
ORA-12545: Connect failed because target host or object does not exist


Enter user-name:



I definitely have the IP address correct... I also tried tnsping to the remote database and it came back ok.

Any ideas guys? Thanks for the help.
Re: oracle 10g server as client??? [message #222276 is a reply to message #222056] Fri, 02 March 2007 11:08 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I could be mistaken but to my eyes & brain the tnsnames.ora fie looks malformed.
I use the following format for my tnsnames.ora files:
prod_sec=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbx1.example.com)(PORT=1521))(CONNECT_DATA=(SID=dbx1)))
I suggest you try replacing your values into the above template & try again & post your updated file once completed
Re: oracle 10g server as client??? [message #222279 is a reply to message #222056] Fri, 02 March 2007 11:26 Go to previous messageGo to next message
kregan77
Messages: 21
Registered: January 2007
Junior Member
Hi, thanks for your response... I changed my tnsnames.ora to the format mentioned (i believe i had it that way before i was playing around with it...). Does anything have to be done after modifying tnsnames.ora to make the changes take effect or should starting sqllplus again automatically incorporate the changes??


[oracle@xxx admin]$ cat tnsnames.ora
MYSID =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 123.45.67.89)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = MYSID)
)
)
[oracle@xxx admin]$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 2 12:23:13 2007

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

Enter user-name: xxx
Enter password:
ERROR:
ORA-12545: Connect failed because target host or object does not exist


Enter user-name:



Same thing if I use SID instead of SERVICE_NAME in CONNECT_DATA.

[Updated on: Fri, 02 March 2007 11:27]

Report message to a moderator

Re: oracle 10g server as client??? [message #222280 is a reply to message #222056] Fri, 02 March 2007 11:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It appears you are on some flavor of *nix.
What is OS name & version?
Does listener.log file on DBhost show incoming connection attempts from your client?
Re: oracle 10g server as client??? [message #222281 is a reply to message #222056] Fri, 02 March 2007 11:33 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
what happens when you do the following:
$ sqlplus username/password@MYSID
Re: oracle 10g server as client??? [message #222296 is a reply to message #222056] Fri, 02 March 2007 12:56 Go to previous messageGo to next message
kregan77
Messages: 21
Registered: January 2007
Junior Member
hmm.. so sqlplus username/pw@sid appears to work. I don't see any entries in the listener log file for the other failures.

Why does it work when passing the credentials vs. not??

Thanks a lot for your help!
Re: oracle 10g server as client??? [message #222297 is a reply to message #222056] Fri, 02 March 2007 13:02 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Why does it work when passing the credentials vs. not??
How in the world is SQLPLUS supposed to guess the name of the remote server & SID unless you tell it.
SQLPLUS was trying to connect to a database on your local system because that is the default operation.

you could have overrode the default behavior by
TWO_TASK=MYSID
export TWO_TASK
Re: oracle 10g server as client??? [message #222300 is a reply to message #222297] Fri, 02 March 2007 13:13 Go to previous message
kregan77
Messages: 21
Registered: January 2007
Junior Member
forgive me for being a relative oracle n00b - I am not worthy...

I thought I was telling it where to go by putting the tnsnames.ora entry and also by setting ORACLE_SID to the remote instance "MYSID". I haven't heard of this TWO_TASK envvar b4.
Previous Topic: Need Information on V$controlfile_record_section
Next Topic: How to know which tables are used by application
Goto Forum:
  


Current Time: Thu Dec 12 23:10:16 CST 2024