Connect to remote database from solaris system

Hi,

i need to connect to a oracle database available in a remote PC (reachable from the host solaris server). I have added the tnsnames of that remote DB in to the tnsnames.ora file of the host solaris server.

Am able to ping that IP. How do i connect to that DB for running sql queries....That remote PC does not have telnet or ssh options.....

Command-line connects to an Oracle DB are usually done with sqlplus, eg

sqlplus scott/tiger@ORACLE

Syntax is

sqlplus user/password@SID

HI

This i tried, but unfotunately the remote system tnsnames.ora file does not have the SID....only SERVICE_NAME available

(SERVICE_NAME = IMS)

As far as I remember, the service name and the SID should work the same (eg. you can usually substitute one for the other)

HI

AM GETTING THE FOLLOWING ERROR

Actually u need to add the remote DB service name in your local tnsnames.ora file.

Say IMS is the service name on Solaris server. And you are connecting from a windows pc. then the tnsnames.ors file should have the entry of IMS.

After adding this you can connect
sqlplus system/manager@IMS

I have added all those stuff.....

---------- Post updated at 06:00 PM ---------- Previous update was at 05:02 PM ----------

am able to CONNECT through windows pc by the following method....but not succeeded in Solaris server.

C:\Documents and Settings\Administrator>sqlplus scott/tiger@"(DESCRIPTION=(
ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.x)(PORT = 1521)))(CONNECT_D
ATA=(SERVICE_NAME=IMS)))"

SQL*Plus: Release 9.0.1.0.1 - Production on Thu Jan 21 17:28:27 2010

(c) Copyright 2001 Oracle Corporation.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

try to ping the db using tnsping and whats the output of that

tnsping IMS

hi

#tnsping IMS

TNS Ping Utility for Solaris: Version 9.2.0.6.0 - Production on 22-JAN-2010 11:20:27

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:

TNS-03505: Failed to resolve name

Can you please post the entry u have in tnsnames.ora as its a generic error

TNS-03505

The specified database name was not found in the tnsnames.ora, onames or ldap. This means that the client hasn't even got as far as trying to make contact with a server - it simply can't find any record of the database that you are trying to connect to. Make sure that you've spelled the database name correctly, and that it has an entry in the tnsnames.ora.

If you have a sqlnet.ora, look at for the setting NAMES.DEFAULT_DOMAIN. If it is set, then all entries in your tnsnames.ora must have a matching domain suffix

HI

the entry in the tnsnames.ora file is

Then you should connect as
sqlplus system/manager@SAN