There are three common tools for starting and shutting down a database
First, Sql*plus
In a sql*plus environment, after a user connects to Oracle as SYSDBA , the database can be started or closed by command line mode.
Second, OEM (Enterprise Manager)
With the OEM database console, you can complete the startup and shutdown operations of the database.
Third, RMAN
In the recovery Manager (RMAN) environment, the database can be started or shut down by command line mode.
Generally, we use Sql*plus to start and close the database.
1. Start the database:
[Email protected] etc]$ Sqlplus/nolog
Note: This command is to be completed as an Oracle user.
If you do not initially log on with Oracle, the following conditions may occur:
[Email protected] etc]$ Sqlplus/nolog
Bash:sqlplus:command not found
At this point as long as the source is OK, the command is as follows:
[Email protected] etc]$ Source/home/oracle/.bash_profile
[Email protected] etc]$ Sqlplus/nolog
Sql*plus:release 11.2.0.4.0 Production on Tue June 28 16:19:47 2016
Copyright (c) 1982, Oracle. All rights reserved.
Sql>
In the future, you need to start the database:
Sql> Startup
Then log in as SYSDBA:
Sql> Conn/as SYSDBA
Connected.
2. Close the database:
There are four kinds of syntax for shutting down a database:
Shutdown immediate
Shutdown transaction
Shutdown abort
Shutdown normal
commonly used is the shutdown immediate, which is the fastest way to close in four grammars ,
Once this command is executed, the SQL statement that is currently being processed is stopped immediately, and all uncommitted transactions are rolled back.
And instead of waiting for the user who is currently in the database to disconnect, the system forcibly disconnects the individual joins.
The system automatically performs recovery actions the next time the database is started.
The command is as follows
Sql>shutdown Immediate
Starting and shutting down the database using Sql*plus in Linuxcentos