Solved

orq

Posted on 2006-11-08
9
446 Views
Last Modified: 2008-02-01
What is stored in oratab file?
0
Comment
Question by:dbaseek
9 Comments
 

Author Comment

by:dbaseek
ID: 17904157
please
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17904325
0
 
LVL 18

Expert Comment

by:rbrooker
ID: 17904340
database sids, what home they are associated with and whether they will start / stop when dbstart and dbshut are invoked... :)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Expert Comment

by:nmgzw
ID: 17904644
why don't you browse it yourself,it commonly only contain ORACLE_SID:ORACLE_HOME:Y[N]
0
 
LVL 47

Accepted Solution

by:
schwertner earned 500 total points
ID: 17904729
ORATAB and DBORA are used to start/stop DB when you start/stop Unix/Linux.

This is for Linux:

1. Update 'oratab' (under /etc or /var/opt/oracle) as:
 
   <SID>:<ORACLE_HOME>:Y
 
where Y states that the database can be started up and shutdown using  
dbstart/dbshut.
 
2. Create the service script:
 
     /etc/init.d/dbora
 
Note: In Red Hat Advanced Server 2.1, the /etc/init.d is is a symbolic link to  
      /etc/rc.d/init.d  
 
Content of the script is as follows:
 
  #!/bin/bash
  #
  # chkconfig: 35 99 10    
  # description: Starts and stops Oracle processes
  #
  # Set ORA_HOME to be equivalent to the $ORACLE_HOME
  # from which you wish to execute dbstart and dbshut;
  #
  # Set ORA_OWNER to the user id of the owner of the
  # Oracle database in ORA_HOME.
  #
  ORA_HOME=<Type your ORACLE_HOME in full path here>
  ORA_OWNER=<Type your Oracle account name here>
 
  case "$1" in
    'start')
       # Start the Oracle databases:
       # The following command assumes that the oracle login
       # will not prompt the user for any values
       su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
       # Start the TNS Listener
       su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
       # Start the Intelligent Agent
       if [ -f $ORA_HOME/bin/agentctl ]; then
          su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl start"
       else
          su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl dbsnmp_start"
       fi
       # Start Management Server
       if [ -f $ORA_HOME/bin/oemctl ]; then
          su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl start oms"
       fi
       # Start HTTP Server
       if [ -f $ORA_HOME/Apache/Apache/bin/apachectl ]; then
          su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl start"
       fi
       touch /var/lock/subsys/dbora
       ;;
    'stop')
       # Stop HTTP Server
       if [ -f $ORA_HOME/Apache/Apache/bin/apachectl ]; then
          su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl stop"
       fi
       # Stop the Intelligent Agent
       if [ -f $ORA_HOME/bin/agentctl ]; then
          su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl stop"
       else
          su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl dbsnmp_stop"
       fi
       # Stop the TNS Listener
       su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
       # Stop the Oracle databases:
       # The following command assumes that the oracle login
       # will not prompt the user for any values
       su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
       rm -f /var/lock/subsys/dbora
       ;;
  esac
  # End of script dbora
 
NOTE 1:
The lines:
 
  # chkconfig: 35 99 10    
  # description: Starts and stops Oracle database
 
are mandatory since they describe the characteristics of the service where:
 
  35 means that the service will be started in init levels 3 and 5 and will be  
     stopped in other levels.
  99 means that the service will be started at the near end of the init level  
     processing
  10 means that the service will be stopped at the near end of the init level  
     processing
 
NOTE 2:  
The Management Server is not shut down during service stop since it requires  
interaction and there is no harm in system killing the processes since the  
database is shut down already.
 
 
3. Set script permissions:
 
    chmod 755 /etc/init.d/dbora
 
 
3. Register the Service
 
    /sbin/chkconfig --add dbora
 
This action registers the service to the Linux service mechanism. On SuSE SLES7
and Red Hat Advanced Server 2.1 it will arrange symbolic links under  
rc<runlevel>.d directories to /etc/init.d/dbora script.
 
On SuSE SLES7 the following symbolic links are created:
 
/etc/init.d/rc0.d/K10dbora
/etc/init.d/rc1.d/K10dbora
/etc/init.d/rc2.d/K10dbora
/etc/init.d/rc3.d/S99dbora
/etc/init.d/rc4.d/K10dbora
/etc/init.d/rc5.d/S99dbora
/etc/init.d/rc6.d/K10dbora
 
 
On Red Hat Advanced Server 2.1 the following symbolic links are created:
 
/etc/rc.d/rc0.d/K10dbora
/etc/rc.d/rc1.d/K10dbora
/etc/rc.d/rc2.d/K10dbora
/etc/rc.d/rc3.d/S99dbora
/etc/rc.d/rc4.d/K10dbora
/etc/rc.d/rc5.d/S99dbora
/etc/rc.d/rc6.d/K10dbora
 
 
The symbolic links are not created in United Linux 1.0 (SuSE SLES8 Edition)  
with the 'chkconfig -add' command.  
To have the symbolic links created run the following in addition:
 
   /sbin/chkconfig --set dbora 35
 
After this action, the following symbolic links will be created pointing  
to /etc/init.d/dbora script:
 
/etc/init.d/rc3.d/S01dbora
/etc/init.d/rc3.d/K22dbora
/etc/init.d/rc5.d/S01dbora
/etc/init.d/rc5.d/K22dbora
 
 
In all cases, the 'dbora' service will be running in runlevels 3,5 and it will  
be stopped in other runlevels (i.e. 0,1,2,4,6).
 


0
 

Author Comment

by:dbaseek
ID: 17912844
THANKS
0
 

Author Comment

by:dbaseek
ID: 17912877
i have found solution to my questions thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now