Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: "/ as sysdba" Failes But "sys/password@service_name" Works ???

Re: "/ as sysdba" Failes But "sys/password@service_name" Works ???

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: 25 Feb 2004 15:39:21 -0800
Message-ID: <14a1f766.0402251539.25024b1@posting.google.com>


idogan_tech_at_yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0402251154.bfd587b_at_posting.google.com>...
> I'm trying to connect to a remote Oracle database from a Unix box.
>
> Unix : AIX 4.3.3.
> Oracle: 8.1.7
>
> $> sqlplus sys/syspassword_at_my_db_name
> Connected.
>
> perfectly works
>
> but, the following commands generate ORA-12545: error, any idea why ? :
>
> $> export ORACLE_SID=my_db_name
> $> sqlplus "/ as sysdba"
> ERROR:
> ORA-12545: Connect failed because target host or object does not exist
>
> i.d.

Because when you are connecting from a remote machine, you have to do so via the Listener, which means use a tnsnames alias (or its centralised names resolution equivalent) which is what your first example does. When you fail to suppl an alias, Oracle expects to find an instance named the same as your ORACLE_SID *running on that machine*, not on a remote one.

Your second example's error message, when roughly translated into ordinary English, actually reads "'Ere mate: there's no instance called "my_db_name" running on your PC".

Regards
HJR Received on Wed Feb 25 2004 - 17:39:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US