cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Novice

SOLVED
Go to solution
Louis Mushandu
Occasional Contributor

Oracle Novice

How do I check when a Oracle DB has been brought up and down. Is there a log file. Thanks in advance.
8 REPLIES
Kofi ARTHIABAH
Honored Contributor

Re: Oracle Novice

I usually do a

ps -ef | grep oracle

if there are any processes running with oracle user name, it is likely that it is still running.

you can shut it down with
/sbin/init.d/oracle stop
(if you have configured the start/stop scripts properly)

you could set up your start/stop script to write to the syslog file when starting /stopping if you want.
nothing wrong with me that a few lines of code cannot fix!
Kofi ARTHIABAH
Honored Contributor

Re: Oracle Novice

If you do not have the oracle init scripts, you might want to check this thread:

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x6b5468c57f64d4118fee0090279cd0f9,00.html
nothing wrong with me that a few lines of code cannot fix!
CHRIS ANORUO
Honored Contributor

Re: Oracle Novice

Use ipcs -mob to check shared memory sets associated with oracle process(databases) and or ipcs -t to check the time (OTIME and CTIME)
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
James R. Ferguson
Acclaimed Contributor

Re: Oracle Novice

Louis:

If you do a ps -ef|grep ora_ you will see some of the key oracle processes like:
ora_dbwr_XXX, ora_lgwr_XXX, ora_pmon_XXX and ora_smon_XXX where XXX=the database name. This is useful when you are running multiple instances.

...JRF...
Rick Garland
Honored Contributor
Solution

Re: Oracle Novice

If you look in the bdump and/or cdump areas of the oracle layout, you will find logs that indicate when the DB was up, brought down, ant errors, etc...

The location of these particular areas depends on the layout of the oracle install.

There are also LISTENER log files that can tell you the uptime for the LISTENER. Again, the location depends on the layout.

Also, the layout depends on how many instances you have on the system. They will be different for each instance.

To see processes related to the oracle $LOGNAME, can do ps -fu oracle
CHRIS ANORUO
Honored Contributor

Re: Oracle Novice

If you are root or oracle user, just type "lsnrctl stat" this will show you the status of the listener that Rick mentioned.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
P V Patel
Advisor

Re: Oracle Novice

You may check whether oracle is running or not with
ps -ef | grep ora_ command.
ora_smon_xxx,ora_pmon_xxxx,ora_lgwr_xxxx etc . processes should be there when oracle is running.
You may start oracle with following script:

svrmgrl <connect internal
startup pfile=$PFILE
EOF
P V Patel

Punjabhai
John Palmer
Honored Contributor

Re: Oracle Novice

The database server log file is called 'alert_.log' and will be in the 'user dump' directory configured in the Oracle initialisation file (by default $ORACLE_HOME/dbs/init.ora or as defined by the pfile= parameter to svrmgrl).

This log contains (amongst a lot of other information) details of instance startup and shutdown.