Home » Infrastructure » Linux » Only instance is auto start while system reboot (Oracle 11.2.0.2.0 , SUSE Linux Enterprise Server 11 sp1 64bit, )
Only instance is auto start while system reboot [message #506261] Sat, 07 May 2011 13:30 Go to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

Hi, guys
I met a problem with Oracle 11g (11.2.0.2.0), when trying to auto startup the database on SUSE Linux Enterprise Server 11 sp1 64bit.

I have configurated these files to let Oracle auto startup along with SUSE reboot.

1. /etc/oratab
demo:/opt/app/oracle/product/11gR2/db_1:Y


2. wrote a script called "oracle" at /etc/init.d/
# cat /etc/init.d/oracle 
#!/bin/bash
#
#
#/etc/init.d/oracle
#
#
### BEGIN INIT INFO
# Provides: oracle
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Oracle DB startup script
### END INIT INFO

ORACLE_OWNER="oracle"
ORACLE_HOME="/opt/app/oracle/product/11gR2/db_1"

case "$1" in
start)
        echo -n $"Starting Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" && echo "DB started!"
;;

stop)
        echo -n $"Stopping Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" && echo "DB stoped!"
;;

restart)
        echo -n $"Stopping Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" && echo "DB stoped!"
        echo -n $"Starting Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" && echo "DB started!"
;;

*)
echo $"Usage: $0 {start|stop|restart}"
esac


change the file permission:
# ll /etc/init.d/oracle 
-rwxr-x--- 1 root root 889 May  8 10:01 /etc/init.d/oracle


let this service at level 3 and 5 run:
# chkconfig --list | grep oracle
oracle                    0:off  1:off  2:off  3:on   4:off  5:on   6:off



After configurated there files, I did a reboot to test if oracle will auto startup.

Actually, I see a lot of process of oracle , but when I login to the database with sqlplus, it shows me "Connect to an idle instance."

So it's only start the instance and database is not open.

I test the service :
# service oracle start
Starting Oracle DB:Processing Database instance "demo": log file /opt/app/oracle/product/11gR2/db_1/startup.log
DB started!


I also trace the startup.log:
/opt/app/oracle/product/11gR2/db_1/bin/dbstart: Starting up database "demo"
Sun May  8 10:10:58 CST 2011


SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 10:10:59 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> Connected to an idle instance.
SQL> ORACLE instance started.

Total System Global Area  304807936 bytes
Fixed Size                  2225992 bytes
Variable Size             134219960 bytes
Database Buffers          163577856 bytes
Redo Buffers                4784128 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

/opt/app/oracle/product/11gR2/db_1/bin/dbstart: Database instance "demo" warm started.



oracle@vmsuse:~> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 10:12:28 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> select * from v$instance;
select * from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


SQL>         




It shows that the database is already open, but what I see in the sqlplus is that I still connect to an idle instance.

I tried to work it out, but I am still confuse why the startup.log give me the wrong result, how can I fix it?

