1) In etcoratab, the file should be generated by executing the root. sh command at the end of database installation. Pwdb: Oracleprocduct10.2db _ 1: Y $ ORA
1) in/etc/oratab, the file should be generated by executing the root. sh command at the end of database installation. Pwdb:/Oracle/procduct/10.2/db_1/: Y $ ORA
1)
In the/etc/oratab file, the file is generated by the root. sh Command executed last when the database is installed.
Pwdb:/Oracle/procduct/10.2/db_1/: Y
$ ORACLE_SID: $ ORACLE_HOME:
2)
Add/etc/rc. local
Su-oracle-c 'dbstart'
Su-oracle-c 'lsnrctl start'
This should be executed by the specified user at startup,
Similarly, some other commands can also be written here and executed at startup.
3)
In the $ ORACLE_HOME/bin/dbstart file, add
ORACLE_HOME_LISTNER = '/ade /....'
Change
ORACLE_HOME_LISTNER = $ ORACLE_HOME
Step 3: I wrote the information on the network, but I didn't know what the function is,
It may be for the old version.
After completing these steps, restart linux. After the startup is complete, you can directly connect the database to discover that the data and tns have been started.
Another method is as follows:
Add a file in/etc/rc. d/init. d. Here is oradb.
The content is as follows. I copied it from the Internet and made some modifications.
####################################
#! /Bin/bash
# Chkconfig: 35 95 1
# Description: init script. to start/stop oracle database 10g, TNS listener, EMS
#
#
# Set the variable value as needed:
Export ORACLE_BASE =/u01
Export ORACLE_HOME = $ ORACLE_BASE/oracle
Export ORACLE_SID = huang
Export PATH =/home/oracle/bin: $ ORACLE_HOME/bin: $ PATH
Export ORACLE_USER = oracle
# Perform the following two operations based on the $1 parameter: Start and close:
Case $1 in
Start)
Su-"$ ORACLE_USER" < Lsnrctl start
Dbstart
EOS
# Start oem
# Emctl start dbconsole
EOO
;;
Stop)
Su-"$ ORACLE_USER" < Lsnrctl stop
Dbshut
EOS
# Disable ocm
# Emctl stop dbconsole
EOO
;;
*)
# Other input, with the syntax format
Echo "Usage: $0 {start | stop }"
;;
Esac
###################################
Save and modify the group and permissions.
Chown oracle: oinstall oradb
Chmod 755 oradb
Chkconfig oradb on
Chkconfig -- list oradb
You can start or stop a service
Service oradb start
Service oradb stop