oracle 10g server as client??? [message #222056] |
Thu, 01 March 2007 09:47 |
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 #222085 is a reply to message #222062] |
Thu, 01 March 2007 13:05 |
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 |
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 #222279 is a reply to message #222056] |
Fri, 02 March 2007 11:26 |
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 #222296 is a reply to message #222056] |
Fri, 02 March 2007 12:56 |
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 #222300 is a reply to message #222297] |
Fri, 02 March 2007 13:13 |
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.
|
|
|