Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: shutdown database(s) from root user
>>>>> "Jim" == Jim Day <jday_at_fslso.com> writes:
Jim> Thanks to everyone for the suggestions. I guess I didn't Jim> explain well enough, but I was trying to "su - oracle" in the Jim> vendor supplied OS shutdown script but it kept asking for a Jim> password. Well after further investigation, the su is working as Jim> everyone suggested and the script is switched to the oracle Jim> user. But when this OS shutdown script gets to the part that I Jim> modified (execute my script to shutdown a database) I get
Jim> Enter password: ERROR: ORA-01031: insufficient privileges
Jim> So, it appears that the SQLPLUS is wanting a password. As I Jim> mentioned in my initial post, the script I use to shutdown this Jim> database (while logged in as oracle) is as follows (this is not Jim> the entire script, but just the sqlplus part):
Jim> sqlplus internal <<EOF shutdown immediate exit EOF
Jim> When I run my database shutdown script manually or from another Jim> script while logged in as oracle, it does not ask for a password Jim> and my understanding of using internal is that you didn't have Jim> to provide a password as long as you were running this from the Jim> oracle user. But, as you can see, it is asking for a password Jim> when I try running my database shutdown script from within the Jim> script that is used to shutdown the OS.
Jim> So,
Jim> 1) why is it asking for a password? Is there some issue with the Jim> su not making sqlplus happy with respect to the use of Jim> "internal", or is there an issue with the use of the <<EOF in Jim> the sqlplus statement? (this is how I learned to do things like Jim> this in shell scripts). Jim> 2) Should I be using a different username (to sqlplus) when Jim> shutting down the database?...and if so, is there a preferred Jim> way to specify the user/password in a script when starting Jim> sqlplus? -- I was taught not to put user/password on the sqlplusJim> command line as that would be viewable by anyone on the system Jim> running a ps command.
Jim> I know this may seem very elementary to many of you and I admit Jim> I may be overlooking something "everyone else knows", but here I Jim> am.
Jim> Many thanks!
Jim> Jim
Post your script that calls the oracle shutdown script.
Tim
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!Received on Mon Jun 02 2003 - 05:40:06 CDT
![]() |
![]() |