How to set up legacy services right on Solaris 10 | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

How to set up legacy services right on Solaris 10

Solaris


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-03-2007
duke0001 duke0001 is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 31 March 2014, 4:56 PM EDT
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
How to set up legacy services right on Solaris 10

I want to add auto startup and shutdown script to Solaris 10's legacy services as they run in Solaris 9 or in Linux.

To make this work, I created the crontrol script in /etc/init.d and then link it to /etc/rc0.d and /etc/rc2.d directories. rc0.d is for shutdown and rc2.d is for srat. After I reboot the Solaris 10 box, I went to /var/svc/log directory to check these log files: milestone-multi-user:default.log, rec5.log and so on. I have found that shutdown part in control script worked. But the startup part in the control script didn't work. The message was like: Excuting legacy init script "/etc/rc2.d/S99dbora", Oracle Startup: cannot start. In the next line, log file told me this: legacy init script "/etc/rc2.d/S99dbora" exited with return code 0. Why the second part of code in the same script worked (shutdown) and the first part (startup) didn't work? What is wrong on my settings? Anyone knows about this, please help. Thank you very much in advance.
Sponsored Links
    #2  
Old 01-03-2007
Tornado's Avatar
Tornado Tornado is offline Forum Advisor  
Registered User
 
Join Date: Nov 2006
Last Activity: 23 October 2013, 9:08 PM EDT
Location: Melbourne
Posts: 261
Thanks: 1
Thanked 11 Times in 8 Posts
After the server has booted and Oracle has failed to start, does running the start scripts work ?

ie:
/etc/rc2.d/S99dbora start

Test this and if it does, maybe it needs to run via rc3 not rc2
Sponsored Links
    #3  
Old 01-04-2007
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
 
Join Date: Jun 2006
Last Activity: 1 December 2008, 8:39 AM EST
Location: Madrid (Spain)
Posts: 531
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by Tornado
After the server has booted and Oracle has failed to start, does running the start scripts work ?

ie:
/etc/rc2.d/S99dbora start

Test this and if it does, maybe it needs to run via rc3 not rc2
Take also into account that, when booting, is root who run the scripts. Perhaps you need to run your script as another user (oracle, for instance)...

Regards.
    #4  
Old 01-04-2007
duke0001 duke0001 is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 31 March 2014, 4:56 PM EDT
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Tornado, grial:

Thanks so much for your advice. I have followed your instruction to test as:
/etc/rc2.d/S99dbora, returning message is: Oracle startup: cnanot start. Then I linked dbora to rc3.d as S99dbora and tested as /etc/rc3.d/S99dbora. I got the same message: Oracle startup: cannot start. Then I checked user to run the script. Since I created dbora as root user, etc - run by sys, rc2 - root, rc2.d - sys, rc3 -root, rc3.d - sys, S99dbora - root under rc2.d or rc3.d. These settings were generated by installation. Should I chown S99dbora to be run by oracle or group user dba? Thanks.
Sponsored Links
    #5  
Old 01-04-2007
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
 
Join Date: Jun 2006
Last Activity: 1 December 2008, 8:39 AM EST
Location: Madrid (Spain)
Posts: 531
Thanks: 0
Thanked 1 Time in 1 Post
Try to run it like this:

Code:
su - oracle -c "/etc/init.d/dbora start"

or whatever Oracle is run as.
You may want to create a "wrapper" script to do so...
Sponsored Links
    #6  
Old 01-04-2007
duke0001 duke0001 is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 31 March 2014, 4:56 PM EDT
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
grial:

I run #su - oracle -c "/etc/init.d/dbora start". Returning message is: Ksh: /etc/init.d/dbora cannot execute. Because root is bash shell and oracle is korn shell, the dbora was created by root, not oracle. is this the reason? And what is the wrapper script?
Sponsored Links
    #7  
Old 01-04-2007
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
 
Join Date: Jun 2006
Last Activity: 1 December 2008, 8:39 AM EST
Location: Madrid (Spain)
Posts: 531
Thanks: 0
Thanked 1 Time in 1 Post
That's, most probably, a perms issue. Just chmod it to allow execution to the Oracle user.

A wrapper script, in your case, would be another script that calls the original one using "su". That new script is the one you would use to start/stop Oracle during the boot process. For example:

Code:
#!/bin/ksh
/usr/bin/su - oracle -c "/etc/init.d/dbora $1"

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Legacy Ultra60 with Solaris 5.7 SCSI device reverse engineering obsoleteStuff Solaris 0 08-19-2011 10:03 PM
DNS Services on Solaris quan0509 Solaris 1 12-27-2008 03:47 AM
services, solaris 10 earlysame55 UNIX for Advanced & Expert Users 4 07-04-2007 04:05 PM
Unix Services (Solaris 9) BCarlson Security 4 10-31-2005 11:12 AM



All times are GMT -4. The time now is 05:52 PM.