How to start and close Oracle database

Source: Internet
Author: User
Tags port number oracle database
This article mainly introduces the Oracle database startup and shutdown methods, the need for friends can refer to the next

First, start data

$sqlplus "Sys/pass as SYSDBA"
Sql>startup

Second, start the listener

after the database is started, if the listener process is not started, the client cannot connect to the database. The Start method for the listener process is:
$lsnrctl start
In Widnows, you can start the listener from the list of services.
The listening mileage profile is Listener.ora, located in the directory/home/app/oracle/product/10.1.0/db1/network/admin/.
This configuration file is divided into two parts, the configuration of the listener itself, including the protocol, address, port number, and so on, and the other part is the instance information of the database to which the listener is connected, including: instance name, global database name, Oracle home directory, and so on. The listener can be configured with the Oracle Net Config Wizard.
To display the running status of the listener: $lsnrctl status;
To stop the listener: $lsnrctl stop.

Third, the database START process

Divided into three stages:
1. Start the instance, including the following actions:
1 read the parameter file
2) Allocation of SGA
3) Start the background process
2. Mount Database
The Mount database is associated with a started instance of the database. The database remains closed after the database is mounted.
3. Open Database
This step uses the database to handle normal operations. The main is to open control files, database files and log files.

Iv. Database Startup Parameters

1.NOMOUNT: Start instance only, do not load database
Sql>startup Nomount
2.MOUNT: Start the instance and load the data, but do not open the database
Sql>startup Mount
3.READ only: Make the database read-only
Sql>startup Mount
Sql>alter Database Open Read Only
4.READ write: Open data in read-write mode, which is the default method
Sql>startup Mount
Sql>alter Database Open Read Write
5.OPEN: Open database, this is the default method
Sql>startup Mount
Sql>alter database open;
6.RESTRICT: Open in restricted mode, only users with restricted session permissions can connect to the database
Sql>startup Restrict
7.PFILE: Specify parameter file at startup
Sql>startup Pfile=/u02/user/mypfile.ora
8.FORCE: Start the database in a forced manner
Sql>startup Pfile=/u02/user/mypfile.ora Open Restrict force

V. Closure of the database

to match the startup process, close includes three procedures
1). Close Database
2). Unload database
3). Close database Instance


1. Normal off mode
Normal is closed in a graceful way and is the default shutdown mode. In this shutdown mode, the database server must wait for all clients to exit gracefully from Oracle before shutting down the database.
Sql>shutdown NORMAL
2. Immediate shutdown mode
When you close a database in this manner, all transactions that are not committed by all users connected to the database are rolled back, disconnected, and then closed.
Sql>shutdown IMMEDIATE
3. Abort shutdown mode
Abort closed in an unusual way, when you close a database in this way, the system immediately shuts down the database instance and does not check the integrity of the data in the transaction chamber. Is the quickest way to shut down the machine.
Sql>shutdown abort;
4. Transactional shutdown mode
In this shutdown mode, the database must wait for all clients to run the transaction to end, commit or rollback.
Sql>shutdown Transactional

5. sql> Startup force forced start

6, Oracle Shutdown Archivelog
sql> shutdown immediate;
sql> ALTER DATABASE Noarchivelog; (Archivelog) off Open
sql> ALTER DATABASE open;
or change: The parameters in Pfile/spfile:
Log_archive_start = True to restart the database or execute: Archive log start enables automatic archiving of the database, but the database is still in manual archive mode after the reboot.

Related Article

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.