Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Startup via SQL Embedded

Re: Startup via SQL Embedded

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 17 Oct 2001 18:48:49 +0200
Message-ID: <tsrs1s4sv3ue97@corp.supernews.com>

"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3bcd8fa3$0$234$ed9e5944_at_reading.news.pipex.net...
> "Renato Fabiano" <renatofabiano_at_hotmail.com> wrote in message
> news:2358ca76.0110170529.4cb2eaed_at_posting.google.com...
> > Hi,
> >
> > Some guys have disagreed completely with the possibility of to startup
> > an Oracle instance from an user application.
>
> <snip>
>
> > I've done a C program that is able to start the Oracle db instance
> > since the user who executed it be a member of "dba" Unix group.
> > It uses a system call to "sqlplus".
>
> The c program you show is not starting Oracle via the application though
is
> it really. It is using sqlplus. I don't think that anyone here would
object
> in quite the same terms to the code you post. For example the following
> works using vb and on a win2k platform. I just tried it
>
> Sub Main()
>
> x = Shell("c:\oracle\ora81\bin\oradim.exe -startup -sid nltest -starttype
> srvc,inst -intpwd oracle")
>
> End Sub
>
>
> I do however have a couple of objections.
>
> 1. svrmgrl is desupported so that part of the code shouldn't be included
> imo.
> 2. what happens if your applications site uses password authentication for
> sysdba operations? what happens if the password changes.
>
> So yes it is *possible* to write a program in c (or presumably in any
other
> language of your choice) to control external progs to start up the Oracle
> database. However anytime the startup routine changes the program needs
> recompilation. Surely the tried and tested approach of a shell script is
> better. 3 & 4GL languages have their place. scripting isn't one of them.
>
>
>
>
>

For connect / as sysdba, the client session has to be member of the dba group.
Surely there should be only 2 accounts member of the dba group: the oracle account and the account of the person acting as dba. Have more accounts in the dba group running this disastrous program and any moron can shutdown and startup the database. Will that person, in case of any problem during the shutdown, know how to deal with them. Most likely not.
If this is going to be a local linux pc with only one user connected, that is a different situation: if you want to enable the end-user to screw up the database, go ahead. I'm not too sure you won't run into any legal procedures.
If this is going to be a multi user database: starting and shutting down the database is the responsibility of the dba. Normally the database will be up. What is, do you expect, going to happen when your user, not acting as dba, will be capable of starting up the database when the database is purposively down. I'm sure the dba definitely won't like this, as your client program is screwing up his efforts to get the database up and running. Still need more reasons not to proceed? In that case I don't think anyone will convince you, and probably you should learn the *hard* way, you shouldn't allow this.

Good Luck

Sybrand Bakker,
Senior Oracle DBA Received on Wed Oct 17 2001 - 11:48:49 CDT

Original text of this message

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