?
Solved

Connecto to Remote Oracle Database from Client

Posted on 2011-10-03
10
Medium Priority
?
988 Views
Last Modified: 2012-06-27
Hi Expets

Pls I need your help...
I need to connec to remote oracle database from my local machine but I am getting the following error

From My local machine

C:> Set oracle_sid=epprod1
C:\> sqlplus /  as sysdba
ORA-12560: TNS:protocol adapter error

tnsanmes is fine and slqnet.ora is fine
since I can tnsping the service name and I am getting reply
as you can see from below log
C:\Documents and Settings\mhaidaradm>tnsping epprod

TNS Ping Utility for 64-bit Windows: Version 11.1.0.6.0 - Production on 04-OCT-2011 10:51:37

Copyright (c) 1997, 2007, Oracle.  All rights reserved.

Used parameter files:
D:\Product\bloodbank-local\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.5.23)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.5.24)(PORT =
1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = epprod)))
OK (10 msec)

C:\Documents and Settings\mhaidaradm>tnsping epprod1

TNS Ping Utility for 64-bit Windows: Version 11.1.0.6.0 - Production on 04-OCT-2011 10:51:40

Copyright (c) 1997, 2007, Oracle.  All rights reserved.

Used parameter files:
D:\Product\bloodbank-local\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.5.23)(PORT = 1521)) (CONNECT_DATA = (INSTANCE_NAME = epprod1) (SERVER = d
edicated) (SERVICE_NAME = epprod)))
OK (10 msec)

C:\Documents and Settings\mhaidaradm>tnsping epprod2

TNS Ping Utility for 64-bit Windows: Version 11.1.0.6.0 - Production on 04-OCT-2011 10:51:43

Copyright (c) 1997, 2007, Oracle.  All rights reserved.

Used parameter files:
D:\Product\bloodbank-local\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.5.22)(PORT = 1521)) (CONNECT_DATA = (INSTANCE_NAME = epprod2) (SERVER = d
edicated) (SERVICE_NAME = epprod)))
OK (20 msec)

Please I need help...
0
Comment
Question by:Haidar1
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 22

Assisted Solution

by:Ivo Stoykov
Ivo Stoykov earned 800 total points
ID: 36908221
try using name & pass instead of sqlplus /  as sysdba
i.e.
sqlplus sys/pass@  as sysdbaepprod1 as sysdba

HTH

Ivo Stoykov
0
 
LVL 23

Accepted Solution

by:
OP_Zaharin earned 1200 total points
ID: 36908231
- you need to supply the sys id and password when connecting from remote.

sqlplus sys/password@epprod1 as sysdba
0
 

Author Comment

by:Haidar1
ID: 36908243
thanks Zaharin... its working ... But I did
Set Oracle_sid=epprod1

 ... whey I have to use @epprod1
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Haidar1
ID: 36908248
Thanks to  ivostoykov

But I did
Set Oracle_sid=epprod1

 ... whey I have to use @epprod1
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 36908253
- either way should work haidar. you can set the oracle_sid environment variable separately or supply it in the sqlplus command itself.
0
 

Author Comment

by:Haidar1
ID: 36908274
Hi Zaharin

But I set the environment its not working....

do i need to do some configuration...
0
 

Assisted Solution

by:Haidar1
Haidar1 earned 0 total points
ID: 36908314

Hi Experts

I think I foud my mistake If you are in the server where db is reside you don’t need to specify the @ just set the environment
But if you are connecting remotely you need to specify the @
 
0
 

Author Closing Comment

by:Haidar1
ID: 36935353
I think I foud my mistake If you are in the server where db is reside you don’t need to specify the @ just set the environment
But if you are connecting remotely you need to specify the @
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36908882
You can set a 'default' remote database and not use the '@' in the connection.

TWO_TASK in Unix
LOCAL on Windows
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 36910290
if you have more than one database it is not a good idea to use sqlplus /  as sysdba for you could mess databases

Ivo Stoykov
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question