Haidar1
asked on
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>tnspin g 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\1 1.1.0\db_1 \network\a dmin\sqlne t.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>tnspin g 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\1 1.1.0\db_1 \network\a dmin\sqlne t.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>tnspin g 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\1 1.1.0\db_1 \network\a dmin\sqlne t.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...
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>tnspin
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
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>tnspin
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
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>tnspin
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
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...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to ivostoykov
But I did
Set Oracle_sid=epprod1
... whey I have to use @epprod1
But I did
Set Oracle_sid=epprod1
... whey I have to use @epprod1
- either way should work haidar. you can set the oracle_sid environment variable separately or supply it in the sqlplus command itself.
ASKER
Hi Zaharin
But I set the environment its not working....
do i need to do some configuration...
But I set the environment its not working....
do i need to do some configuration...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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 @
But if you are connecting remotely you need to specify the @
You can set a 'default' remote database and not use the '@' in the connection.
TWO_TASK in Unix
LOCAL on Windows
TWO_TASK in Unix
LOCAL on Windows
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
Ivo Stoykov
ASKER
Set Oracle_sid=epprod1
... whey I have to use @epprod1