Thanks very much,
Milo
Re: Only instance is auto start while system reboot [message #506262 is a reply to message #506261] Sat, 07 May 2011 13:35 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
DECENT post!
Thanks for all the COPY & PASTE details

error of omission?
export ORACLE_SID=demo

post results from following OS command

env | sort
Re: Only instance is auto start while system reboot [message #506282 is a reply to message #506262] Sat, 07 May 2011 18:58 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

Hi, blackswan
Thanks.
Here is the output:

oracle@vmsuse:~> export ORACLE_SID=demo
oracle@vmsuse:~> env | sort
CLASSPATH=/opt/app/oracle/product/11gR2/db_1//jlib:/opt/app/oracle/product/11gR2/db_1//rdbms/jlib
COLORTERM=1
CPU=x86_64
CSHEDIT=emacs
ENV=/etc/bash.bashrc
FROM_HEADER=
G_BROKEN_FILENAMES=1
G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=vmsuse
HOSTTYPE=x86_64
HOST=vmsuse
INFODIR=/usr/local/info:/usr/share/info:/usr/info
INFOPATH=/usr/local/info:/usr/share/info:/usr/info
INPUTRC=/home/oracle/.inputrc
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/opt/app/oracle/product/11gR2/db_1//lib:/lib:/usr/lib
LESS_ADVANCED_PREPROCESSOR=no
LESSCLOSE=lessclose.sh %s %s
LESSKEY=/etc/lesskey.bin
LESS=-M -I
LESSOPEN=lessopen.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:
LS_OPTIONS=-N --color=tty -T 0
MACHTYPE=x86_64-suse-linux
MAIL=/var/mail/oracle
MANPATH=/usr/local/man:/usr/share/man
MINICOM=-c on
MORE=-sl
NNTPSERVER=news
ORACLE_BASE=/opt/app/oracle
ORACLE_HOME=/opt/app/oracle/product/11gR2/db_1/
ORACLE_SID=demo
OSTYPE=linux
PAGER=less
PATH=/opt/app/oracle/product/11gR2/db_1//bin/:/home/oracle/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
PROFILEREAD=true
PWD=/home/oracle
PYTHONSTARTUP=/etc/pythonstart
QT_SYSTEM_DIR=/usr/share/desktop-data
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=192.168.25.100 4299 22
SSH_CONNECTION=192.168.25.100 4299 192.168.25.130 22
SSH_TTY=/dev/pts/2
TERM=vt100
TMPDIR=/tmp/
TMP=/tmp/
USER=oracle
_=/usr/bin/env
WINDOWMANAGER=/usr/bin/gnome
XCURSOR_THEME=DMZ
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/share:/etc/opt/kde3/share
XKEYSYMDB=/usr/share/X11/XKeysymDB
XNLSPATH=/usr/share/X11/nls




And here is the alert log:
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile /opt/app/oracle/product/11gR2/db_1/dbs/spfiledemo.ora
System parameters with non-default values:
  processes                = 150
  sga_target               = 292M
  control_files            = "/opt/app/oracle/oradata/demo/control01.ctl"
  control_files            = "/opt/app/oracle/oradata/demo/control02.ctl"
  db_block_size            = 32768
  compatible               = "11.2.0.0.0"
  undo_tablespace          = "UNDOTBS1"
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=demoXDB)"
  audit_file_dest          = "/opt/app/oracle/admin/demo/adump"
  audit_trail              = "DB"
  db_name                  = "demo"
  open_cursors             = 300
  pga_aggregate_target     = 97M
  diagnostic_dest          = "/opt/app/oracle"
Sun May 08 15:49:15 2011
PMON started with pid=2, OS id=3674 
Sun May 08 15:49:15 2011
PSP0 started with pid=3, OS id=3679 
Sun May 08 15:49:16 2011
VKTM started with pid=4, OS id=3687 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Sun May 08 15:49:16 2011
GEN0 started with pid=5, OS id=3694 
Sun May 08 15:49:16 2011
DIAG started with pid=6, OS id=3699 
Sun May 08 15:49:16 2011
DBRM started with pid=7, OS id=3704 
Sun May 08 15:49:17 2011
DIA0 started with pid=8, OS id=3709 
Sun May 08 15:49:17 2011
MMAN started with pid=9, OS id=3714 
Sun May 08 15:49:17 2011
DBW0 started with pid=10, OS id=3721 
Sun May 08 15:49:17 2011
LGWR started with pid=11, OS id=3727 
Sun May 08 15:49:17 2011
CKPT started with pid=12, OS id=3732 
Sun May 08 15:49:17 2011
SMON started with pid=13, OS id=3737 
Sun May 08 15:49:17 2011
RECO started with pid=14, OS id=3742 
Sun May 08 15:49:17 2011
MMON started with pid=15, OS id=3747 
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Sun May 08 15:49:17 2011
MMNL started with pid=16, OS id=3752 
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /opt/app/oracle
Sun May 08 15:49:18 2011
ALTER DATABASE   MOUNT
Successful mount of redo thread 1, with mount id 3494682558
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE   MOUNT
Sun May 08 15:49:22 2011
ALTER DATABASE OPEN
Beginning crash recovery of 1 threads
Started redo scan
Completed redo scan
 read 9 KB redo, 14 data blocks need recovery
Started redo application at
 Thread 1: logseq 62, block 36675
Recovery of Online Redo Log: Thread 1 Group 2 Seq 62 Reading mem 0
  Mem# 0: /opt/app/oracle/oradata/demo/redo02.log
Completed redo application of 0.01MB
Completed crash recovery at
 Thread 1: logseq 62, block 36694, scn 911330
 14 data blocks read, 14 data blocks written, 9 redo k-bytes read
Thread 1 advanced to log sequence 63 (thread open)
Thread 1 opened at log sequence 63
  Current log# 3 seq# 63 mem# 0: /opt/app/oracle/oradata/demo/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
[3795] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:822726 end:823546 diff:820 (8 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is WE8MSWIN1252
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Sun May 08 15:49:29 2011
QMNC started with pid=20, OS id=3818 
Completed: ALTER DATABASE OPEN
Sun May 08 15:49:36 2011
Starting background process CJQ0
Sun May 08 15:49:36 2011
CJQ0 started with pid=21, OS id=4295 
Setting Resource Manager plan SCHEDULER[0x310D]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Sun May 08 15:49:39 2011
Starting background process VKRM
Sun May 08 15:49:40 2011
VKRM started with pid=24, OS id=4499 
Sun May 08 15:54:34 2011
Starting background process SMCO
Sun May 08 15:54:34 2011
SMCO started with pid=22, OS id=4937 


I can see the "ALTER DATABASE OPEN" and "Completed: ALTER DATABASE OPEN" in alert log, but still only instance is started, database is not open or event mount.

BR,
Milo

[Updated on: Sat, 07 May 2011 19:35]

Report message to a moderator

Re: Only instance is auto start while system reboot [message #506286 is a reply to message #506282] Sat, 07 May 2011 19:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>oracle@vmsuse:~> sqlplus / as sysdba
>SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 10:12:28 2011
>Copyright (c) 1982, 2010, Oracle. All rights reserved.
>Connected to an idle instance.

above can occur when DB is down or ORACLE_SID is incorrect (see below)
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
v112

SQL> !echo $ORACLE_SID
v112

SQL> shutdown  immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Sat May 7 17:46:31 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1553305600 bytes
Fixed Size		    2213656 bytes
Variable Size		 1291847912 bytes
Database Buffers	  251658240 bytes
Redo Buffers		    7585792 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ export ORACLE_SID=FOOBAR
bcm@bcm-laptop:~$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Sat May 7 17:47:19 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> 

Re: Only instance is auto start while system reboot [message #506288 is a reply to message #506286] Sat, 07 May 2011 20:31 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

Hi, BlackSwan
I can't see the info from alert log that db is down. And only one database is setup in this machine. If the sid is not correct, it should only start a instance and what I can see is only related backgroup processes started.

oracle@vmsuse:~> ps -ef | grep ora
root      2542  2416  0 15:48 ?        00:00:00 hald-addon-storage: polling /dev/sr0 (every 16 sec)
root      2546  2416  0 15:48 ?        00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
oracle    3534     1  0 15:49 ?        00:00:00 /opt/app/oracle/product/11gR2/db_1//bin/tnslsnr LISTENER -inherit
oracle    3674     1  0 15:49 ?        00:00:00 ora_pmon_demo
oracle    3679     1  0 15:49 ?        00:00:00 ora_psp0_demo
oracle    3687     1  0 15:49 ?        00:00:32 ora_vktm_demo
oracle    3694     1  0 15:49 ?        00:00:00 ora_gen0_demo
oracle    3699     1  0 15:49 ?        00:00:00 ora_diag_demo
oracle    3704     1  0 15:49 ?        00:00:00 ora_dbrm_demo
oracle    3709     1  0 15:49 ?        00:00:02 ora_dia0_demo
oracle    3714     1  0 15:49 ?        00:00:00 ora_mman_demo
oracle    3721     1  0 15:49 ?        00:00:01 ora_dbw0_demo
oracle    3727     1  0 15:49 ?        00:00:00 ora_lgwr_demo
oracle    3732     1  0 15:49 ?        00:00:01 ora_ckpt_demo
oracle    3737     1  0 15:49 ?        00:00:03 ora_smon_demo
oracle    3742     1  0 15:49 ?        00:00:00 ora_reco_demo
oracle    3747     1  0 15:49 ?        00:00:01 ora_mmon_demo
oracle    3752     1  0 15:49 ?        00:00:01 ora_mmnl_demo
oracle    3757     1  0 15:49 ?        00:00:00 ora_d000_demo
oracle    3762     1  0 15:49 ?        00:00:00 ora_s000_demo
oracle    3818     1  0 15:49 ?        00:00:00 ora_qmnc_demo
oracle    4295     1  0 15:49 ?        00:00:01 ora_cjq0_demo
oracle    4467     1  0 15:49 ?        00:00:00 ora_q000_demo
oracle    4481     1  0 15:49 ?        00:00:00 ora_q001_demo
oracle    4499     1  0 15:49 ?        00:00:06 ora_vkrm_demo
root      4708  4367  0 15:50 ?        00:00:00 sshd: oracle [priv]                                
oracle    4717  4708  0 15:50 ?        00:00:00 sshd: oracle@pts/1                                 
oracle    4718  4717  0 15:50 pts/1    00:00:00 -bash
root      4747  4367  0 15:50 ?        00:00:00 sshd: oracle [priv]                                
oracle    4762  4747  0 15:50 ?        00:00:00 sshd: oracle@pts/2                                 
oracle    4763  4762  0 15:50 pts/2    00:00:00 -bash
oracle    4937     1  0 15:54 ?        00:00:00 ora_smco_demo
oracle    6508  4718  0 16:20 pts/1    00:00:00 sqlplus   as sysdba
oracle    6515  6508  0 16:20 ?        00:00:00 oracledemo (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    9043     1  0 17:04 ?        00:00:00 ora_w000_demo
oracle    9564  4763 25 17:17 pts/2    00:00:00 ps -ef
oracle    9565  4763  0 17:17 pts/2    00:00:00 grep ora


But I notice that when I enter the sqlplus and using "startup" command, it will start the same backgroud processes again.


oracle@vmsuse:~> ps -ef | grep smon
oracle    3737     1  0 15:49 ?        00:00:03 ora_smon_demo
oracle   10393  4763  0 17:27 pts/2    00:00:00 grep smon

oracle@vmsuse:~> export ORACLE_SID=demo
oracle@vmsuse:~> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 17:27:28 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  304807936 bytes
Fixed Size                  2225992 bytes
Variable Size             146802872 bytes
Database Buffers          150994944 bytes
Redo Buffers                4784128 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

oracle@vmsuse:~> ps -ef | grep smon
oracle    3737     1  0 15:49 ?        00:00:03 ora_smon_demo
oracle   10494     1  0 17:27 ?        00:00:00 ora_smon_demo
oracle   10547  4763  0 17:27 pts/2    00:00:00 grep smon
oracle@vmsuse:~> 


I dont know why, it told me that it's a idle instance.

BR,
Milo
Re: Only instance is auto start while system reboot [message #506289 is a reply to message #506288] Sat, 07 May 2011 20:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I do want to THANK you for detailed COPY & PASTE from your efforts otherwise I'd suspect you were misreporting reality.
I admit that I am perplexed & am out of ideas for now.
I have no explanation for why you are seeing what is happening.

I have one long shot idea which should not hurt & may help; then again it may change nothing

#/etc/init.d/oracle
export ORACLE_OWNER=oracle
export ORACLE_HOME=/opt/app/oracle/product/11gR2/db_1
export ORACLE_SID=demo

Change file above to include 3 lines above & then reboot server & report results

[Updated on: Sat, 07 May 2011 20:48]

Report message to a moderator

Re: Only instance is auto start while system reboot [message #506292 is a reply to message #506289] Sat, 07 May 2011 21:19 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

Hi, blackswan
I have try to add the export commands in the /etc/init.d/oracle.

vmsuse:~ # cat !$
cat /etc/init.d/oracle
#!/bin/bash
#
#
#/etc/init.d/oracle
#
#
### BEGIN INIT INFO
# Provides: oracle
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Oracle DB startup script
### END INIT INFO

export ORACLE_OWNER=oracle
export ORACLE_HOME=/opt/app/oracle/product/11gR2/db_1/
export ORACLE_SID=demo

ORACLE_OWNER="oracle"
ORACLE_HOME="/opt/app/oracle/product/11gR2/db_1"

case "$1" in
start)
        echo -n $"Starting Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" && echo "DB started!"
;;

stop)
        echo -n $"Stopping Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" && echo "DB stoped!"
;;

restart)
        echo -n $"Stopping Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" && echo "DB stoped!"
        echo -n $"Starting Oracle DB:"
        su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" && echo "DB started!"
;;

*)
echo $"Usage: $0 {start|stop|restart}"
esac


vmsuse:~ # 



But the problem still exists:

oracle@vmsuse:~> tail -n 20 /opt/app/oracle/product/11gR2/db_1/startup.log 


SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 18:04:53 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> Connected to an idle instance.
SQL> ORACLE instance started.

Total System Global Area  304807936 bytes
Fixed Size                  2225992 bytes
Variable Size             146802872 bytes
Database Buffers          150994944 bytes
Redo Buffers                4784128 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

/opt/app/oracle/product/11gR2/db_1/bin/dbstart: Database instance "demo" warm started.
oracle@vmsuse:~> date
Sun May  8 18:09:01 CST 2011

oracle@vmsuse:~> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 18:10:49 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> 


The processes are started:
oracle@vmsuse:~>  ps -ef | grep ora
root      2542  2418  0 18:04 ?        00:00:00 hald-addon-storage: polling /dev/sr0 (every 16 sec)
root      2545  2418  0 18:04 ?        00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
oracle    3762     1  0 18:04 ?        00:00:00 /opt/app/oracle/product/11gR2/db_1//bin/tnslsnr LISTENER -inherit
oracle    3911     1  0 18:05 ?        00:00:00 ora_pmon_demo
oracle    3916     1  0 18:05 ?        00:00:00 ora_psp0_demo
oracle    3924     1  0 18:05 ?        00:00:02 ora_vktm_demo
oracle    3934     1  0 18:05 ?        00:00:00 ora_gen0_demo
oracle    3939     1  0 18:05 ?        00:00:00 ora_diag_demo
oracle    3944     1  0 18:05 ?        00:00:00 ora_dbrm_demo
oracle    3949     1  0 18:05 ?        00:00:00 ora_dia0_demo
oracle    3954     1  0 18:05 ?        00:00:00 ora_mman_demo
oracle    3959     1  0 18:05 ?        00:00:00 ora_dbw0_demo
oracle    3964     1  0 18:05 ?        00:00:00 ora_lgwr_demo
oracle    3969     1  0 18:05 ?        00:00:00 ora_ckpt_demo
oracle    3974     1  2 18:05 ?        00:00:08 ora_smon_demo
oracle    3979     1  0 18:05 ?        00:00:00 ora_reco_demo
oracle    3984     1  0 18:05 ?        00:00:02 ora_mmon_demo
oracle    3989     1  0 18:05 ?        00:00:00 ora_mmnl_demo
oracle    3997     1  0 18:05 ?        00:00:00 ora_d000_demo
oracle    4002     1  0 18:05 ?        00:00:00 ora_s000_demo
oracle    4064     1  0 18:05 ?        00:00:00 ora_qmnc_demo
oracle    4532     1  0 18:05 ?        00:00:00 ora_q000_demo
oracle    4547     1  0 18:05 ?        00:00:01 ora_cjq0_demo
oracle    4569     1  0 18:05 ?        00:00:00 ora_q001_demo
oracle    4646     1  0 18:05 ?        00:00:00 ora_vkrm_demo
root      4958  4557  0 18:06 ?        00:00:00 sshd: oracle [priv]                                
oracle    4967  4958  0 18:06 ?        00:00:00 sshd: oracle@pts/1                                 
oracle    4968  4967  0 18:06 pts/1    00:00:00 -bash
oracle    5009  4968  0 18:07 pts/1    00:00:00 sqlplus   as sysdba
oracle    5013  5009  0 18:07 ?        00:00:00 oracledemo (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
root      5023  4557  0 18:07 ?        00:00:00 sshd: oracle [priv]                                
oracle    5055  5023  0 18:07 ?        00:00:00 sshd: oracle@pts/2                                 
oracle    5056  5055  0 18:07 pts/2    00:00:00 -bash
oracle    5192     1  0 18:10 ?        00:00:00 ora_smco_demo
oracle    5200     1  0 18:10 ?        00:00:00 ora_w000_demo
oracle    5236  5056 33 18:11 pts/2    00:00:00 ps -ef
oracle    5237  5056  0 18:11 pts/2    00:00:00 grep ora


Anyway, thanks blackswan.
I will keep trying.

BR,
Milo

Re: Only instance is auto start while system reboot [message #506293 is a reply to message #506292] Sat, 07 May 2011 21:36 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If you comment out the line in oratab, so no auto start upon reboot.
does instance behave as desired & expected by manually starting as below?

sqlplus
/ as sysdba
startup
exit
Re: Only instance is auto start while system reboot [message #506295 is a reply to message #506293] Sat, 07 May 2011 22:01 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

you means that I comment out the line in oratab and also disable the /etc/init.d/oracle , then reboot and enter the db manually?
Re: Only instance is auto start while system reboot [message #506296 is a reply to message #506295] Sat, 07 May 2011 22:09 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>you means that I comment out the line in oratab and also disable the /etc/init.d/oracle , then reboot and enter the db manually?
yes
Re: Only instance is auto start while system reboot [message #506297 is a reply to message #506295] Sat, 07 May 2011 22:11 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

Hi, blackswan
This is output after comment out the oratab and disable the /etc/init.d/oracle.

oracle@vmsuse:~> ps -ef | grep ora
root      2545  2421  0 19:03 ?        00:00:00 hald-addon-storage: polling /dev/sr0 (every 16 sec)
root      2547  2421  0 19:03 ?        00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
root      4364  4060  0 19:04 ?        00:00:00 sshd: oracle [priv]                                
oracle    4370  4364  0 19:04 ?        00:00:00 sshd: oracle@pts/1                                 
oracle    4371  4370  1 19:04 pts/1    00:00:00 -bash
oracle    4397  4371  0 19:04 pts/1    00:00:00 ps -ef
oracle    4398  4371  0 19:04 pts/1    00:00:00 grep ora
oracle@vmsuse:~> export ORACLE_SID=demo
oracle@vmsuse:~> 
oracle@vmsuse:~> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Sun May 8 19:04:54 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup    
ORACLE instance started.

Total System Global Area  304807936 bytes
Fixed Size                  2225992 bytes
Variable Size             146802872 bytes
Database Buffers          150994944 bytes
Redo Buffers                4784128 bytes
Database mounted.
Database opened.
SQL> 
SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
demo             OPEN


It seems that the instance can started and database can open with manual way.

BR,
Milo
Re: Only instance is auto start while system reboot [message #506298 is a reply to message #506297] Sat, 07 May 2011 22:20 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I am from old school background.

># service oracle start
I have NEVER started as above & have only done so as below

sqlplus
/ as sysdba
startup
exit

I have my suspicions, but I can not offer any proof about where root cause resides.
Re: Only instance is auto start while system reboot [message #506299 is a reply to message #506298] Sat, 07 May 2011 22:24 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

So you mean the cause may from file /etc/init.d/oracle?
Re: Only instance is auto start while system reboot [message #506300 is a reply to message #506299] Sat, 07 May 2011 22:41 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
The mystery that has me baffled is that the DB is up but it reports you connect to idle instance.
Re: Only instance is auto start while system reboot [message #506301 is a reply to message #506300] Sat, 07 May 2011 22:53 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

And I am directly query something in sqlplus, it tells me that "ORA-01034: ORACLE not available"
When I am trying to startup the database it report "ORA-01102: cannot mount database in EXCLUSIVE mode".
I need to kill the started backgroup processes and manually start the database.

I am still puzzled and no idea how it doesn't work.

BR,
Milo
Re: Only instance is auto start while system reboot [message #506561 is a reply to message #506301] Tue, 10 May 2011 00:06 Go to previous messageGo to next message
snowball
Messages: 229
Registered: April 2006
Location: China
Senior Member

It seems that dbstart and dbshut scripts are not gonna works at this scenario.
So the solution is using a simple startup or shutdown db script instead of the original scripts.
Re: Only instance is auto start while system reboot [message #544775 is a reply to message #506561] Thu, 23 February 2012 13:02 Go to previous message
rosielillies
Messages: 1
Registered: February 2012
Junior Member
Make sure that you have the ORACLE_HOME path set up correctly. Make sure that there is no trailing / at the end of the path. In this case,
according to what you have ORACLE_HOME=/opt/app/oracle/product/11gR2/db_1/ make it ORACLE_HOME=/opt/app/oracle/product/11gR2/db_1
Previous Topic: how to find sql query history
Next Topic: OEM not working
Goto Forum:
  


Current Time: Thu Mar 28 13:38:59 CDT 2024