The Road to Elysium

November 4, 2008

Oracle tips and tricks

Filed under: Linux — jorge @ 10:00

Finding out if Oracle is running on the machine (Oracle always has a db-writer process running):

# ps aux | grep dbw

Finding the name of the database-instance:

# ps aux | grep -v grep | grep dbw | cut -d _ -f 3

Logging in as sysdba:

$ sqlplus "/ as sysdba"

Finding out where Oracle places the archive-logs:

> show parameter log_archive_dest;

Show general log information:

> show parameter log_archive;

Setting the archive-log path:

> system set log_archive_dest='/path/to/logs/arch';

Finding out where Oracle places the alert-log:

> show parameter background_dump_dest;

Healthchecking Oracle (if you are able to take down the database):

> shutdown abort;
> startup;
> shutdown;
> startup;
> select sysdate from dual;

Forcing Oracle to write to the archive-logs:

> alter system switch logfile;

Starting the database if it isn’t running:

> alter database open;

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress