Re: Shutdown and startup by Non dba: Question
Date: 1995/08/24
Message-ID: <41iund$pf_at_nntp.interaccess.com>#1/1
shahmiri_at_news.gate.net (Irfan A. Shahmiri) writes:
>Hi Folks,
>I want the operators to shutdown and startup oracle
>and I don't want the operator account to be a member
>of the dba group.
>Any suggestions.
>Thanks in anticipation,
I am assuming that you are using UNIX. Oracle requires that the user is in the dba group to startup or shutdown a database. (Actually the root user is an exception, but let's not get into that). There is one way in UNIX to have a non-DBA do these two tasks. Using the perl setuid wrapper, Unix acts as if the non-DBA user is a DBA user! Create a script (thanks to Tom Combes) (and make sure that it is owned by the dba group):
# !/usr/local/bin/perl
# ------------- Start perl setuid wrapper script ---------------
&priv_cmd ("\$ORACLE_HOME/bin/sqldba",_at_ARGV);
sub priv_cmd
{
$real_id = $<; $< = $>; $cmd = $_[0]; $opt = $_[1]; $t_cmd = "$cmd $opt";
print STDOUT+"+ ",$t_cmd, "\n";
system($t_cmd);
print "Command exited non-zero \n" if $? != 0; $< = $real_id;
return $?;
}
# --------------------------- End of script -------------------
Make sure that you know what you are doing when you use this script. It is dangerous to let non-DBA's control database availability.
-Ari Kaplan
{Chicago DBA}
akaplan_at_interaccess.com
Received on Thu Aug 24 1995 - 00:00:00 CEST