Home » Infrastructure » Unix » Automatic database startup and shutdown (solaris 10 sparc)
Automatic database startup and shutdown [message #420795] Wed, 02 September 2009 05:21 Go to next message
sailesh
Messages: 72
Registered: September 2007
Location: MAURITIUS
Member
hi all,

i have an oracle 10 db. i am configuring the automatic dbstart on the solaris server. while testing the scripts manually, i am getting an error;

SUN6>/etc/init.d/dbstart start
/etc/init.d/dbstart: test: argument expected
SUN6>


please help.

Sailesh
Re: Automatic database startup and shutdown [message #420834 is a reply to message #420795] Wed, 02 September 2009 09:43 Go to previous messageGo to next message
TomG
Messages: 11
Registered: December 2008
Junior Member
Hi

I don't know the content of your script but I'm not sure you should run this one manually.
Did you try the $ORACLE_HOME/bin/dbstart instead ?
This should raise the instances pointed by "Y"(es) in oratab file.

Tom


Re: Automatic database startup and shutdown [message #420839 is a reply to message #420834] Wed, 02 September 2009 10:07 Go to previous messageGo to next message
sailesh
Messages: 72
Registered: September 2007
Location: MAURITIUS
Member
Hi,

I have been able to start the two instances from $ORACLE_HOME/bin/dbstart.

i had to export oracle_sid two times, for both instance.


Thanks,


Sailesh
Re: Automatic database startup and shutdown [message #420848 is a reply to message #420795] Wed, 02 September 2009 10:56 Go to previous messageGo to next message
sailesh
Messages: 72
Registered: September 2007
Location: MAURITIUS
Member
Hi,
The database started when i did a ps -ef|grep smon. But after verifying the log files, i got an error:

bash-3.00# more /oracle/app/oracle/product/10gdb/startup.log

./dbstart: Starting up database "webcms"
Wed Sep 2 19:24:15 MUT 2009


SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 2 19:24:16 2009

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

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

Total System Global Area 1660944384 bytes
Fixed Size 1979104 bytes
Variable Size 721423648 bytes
Database Buffers 922746880 bytes
Redo Buffers 14794752 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP and Data Mining options

./dbstart: Database instance "webcms" warm started.

./dbstart: Starting up database "ghtest"
Wed Sep 2 19:24:28 MUT 2009


SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 2 19:24:28 2009

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

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

Total System Global Area 1325400064 bytes
Fixed Size 1978464 bytes
Variable Size 335548320 bytes
Database Buffers 973078528 bytes
Redo Buffers 14794752 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode



SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Produc
tion
With the Partitioning, OLAP and Data Mining options

./dbstart: Database instance "ghtest" warm started


can just help?

Sailesh
Re: Automatic database startup and shutdown [message #420856 is a reply to message #420795] Wed, 02 September 2009 11:26 Go to previous messageGo to next message
BlackSwan
Messages: 22512
Registered: January 2009
Senior Member
env | sort
ORACLE_SID=ghtest
export ORACLE_SID
sqlplus
/ as sysdba
shutdown abort
startup
exit

CUT lines above & PASTE into command/terminal window


CUT commands & results from terminal window & PASTE back here
Re: Automatic database startup and shutdown [message #420876 is a reply to message #420856] Wed, 02 September 2009 23:24 Go to previous messageGo to next message
sailesh
Messages: 72
Registered: September 2007
Location: MAURITIUS
Member
hi,

Please find results:

SUN6>pwd
/oracle/app/oracle/product/10gdb
SUN6>env | sort
ORACLE_SID=ghtest
export ORACLE_SID
sqlplus
/ as sysdba
shutdown abort
startup
exitHOME=/home/oracle
HOSTNAME=sun6
HZ=100
LANG=C
LD_LIBRARY_PATH=:/oracle/app/oracle/product/10gdb/lib:/oracle/app/oracle/product/10gdb/network/lib
LOGNAME=oracle
MAIL=/var/mail/oracle
ORACLE_BASE=/oracle/app/oracle
ORACLE_HOME=/oracle/app/oracle/product/10gdb
ORACLE_SID=ghtest
PATH=/oracle/app/oracle/product/10gdb/bin:/usr/bin:/usr/sfw/bin:/usr/bin:/usr/ucb:/etc:.
SHELL=/bin/sh
TERM=xterm
TZ=Indian/Mauritius
SUN6>SUN6>SUN6>
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 3 08:21:05 2009

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

Enter user-name:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> ORACLE instance shut down.
SQL> ORACLE instance started.

Total System Global Area 1325400064 bytes
Fixed Size 1978464 bytes
Variable Size 335548320 bytes
Database Buffers 973078528 bytes
Redo Buffers 14794752 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode


SQL>
Re: Automatic database startup and shutdown [message #420981 is a reply to message #420795] Thu, 03 September 2009 09:51 Go to previous messageGo to next message
BlackSwan
Messages: 22512
Registered: January 2009
Senior Member
When I do
env | sort
I see
USER=
USERNAME=
plus additional variables at end of list.

I wanted to see which OS user was invoking the DB startup.

http://www.orafaq.com/forum/t/40030/0/
Re: Automatic database startup and shutdown [message #421055 is a reply to message #420981] Fri, 04 September 2009 00:12 Go to previous messageGo to next message
sailesh
Messages: 72
Registered: September 2007
Location: MAURITIUS
Member
Hi,

when using dbstart, normally it is root. But this is done as oracle;

env | sort
ORACLE_SID=ghtest
export ORACLE_SID
sqlplus
/ as sysdba
shutdown abort
startup
exit

Thanks,

Sailesh
Re: Automatic database startup and shutdown [message #427201 is a reply to message #421055] Wed, 21 October 2009 09:34 Go to previous message
scripter
Messages: 6
Registered: October 2009
Location: India
Junior Member
To shutdown oracle database from UNIX shell script


sqlplus -s "/ as sysdba" << EOF
shutdown immediate;
exit;
EOF

Regards,
Bhagya

[Updated on: Wed, 21 October 2009 10:47] by Moderator

Report message to a moderator

Previous Topic: Migrating 10.7 /8i Apps to Solaris 10/Solaris 8 container
Next Topic: Beginner:: Installation of oracle 10g on solaris 10
Goto Forum:
  


Current Time: Mon Jul 28 07:57:25 CDT 2014

Total time taken to generate the page: 0.11277 seconds