This is somewhat related to the question earlier about how to encrypt a password in a script... however, what I want to do is also be able to start that database through a script. 
 
(Oracle 9.2.0.)
 
Essentially I have a database that I want to shut down at 5pm every night, and start it back up at 8am in the morning.  I currently have a script that logs into sqlplus "/ as sysdba" 
 
I tried creating a use OPS$ORACLE and granted it dba, sysdba, and set the tablespaces.   And I can log in fine doing a
 
$ sqlplus /
 
and when I do a 'select user from dual;' it comes back and says OPS$ORACLE...   exactly what I want... however when I try to start or shutdown the database it says I must be logged in as SYSDBA or SYSOPR...  or I try
 
$ sqlplus "/ as sysdba"
 
logs into oracle just fine, but when I do a 'select user from dual;' it comes back as SYS and not OPS$ORACLE...  what am I doing wrong?  
 
Thanks!
 
Nick
 
 
 

Reply via email to