Unix Technical Forum

Solaris 10 System Boot and Database Startup

This is a discussion on Solaris 10 System Boot and Database Startup within the Oracle Database forums, part of the Database Server Software category; --> Hello, On a Solaris 10 (sparc) system I am unable to get my Oracle 10 listener to start using ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 06:05 AM
Michael42
 
Posts: n/a
Default Solaris 10 System Boot and Database Startup

Hello,

On a Solaris 10 (sparc) system I am unable to get my Oracle 10
listener to start using a technique that I commonly use on Solaris 8
systems. My database comes up OK and the script I have will start both
the database and listener if I run it manually AFTER the system has
booted. In the /ect/init.d my is basically:

================================================== ================
#!/bin/sh
#
# CREATE pfile'/usr1/home/oracle/product/10.2/dbs/initDB1.ora' FROM
spfile;

# Set Variables ORA_HOME should be equivalent to the ORACLE_HOME
ORA_HOME=/usr1/oracle/product/920
ORA_OWNER=oracle
LOGDIR=/usr1/oracle/admin

case "$1" in
'start')
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart 2>&1 >
$LOGDIR/dbstart.log
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" 2>&1 >
$LOGDIR/lsnrstrt.log
;;

'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" 2>&1 >
$LOGDIR/lsnrstp.log
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut 2>&1 >
$LOGDIR/dbshut.log
;;
esac
================================================== ================

On system boot when it runs, the error I am getting is that the network
is unavailable.

Can anyone please share your Sun UNIX script that starts your Oracle
database and listener (and any required OS changes etc.)?

Thanks,

Michael42

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 06:05 AM
Bob Jones
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup


"Michael42" <melliott42@yahoo.com> wrote in message
news:1154828871.959799.29290@i3g2000cwc.googlegrou ps.com...
> Hello,
>
> On a Solaris 10 (sparc) system I am unable to get my Oracle 10
> listener to start using a technique that I commonly use on Solaris 8
> systems. My database comes up OK and the script I have will start both
> the database and listener if I run it manually AFTER the system has
> booted. In the /ect/init.d my is basically:
>
> ================================================== ================
> #!/bin/sh
> #
> # CREATE pfile'/usr1/home/oracle/product/10.2/dbs/initDB1.ora' FROM
> spfile;
>
> # Set Variables ORA_HOME should be equivalent to the ORACLE_HOME
> ORA_HOME=/usr1/oracle/product/920
> ORA_OWNER=oracle
> LOGDIR=/usr1/oracle/admin
>
> case "$1" in
> 'start')
> su - $ORA_OWNER -c $ORA_HOME/bin/dbstart 2>&1 >
> $LOGDIR/dbstart.log
> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" 2>&1 >
> $LOGDIR/lsnrstrt.log
> ;;
>
> 'stop')
> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" 2>&1 >
> $LOGDIR/lsnrstp.log
> su - $ORA_OWNER -c $ORA_HOME/bin/dbshut 2>&1 >
> $LOGDIR/dbshut.log
> ;;
> esac
> ================================================== ================
>
> On system boot when it runs, the error I am getting is that the network
> is unavailable.
>
> Can anyone please share your Sun UNIX script that starts your Oracle
> database and listener (and any required OS changes etc.)?
>
> Thanks,
>
> Michael42
>


If you can start it manually, then your script is working. You just need to
make sure the script is run after the network in your boot process.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 06:05 AM
Michael42
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

Bob,

Thanks for the response.

>> If you can start it manually, then your script is working. You just need to

make sure the script is run after the network in your boot process.

BINGO! :-)

....but where is that in Solaris 10?

In Solaris 8 know it is controlled via the proper rcn.d run level dir
(rc2.d and rc3.d etc.) and the appropriate Snn link in the rc.n
directory to your script (/ect/init.d/dbora). So S10StartNetworkStuff
then S99StartOracle would do the trick.

I could be wrong, but I think the rules have changed in Solaris 10.

Any suggestions?


Thanks again,

Michael42

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 06:05 AM
Mladen Gogala
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

