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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

HTH

Ivo Stoykov
OP_ZaharinCommented:
- you need to supply the sys id and password when connecting from remote.

sqlplus sys/password@epprod1 as sysdba

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Haidar1Author Commented:
thanks Zaharin... its working ... But I did
Set Oracle_sid=epprod1

 ... whey I have to use @epprod1
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Haidar1Author Commented:
Thanks to  ivostoykov

But I did
Set Oracle_sid=epprod1

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

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

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

TWO_TASK in Unix
LOCAL on Windows
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.