The methods for starting Oracle databases on different system platforms are also different. oracle databases are heavyweight, and their management is very complicated, the following describes how to start the Oracle database 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
To start an Oracle database, note that $ represents a shell command prompt. Here, oracle is version 9.0 or later.
$ Su-oracle
$ Sqlplus/nolog
SQL> conn/as sysdba
SQL> startup (generally, you do not need to add parameters. You only need to set environment variables)
SQL> quit (exit SQL Mode)
$ Lsnrctl start (start listener) Close oracle
$ Lsnrctl stop (close the listener. Close the application before that)
$ 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. Fourth, it is not recommended to use it when it is no longer in use.
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.
Use dynamic SQL for Oracle stored procedures
How to query all tables in oracle
Oracle Stored Procedure debugging method
Learn about the physical structure of Oracle
Setting of Oracle automatic archiving Mode