1. Manual start method:
$ ORACLE_HOME/bin/LSNRCTL start
The listener continues to run after it is started.
Sqlplus/nolog
SQL> Conn/As sysdba
SQL> startup
The database has been started...
2. automatically start the database
Automatic Start is nothing more than a script. You can write a script yourself to run the script, or enable him to automatically execute the script at startup. The method is flexible, but the key is to modify the content of the two files.
1)/etc/oratab
Change orcl:/home/vkz (username)/Oracle/oracle11g/product/11.2.0/dbhome_1: n to: Y.
Different installation directories may have different paths before/product, which will be automatically generated after installation. Just change n to y.
2)/$ ORACLE_HOME/bin/dbstart
After opening it with vim, We can find oracle_home_listner. Here I write = $1, so it is impossible to run the script directly by running dbstart. Here we can change it to = $ ORACLE_HOME.
You can also set a parameter $ ORACLE_HOME when running dbstart.
The rest is to write an unlocking script in the/etc/init. d directory... very simple :)
Note:
Oracle provides three files for configuring Automatic startup of the Oracle Database Service:
/Etc/oratab
$ ORACLE_HOME/bin/dbstart
$ ORACLE_HOME/bin/dbshut
The three files are described as follows:
/Etc/oratab
---- Specify the database to be automatically started and closed in this file.
$ ORACLE_HOME/bin/dbstart
---- Read the content in the oratab file, start the corresponding database, and start the network listenerProgram.
$ ORACLE_HOME/bin/dbshut
---- Read the content in the oratab file, close the corresponding database, and disable the network listener.