Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: connecting automatically as sys
ttyp32000_at_yahoo.com (jonathan) wrote in message news:<f05e664d.0407152056.3bbd47df_at_posting.google.com>...
> Ok,
>
> I have a bizarre one - I want to automate a script that uses the 'sys'
> user, but when I try to log in via sqlplus:
>
> sqlplus sys/.....@......
>
> I get the message 'permission denied: sys should connect as sysdba'.
>
> but when I try:
>
> sqlplus sysdba/.....@.....
>
> I get the message 'incorrect password'. So - I *can* do:
>
> connect sys/.....@..... as sysdba
>
> at the beginning of the script - but I'm loathe to do this because I
> don'
> want the user/password string in the sql file.
>
> So - how can one cleanly automate this? Preferably, I'd want to do
> this all from environmental variables so I don't have the password
> displayed at all inside the process table...
Running as someone in the oracle dba group, not root, can you not
sqlplus /nolog <<EOF
connect / as sysdba
insert into dual values ('X');
select * from dual;
EOF
?
But listen to what the others are saying. And note the above is an old joke.
Google this group or check the docs about sys password. I think it is explained in the 8->9 new features doc.
jg
-- @home.com is bogus. buh-bye Enron! http://www.signonsandiego.com/uniontrib/20040716/news_1b16enron.htmlReceived on Fri Jul 16 2004 - 16:11:57 CDT