softsoli.blogg.se

Oracle start up
Oracle start up















The latest version of the documents have reverted the using the "su" command. The "runuser" Commandįor a time the Oracle 12c documentation recommended using the "runuser" command in the "dbora" service. This method can also be used for 11g databases that are not using ASM or RAC. As a result, I prefer to use the "su" command method. This can be quite problematic when attempting to use this method under later Linux distributions, where rsh is deprecated.

ORACLE START UP INSTALL

# Install the rhs and rsh-server packages from the OS CD/DVD. This method relies on the presence of an RSH server, which requires additional packages and configuration. # Change the value of ORACLE to the login name of the

oracle start up

# Change the value of ORACLE_HOME to specify the correct Oracle home In Oracle 10g release 2, the dbstart command includes an automatic start of the listener, so there are some differences between the two versions, but the following represents Oracle's preferred method for Oracle 10g.Ĭreate a file called "/etc/init.d/dbora" as the root user, containing the following. With Oracle 10g, Oracle switched from recommending the "su" command to the "rsh" command. I have never liked or used this approach on a real system. Later database versions switched back to using the "su" command. Some of the Oracle 10g documentation recommends using the "rsh" command in the "dbora" service. Su $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" Su $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" & The relevant instances should now startup/shutdown automatically at system startup/shutdown.įor Oracle 9i the dbstart and dbshut commands didn't control the listener, so listener management had to be done separately, as shown below. Su $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" Su $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" & # Remove "&" if you don't want startup as a background process. # Set ORA_OWNER to the user id of the owner of the # from which you wish to execute dbstart and dbshut # Set ORA_HOME to be equivalent to the $ORACLE_HOME # description: Oracle auto start-stop script. TSH1:/u01/app/oracle/product/12.2.0.1/db_1:YĬreate a file called "/etc/init.d/dbora" as the root user, containing the following code. Once the instance is created, edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'. It will work for RHEL7/OL7, but I prefer to use the systemd services. I still use this method for Oracle 12c on OL6. It can be used on any RHEL-style distribution, including Oracle Linux, up to an including RHEL7. The following method for automating database startup and shutdown of Oracle instances on Linux works equally well for Oracle 9i, 10g, 11G and 12c. The systemd example assumes you have the scrips defined above in the "/home/oracle/scripts/" directory present. If you prefer to use systemd directly, you can follow the instructions provided here. You can continue to use the existing methods shown below for creating a service to auto-start Oracle, as systemd is backwards compatible. With the introduction of RHEL7/OL7, services are now managed using systemd. You can start and stop the database using the service, which is what will happen on a reboot. Use the chmod command to set the privileges to 750.Īssociate the "dbora" service with the appropriate run levels and set it to auto-start using the following command. Su $ORA_OWNER -c "/home/oracle/scripts/stop_all.sh > /home/oracle/scripts/startup_shutdown.log 2>&1" # will not prompt the user for any values # The following command assumes that the oracle login Make sure the ownership and permissions are correct.Ĭat > /home/oracle/scripts/start_all.sh /home/oracle/scripts/stop_all.sh > /home/oracle/scripts/startup_shutdown.log 2>&1" & Adjust the contents according to your installation.Ĭat > /home/oracle/scripts/setEnv.sh > /home/oracle/.bash_profileĬreate a "start_all.sh" and "stop_all.sh" script that can be called from a startup/shutdown service. This is an example from a 12.2 installation. If you want to manually create these files, rather than using the cat command, remember to remove the "\" characters before the "$" characters.Ĭreate an environment file called "setEnv.sh".

oracle start up

The scripts are created using the cat command, with all the "$" characters escaped.















Oracle start up