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 06:37:07 -0800
Message-ID: <1165329427.114722.100400@j72g2000cwa.googlegroups.com>


No, it doesn't make sense at all, as 'doesn't work' and 'not cleanly' without pertinent error messages require crystal balls. The script in itself is correct, so how can anyone, not sitting at your desk, and not looking over your shoulder, resolve your riddle?

I would also strongly recommend, assuming your are human, and humans (except the Bill Gates liveform) happen to read from top to bottom, as opposed from bottom to top, you stop top-posting.

--
Sybrand Bakker
Senior Oracle DBA


On Dec 5, 3:23 pm, "Andy Kent" <andykent.bristol1..._at_virgin.net>
wrote:

> 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- Hide quoted text -- Show quoted text -
Received on Tue Dec 05 2006 - 08:37:07 CST

Original text of this message

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