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: Andy Kent <andykent.bristol1095_at_virgin.net>
Date: 5 Dec 2006 06:23:42 -0800
Message-ID: <1165328622.382332.34030@j44g2000cwa.googlegroups.com>


Sorry, it does in fact execute 'sqlplus "sys/password_at_targbox as sysdba" '. What I can't understand is why that should cause the shutdown / startup not to complete cleanly, as though an incorrect environment is getting picked up, whereas doing it with both 'sqlplus / as sysdba' and through rman with the full connect string works fine.

The root of the problem probably lies in having old, untidy DBA scripts on a box with multiple databases and Oracle versions installed. I am as surprised that the rman method *does* work than that the first sqlplus one *doesn't*! What I am trying to understand better is what kind of inherent differences there are in the three methods being tried as to how the connection gets established. I hope that makes some sense!

sybrandb wrote:
> 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 - 08:23:42 CST

Original text of this message

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