f



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

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@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.
0
2/25/2004 7:54:27 PM
comp.databases.oracle.server 22978 articles. 1 followers. Post Follow

9 Replies
1299 Views

Similar Articles

[PageSpeed] 38

> $> export ORACLE_SID=my_db_name
> $> sqlplus "/ as sysdba"
> ERROR:
> ORA-12545: Connect failed because target host or object does not exist


Is the database you are trying to connect to a remote database? If so,
then you won't be able to connect this way. You'll have to connect the
first way you indicated.

HTH,
Brian


-- 
===================================================================

Brian Peasland
dba@remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
0
dba1 (382)
2/25/2004 8:11:26 PM
idogan_tech@yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0402251154.bfd587b@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@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
0
hjr (2065)
2/25/2004 11:39:21 PM
On 25 Feb 2004 15:39:21 -0800, hjr@dizwell.com (Howard J. Rogers)
wrote:

>idogan_tech@yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0402251154.bfd587b@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@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

Or this slight variant translation, which is a bit more specific, "Ere
mate: there's no instance called "my_db_name" running on *this* PC."
0
nospam3370 (313)
2/26/2004 1:37:50 PM
hjr@dizwell.com (Howard J. Rogers) wrote in message news:<14a1f766.0402251539.25024b1@posting.google.com>...
> idogan_tech@yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0402251154.bfd587b@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@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

FYI, the error msg is actualy documented under TNS-12545. You can get
the same error if your DNS configuration is not correct, or the
tnsnames.ora file is missing, or missing the entry for your instance.
0
2/26/2004 3:29:45 PM
sorry guys i *thought* i figured out and i removed my post but
couldn't catch up with you..

now i got new question:

Actually tThe issue was originated form the task of accessing mix of
8i/9i databases from a central host which has sqplus 8.1.7 version.

Suppose we have remote Unix boxes like 8i_host1, 9i_host1 and 9i_host2
hosting 8i_db1, 9i_db1 and 9i_db2 respectively.

an I'm trying to connect to these databases from a host called
center_host.

Below is the list of cases i tried:

CASE-1 (FAILED)
======
FROM: center_host
TO  : 9i_db1 (remote)

$> sqlplus "sys/mypass@9i_db1 as sysdba"
ORA-01017: invalid username/password; logon denied

CASE-2 (OK)
======
FROM: 9i_host1
TO  : 9i_db1 (local)

$> sqlplus "sys/mypass@9i_db1 as sysdba"
Connected.

CASE-3 (OK)
======
FROM: center_host
TO  : 9i_db1 (remote)

$> sqlplus "system/mypass@9i_db1"
Connected.

CASE-4 (OK)
======
FROM: center_host
TO  : 8i_db1 (remote)

$> sqlplus "sys/mypass@8i_db1 as sysdba"
Connected.

CASE-5 (FAILED)
======
FROM: 9i_host2
TO  : 9i_db1 (remote)

$> sqlplus "sys/mypass@9i_db1 as sysdba"
ORA-01017: invalid username/password; logon denied


CONCLUSION
===========

seems sqlplus(9i) allows "as sysdba" option only for local databases.
I can not connect to remote 9i database as "sys as sysdba". but this
is doable for 8i remote databases as shown above...

i'd greatly appreciate if anybody could explain the logic behin
sqlplus behaviour regarding "as sysdba" for remote database acceses
and how can I connect to 9i remote db as sysdba ???

Thanks
i.d.


