Original link: http://hi.baidu.com/lgnemo/blog/item/481c0266faff6622aa184cb5.html Oracle database is heavyweight, its management is very complex, Organize the startup and shutdown steps on the Linux platform.
After you install Oracle, you need to create Oracle system users and add several environment variables to the. Bash_profile below/home/oracle: Oracle_sid,oracle_base,oracle_home. Like what:
Export Oracle_sid=test export Oracle_base=oracle_install_dir export oracle_home=xxx
Start Step: Note that the $ represents the shell command prompt, where Oracle is more than 9.0 version. $ su-oracle $ sqlplus/nolog sql> conn/as sysdba sql> startup (generally no need to add parameters, just set environment variable) sql> quit (Exit SQL Mode) $ LSN Rctl start (start listener) turn off Oracle $ lsnrctl Stop (shutdown listener, before which you should close the application) $ sqlplus/nolog sql>shutdown its parameters: Shutdown has four parameters, four parameters The meanings are as follows:
Normal needs to wait for all users to disconnect
Immediate waits for the user to complete the current statement
Transactional waits for the user to complete the current transaction
Abort does not do any waiting, directly closes the database
Normal needs to shut down the database task after all connected users are disconnected, so sometimes it looks as if the command is not running. New connections are not allowed after this command is executed
Immediate does not allow new users to connect after the user executes the executed statement and disconnects the user.
Transactional is disconnected after supporting the execution of the current thing and does not allow new users to connect to the database.
Abort performs a forced disconnect and closes the database directly.
The first three ways of losing user data are not returned. The fourth kind is not recommended in the case of no already.
Frequently encountered problems:
1 permissions problem, solution, switch to Oracle user;
2 does not close the listener, workaround: Turn off the listener
3 There are Oracle instances not closed, workaround: Close Oracle Instance
4 environment variable settings, Solution: Modify environment variable