Start and shutdown of Oracle database

Source: Internet
Author: User

Manage Oracle databases, from the simplest startup and shutdown databases.
If Oracle is running under a Linux system, first of all, to connect to a Linux system,
The SECURECRT is an ideal tool for connecting remote systems that run Windows, UNIX, and VMs.
You can transfer encrypted files by using the included VCP command-line program.
Switch to the Oracle installation user.
Run the environment variables for Oracle to enter the relevant commands.
Enter the Oracle console. Input command: Sqlplus/as sysdba;

Start the database, enter the command: startup;
Close database, enter command: Shutdown immediate;

Start listener
After the database is started, the client cannot connect to the database if the listening process is not started. The startup 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 directory/home/app/oracle/product/10.1.0/db1/network/admin/.
This configuration file is divided into two parts, part of the listener itself configuration, including protocol, address, port number, etc.;
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 health status of the listener: $lsnrctl status;
To stop the listener: $lsnrctl stop.

The startup process of the database
It is divided into three stages:
1. Launch the instance, which includes the following actions:
(1) Read the parameter file
(2) Allocation of SGA
(3) Start the background process
2. Loading the database
The Mount database is the connection between the database and the instance that was started. After the database is mounted, the database remains closed.
3. Open the Database
This step uses the database to handle the normal operation. The main is to open the control files, database files and log files.

Database Startup Parameters
1.NOMOUNT: Launch instance only, do not mount database
Sql>startup Nomount
2.MOUNT: Launches the instance and mounts the data, but does 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, this is the default way
Sql>startup Mount
Sql>alter Database Open Read Write
5.OPEN: Open database, this is the default way
Sql>startup Mount
Sql>alter database open;
6.RESTRICT: Open in restricted mode, only users with restricted session permission can connect to the database
Sql>startup Restrict
7.PFILE: Specify parameter file at start time
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

Shutdown of the database
Corresponds to the startup process, closing consists of three processes
1. Close the database
2. Uninstalling the Database
3. To close a DB instance


1. Normal off mode
Normal shutdown mode is normally closed by default. In this mode of shutdown,
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 the database in this way, all users who connect to the database that have not committed the transaction are all rolled back, the connection is interrupted, and the database is shut down.
Sql>shutdown IMMEDIATE
3. Abort off mode
Abort is closed in an unusual manner, when the database is closed in this way, the system immediately shuts down the database instance and does not check the integrity of the transaction bore data. is the fastest way to shut down the machine.
Sql>shutdown abort;
4. Transactional shutdown mode
In this shutdown mode, the database must wait for all clients running the transaction to end, commit, or rollback.
Sql>shutdown Transactional
5. sql> Startup Force startup
6. Oracle off 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 a reboot.

Note: The contents of the essay are from the online data collation, for reference only.

Start and shutdown of Oracle database

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.