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.