On Sat, 05 Aug 2006 19:35:03 -0700, Michael42 wrote:

> Bob,
>
> Thanks for the response.
>
>>> If you can start it manually, then your script is working. You just need to

> make sure the script is run after the network in your boot process.
>
> BINGO! :-)
>
> ...but where is that in Solaris 10?
>


Slowaris 10 changed the architecture and now has "services", like another
OS, sold by a company from Redmond, WA, whose name is uttered only with
utmost fear and terror. I'm afraid that Saruman has sold out. Forget about
/etc/init.d and the classic beauty of a full-blooded Unix.


--
http://www.mgogala.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 06:06 AM
machao
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

Hi,
You can't startup listener in this way.
You muset set environment varible.

case "$1" in
'start')
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart 2>&1 >
$LOGDIR/dbstart.log
su - $ORA_OWNER -c "$ORA_HOME/bin/your_listener.sh " 2>&1 >
$LOGDIR/lsnrstrt.log


------------------your_listener.sh
ORACLE_HOME=<your_oracle_home>
ORACLE_BASE=<your_oracle_base>
export ORACLE_HOME ORACLE_BASE
$ORACLE_HOME/bin/lsnrctl start
----------------end;---------------------


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-25-2008, 06:06 AM
machao
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

Sorry,
I gave a incorrect suggestion.
Pls ignore it.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-25-2008, 06:06 AM
=?utf-8?q?Lothar_Armbr=C3=BCster?=
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

"Michael42" <melliott42@yahoo.com> writes:

> Bob,
>
> Thanks for the response.
>
>>> If you can start it manually, then your script is working. You just need to

> make sure the script is run after the network in your boot process.
>
> BINGO! :-)
>
> ...but where is that in Solaris 10?
>
> In Solaris 8 know it is controlled via the proper rcn.d run level dir
> (rc2.d and rc3.d etc.) and the appropriate Snn link in the rc.n
> directory to your script (/ect/init.d/dbora). So S10StartNetworkStuff
> then S99StartOracle would do the trick.
>
> I could be wrong, but I think the rules have changed in Solaris 10.
>
> Any suggestions?
>

Hello Michael42,
on my Solaris 10 box, I linked /etc/init.d/dbora to /etc/rc3.d/S99dbora and /etc/rc0.d/K01dbora.
That seems to work.

But I did some changes on the dbora script. Here is my version:

----------------> cut <----------------------------
#! /usr/bin/sh -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/usr/ora/oracle/10.2.0/db_1
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
if [ "$PLATFORM" = "HP-UX" ] ; then
remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
exit
else
# rsh $HOST -l $ORACLE $0 $1 ORA_DB
su - $ORACLE -c "$0 $1 ORA_DB"
exit
fi
fi
#
case $1 in
'start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME &
$ORACLE_HOME/bin/isqlplusctl start &
$ORACLE_HOME/bin/emctl start dbconsole &
( ORACLE_HOME=/usr/ora/oracle/10.2.0/companion_1 ; $ORACLE_HOME/opmn/bin/opmnctl startall ) &
;;
'stop')
( ORACLE_HOME=/usr/ora/oracle/10.2.0/companion_1 ; $ORACLE_HOME/opmn/bin/opmnctl stopall ) &
$ORACLE_HOME/bin/emctl stop dbconsole &
$ORACLE_HOME/bin/isqlplusctl stop &
$ORACLE_HOME/bin/dbshut $ORACLE_HOME
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit

-----------------> cut <-------------------------

Hope that helps,
Lothar

--
Lothar Armbrüster | lothar.armbruester@t-online.de
Hauptstr. 26 |
65346 Eltville |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-25-2008, 06:06 AM
Ceri Davies
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

On 2006-08-06, Mladen Gogala <gogala@sbcglobal.net> wrote:
> On Sat, 05 Aug 2006 19:35:03 -0700, Michael42 wrote:
>
>> Bob,
>>
>> Thanks for the response.
>>
>>>> If you can start it manually, then your script is working. You just need to

