Re: Java program that automatically monitor and tune the Oracle database

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 29 Sep 2002 11:37:42 -0700
Message-ID: <92eeeff0.0209291037.553f9bd8_at_posting.google.com>


liqiuxia_at_comp.nus.edu.sg (rabbit) wrote in message news:<184dc8fd.0209290131.29410f90_at_posting.google.com>...
> Hi,
>
> I need to write a java program that can automatically monitor and tune
> the database, i.e., tuning the shared pool(increase or decrease the
> shared_pool_size parameter in init.ora), buffer cache and redo log
> buffer.
> Does anyone know how to do so in a jdbc program (without write or read
> this init.ora file directly, but use SQL statement to change it)?
>
> As many of these parameters involve the updating of the file init.ora,
> shutting down and restarting the database instance is required for the
> change to take effect. Does anyone know how to restart and shutdown
> the database in the
> java program?
>
> Thanks!

In Oracle 9i, it is simple with the introduction of SPFILE. SPFILE Can be created at database creation time or any time after that. With SPFILE, you can alter any parameters (Dynamic or static) while the database is running without having to bounce it. You can read more about SPFILE in 9i docs.

In 8i or earlier versions, You can change any dynamic parameters at runtime but for static parameters like SGA size, you have to change it in init.ora file and bounce the database.

If you have 9i, you should be able to accomplish this with JDBC driver. With 8i or earlier, you would have to touch the init.ora file and bounce the database so you would have to use File interface or JNI etc.

/Rauf Sarwar Received on Sun Sep 29 2002 - 20:37:42 CEST

Original text of this message