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: Different connect strings needed for RMAN and sqlplus?

Re: Different connect strings needed for RMAN and sqlplus?

From: sybrandb <sybrandb_at_gmail.com>
Date: 5 Dec 2006 04:50:57 -0800
Message-ID: <1165323056.928636.225700@f1g2000cwa.googlegroups.com>

On Dec 5, 1:28 pm, "Andy Kent" <andykent.bristol1..._at_virgin.net> wrote:
> Can someone explain why the connect string in the following works fine:
>
> rman
> connect catalog rman/password_at_catbox
> connect target sys/password_at_targbox
> shutdown immediate;
> startup mount;
> <backup stuff>
> alter database open;
> exit;
> (We need to do this for those of our databases which use NOARCHIVELOG)
>
> But this doesn't:
> sqlplus sys/password_at_targbox as sysdba
> shutdown immediate;
> startup mount;
> ...
> alter database open;
>
> Basically in the latter case we need to be using OS authantication
> ("sqlplus / as sysdba") otherwise the restart gets done with an
> incorrect environment (I've inherited what aren't the world's greatest
> DBA scripts). Fair enough - but how come it works correctly when done
> through rman? And how come rman doesn't seem to mind if you don't
> specify "as sysdba"?
>
> It's 9i on Solaris.
>
> Thanks
>
> Andy

RMAN allows only SYSDBA connections for target databases. If the user doesn't have SYSDBA, you'll get ora-1031.

The sqlplus script would work, provided the first line reads

sqlplus "sys/password_at_targbox as sysdba" but then of course the password exposes on the commandline.
You would need to
sqlplus /nolog <<EOD
connect sys/<password>@targbox as sysdba exit
EOD
and you are OK.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Tue Dec 05 2006 - 06:50:57 CST

Original text of this message

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