Starting and shutting down Oracle services and listeners under Linux

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.