>> make sure the script is run after the network in your boot process.
>>
>> BINGO! :-)
>>
>> ...but where is that in Solaris 10?
>>

>
> Slowaris 10 changed the architecture and now has "services", like another
> OS, sold by a company from Redmond, WA, whose name is uttered only with
> utmost fear and terror. I'm afraid that Saruman has sold out. Forget about
> /etc/init.d and the classic beauty of a full-blooded Unix.


Nonsense. SMF has complete backward compatibility for /etc/init.d, and
is completely better than it at the same time. And that's the opinion
of a BSD fanatic. I suspect that your opinion is borne of ignorance of
the the new feature set.

Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-25-2008, 06:06 AM
Ceri Davies
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

On 2006-08-06, Michael42 <melliott42@yahoo.com> wrote:
> Hello,
>
> On a Solaris 10 (sparc) system I am unable to get my Oracle 10
> listener to start using a technique that I commonly use on Solaris 8
> systems. My database comes up OK and the script I have will start both
> the database and listener if I run it manually AFTER the system has
> booted. In the /ect/init.d my is basically:
>
>================================================= =================
> #!/bin/sh
> #
> # CREATE pfile'/usr1/home/oracle/product/10.2/dbs/initDB1.ora' FROM
> spfile;
>
> # Set Variables ORA_HOME should be equivalent to the ORACLE_HOME
> ORA_HOME=/usr1/oracle/product/920
> ORA_OWNER=oracle
> LOGDIR=/usr1/oracle/admin
>
> case "$1" in
> 'start')
> su - $ORA_OWNER -c $ORA_HOME/bin/dbstart 2>&1 >
> $LOGDIR/dbstart.log
> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" 2>&1 >
> $LOGDIR/lsnrstrt.log
> ;;


For a start, that listener seem to be a 9i one if it's in
/usr1/oracle/product/920/bin.

Secondly, the listener startup in 10g seems to require that ORACLE_HOME
is set, which is probably why it works when you run it manually.

See
http://typo.submonkey.net/articles/2...r-dbms-vendors
for a rant I wrote about this some time ago. It also has a solution.

Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-25-2008, 06:06 AM
Ceri Davies
 
Posts: n/a
Default Re: Solaris 10 System Boot and Database Startup

On 2006-08-07, Ceri Davies <ceri_usenet@submonkey.net> wrote:
> On 2006-08-06, Michael42 <melliott42@yahoo.com> wrote:
>> Hello,
>>
>> On a Solaris 10 (sparc) system I am unable to get my Oracle 10
>> listener to start using a technique that I commonly use on Solaris 8
>> systems. My database comes up OK and the script I have will start both
>> the database and listener if I run it manually AFTER the system has
>> booted. In the /ect/init.d my is basically:
>>
>>================================================ ==================
>> #!/bin/sh
>> #
>> # CREATE pfile'/usr1/home/oracle/product/10.2/dbs/initDB1.ora' FROM
>> spfile;
>>
>> # Set Variables ORA_HOME should be equivalent to the ORACLE_HOME
>> ORA_HOME=/usr1/oracle/product/920
>> ORA_OWNER=oracle
>> LOGDIR=/usr1/oracle/admin
>>
>> case "$1" in
>> 'start')
>> su - $ORA_OWNER -c $ORA_HOME/bin/dbstart 2>&1 >
>> $LOGDIR/dbstart.log
>> su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" 2>&1 >
>> $LOGDIR/lsnrstrt.log
>> ;;

>
> For a start, that listener seem to be a 9i one if it's in
> /usr1/oracle/product/920/bin.
>
> Secondly, the listener startup in 10g seems to require that ORACLE_HOME
> is set, which is probably why it works when you run it manually.
>
> See
> http://typo.submonkey.net/articles/2...r-dbms-vendors
> for a rant I wrote about this some time ago. It also has a solution.


Actually, the script given there may not work - see note 4 about lsnrctl
requiring ORACLE_HOME to be set - but I just got fed up of writing about
it At least there should be enough info in there to help you muddle
through it.

Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com