richard.a.elliott@williams.com (Richard Elliott) wrote in message news:<8c132b3c.0402260729.1f1d9abd@posting.google.com>...
> hjr@dizwell.com (Howard J. Rogers) wrote in message news:<14a1f766.0402251539.25024b1@posting.google.com>...
> > idogan_tech@yahoo.com (Ibrahim DOGAN) wrote in message news:<6bf58828.0402251154.bfd587b@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@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
> 
> FYI, the error msg is actualy documented under TNS-12545. You can get
> the same error if your DNS configuration is not correct, or the
> tnsnames.ora file is missing, or missing the entry for your instance.
0
2/27/2004 5:04:28 PM
"Ibrahim DOGAN" <idogan_tech@yahoo.com> a �crit dans le message de
news:6bf58828.0402270904.6c97db86@posting.google.com...
> sorry guys i *thought* i figured out and i removed my post but
> couldn't catch up with you..
>
> now i got new question:
>
> Actually tThe issue was originated form the task of accessing mix of
> 8i/9i databases from a central host which has sqplus 8.1.7 version.
>
> Suppose we have remote Unix boxes like 8i_host1, 9i_host1 and 9i_host2
> hosting 8i_db1, 9i_db1 and 9i_db2 respectively.
>
> an I'm trying to connect to these databases from a host called
> center_host.
>
> Below is the list of cases i tried:
>
> CASE-1 (FAILED)
> ======
> FROM: center_host
> TO  : 9i_db1 (remote)
>
> $> sqlplus "sys/mypass@9i_db1 as sysdba"
> ORA-01017: invalid username/password; logon denied
>
> CASE-2 (OK)
> ======
> FROM: 9i_host1
> TO  : 9i_db1 (local)
>
> $> sqlplus "sys/mypass@9i_db1 as sysdba"
> Connected.
>
> CASE-3 (OK)
> ======
> FROM: center_host
> TO  : 9i_db1 (remote)
>
> $> sqlplus "system/mypass@9i_db1"
> Connected.
>
> CASE-4 (OK)
> ======
> FROM: center_host
> TO  : 8i_db1 (remote)
>
> $> sqlplus "sys/mypass@8i_db1 as sysdba"
> Connected.
>
> CASE-5 (FAILED)
> ======
> FROM: 9i_host2
> TO  : 9i_db1 (remote)
>
> $> sqlplus "sys/mypass@9i_db1 as sysdba"
> ORA-01017: invalid username/password; logon denied
>
>
> CONCLUSION
> ===========
>
> seems sqlplus(9i) allows "as sysdba" option only for local databases.
> I can not connect to remote 9i database as "sys as sysdba". but this
> is doable for 8i remote databases as shown above...
>
> i'd greatly appreciate if anybody could explain the logic behin
> sqlplus behaviour regarding "as sysdba" for remote database acceses
> and how can I connect to 9i remote db as sysdba ???
>
> Thanks
> i.d.
>
>

What is the REMOTE_LOGIN_PASSWORDFILE parameter value
on each database?

Regards
Michel Cadot


0
Michel
2/27/2004 5:29:35 PM
> What is the REMOTE_LOGIN_PASSWORDFILE parameter value
> on each database?
> 

on 8i_dbi and 9i_db2, REMOTE_LOGIN_PASSWORDFILE =  ESXLUSIVE
on 9i_db1, REMOTE_LOGIN_PASSWORDFILE = NONE

i.d.
0
3/1/2004 2:46:57 PM
"Ibrahim DOGAN" <idogan_tech@yahoo.com> a �crit dans le message de
news:6bf58828.0403010646.63ea87f4@posting.google.com...
> > What is the REMOTE_LOGIN_PASSWORDFILE parameter value
> > on each database?
> >
>
> on 8i_dbi and 9i_db2, REMOTE_LOGIN_PASSWORDFILE =  ESXLUSIVE
> on 9i_db1, REMOTE_LOGIN_PASSWORDFILE = NONE
>
> i.d.

So you have your answer.
9i_db1, none = no remote sysdba login
8i_dbi and 9i_db2, exclusive = users in password file can remote login as sysdba/sysoper.

Regards
Michel Cadot


0
Michel
3/1/2004 3:30:47 PM
Exactly, i didn't know this param controls remote access.

i.d.

> 
> So you have your answer.
> 9i_db1, none = no remote sysdba login
> 8i_dbi and 9i_db2, exclusive = users in password file can remote login as sysdba/sysoper.
> 
> Regards
> Michel Cadot
0
3/1/2004 6:55:15 PM
Reply: