Connecto to Remote Oracle Database from Client

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...
Haidar1Asked:
Who is Participating?
 
OP_ZaharinCommented:
- you need to supply the sys id and password when connecting from remote.

sqlplus sys/password@epprod1 as sysdba
0
 
Ivo StoykovCommented:
try using name & pass instead of sqlplus /  as sysdba
i.e.
sqlplus sys/pass@  as sysdbaepprod1 as sysdba

HTH

Ivo Stoykov
0
 
Haidar1Author Commented:
thanks Zaharin... its working ... But I did
Set Oracle_sid=epprod1

 ... whey I have to use @epprod1
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Haidar1Author Commented:
Thanks to  ivostoykov

But I did
Set Oracle_sid=epprod1

 ... whey I have to use @epprod1
0
 
OP_ZaharinCommented:
- either way should work haidar. you can set the oracle_sid environment variable separately or supply it in the sqlplus command itself.
0
 
Haidar1Author Commented:
Hi Zaharin

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

do i need to do some configuration...
0
 
Haidar1Author Commented:

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
 
Haidar1Author Commented:
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
 
slightwv (䄆 Netminder) Commented:
You can set a 'default' remote database and not use the '@' in the connection.

TWO_TASK in Unix
LOCAL on Windows
0
 
Ivo StoykovCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.