Disable Oracle databases on Linux

Source: Internet
Author: User
Oracle databases are heavyweight, and their management is very complicated. Sort out the steps for starting and disabling Oracle databases on the Linux platform. After installing Oracle, you need to create an Oracle System

Oracle databases are heavyweight, and their management is very complicated. Sort out the steps for starting and disabling Oracle databases on the Linux platform. After installing Oracle, you need to create an Oracle System

Oracle databases are heavyweight, and their management is very complicated. Sort out the steps for starting and disabling Oracle databases on the Linux platform.

After installing Oracle, you need to create an Oracle System User and add several environment variables in. bash_profile under/home/oracle: ORACLE_SID, ORACLE_BASE, ORACLE_HOME.

For example:

Export ORACLE_SID = test export ORACLE_BASE = oracle_install_dir export ORACLE_HOME = xxx

Start step: Pay attention to $ representing the shell command prompt. Here, oracle is version 9.0 or later.

$ Su-oracle

$ Sqlplus/nolog

SQL> conn/as sysdba

SQL> startup (generally, no parameter is required. You only need to set the environment variable)

SQL> quit (exit SQL Mode)

$ Lsnrctl start (enable listener) Close oracle

$ Lsnrctl stop (close the listener. Before that, close the application)

$ Sqlplus/nolog

SQL> shutdown: the shutdown parameter has four parameters. The meanings of the four parameters are as follows:

Normal: wait until all users are disconnected.

Immediate waits for the user to complete the current statement

Transactional waits for the user to complete the current transaction

Abort closes the database without waiting.

Normal requires that you close the database only after all connected users are disconnected. Sometimes it seems that the command is not running! New connections are not allowed after this command is executed.

Immediate disconnects the user after the user executes the statement being executed, and does not allow new users to connect.

Transactional disconnects after it supports executing the current transaction and does not allow new users to connect to the database.

Abort forcibly disconnects and closes the database.

The first three methods do not return lost user data. The fourth option is not recommended if it is no longer available!

Frequently encountered problems:

1) permission issues, solution, switch to oracle user;

2) The Listener is not closed. Solution: Disable the listener.

3) If an Oracle instance is not closed, the solution is to close the oracle instance.

4) The environment variable settings are incomplete. Solution: Modify the 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.