Starting and shutting down the database using Sql*plus in Linuxcentos

Source: Internet
Author: User
Tags sqlplus

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

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.