Home > Database > Oracle > Detailed introduction to the startup and shutdown methods of Oracle database

Detailed introduction to the startup and shutdown methods of Oracle database

PHPz
Release: 2023-04-04 14:03:10
Original
6177 people have browsed it

Starting and shutting down the Oracle database is the most basic operation in database management, and it is also the first step to get started with the Oracle database. This article will introduce in detail the methods and precautions for starting and shutting down the Oracle database.

1. Oracle database startup method

  1. Manually start the database
    Please confirm that the database has been installed and created before starting. The operation steps are as follows:

(1) Log in to the system as the Oracle installation user;
(2) Use a command line terminal or graphical tool (such as SQL Developer, etc.) to log in to the database;
(3) Use the command line terminal or SQL Developer to execute the command "startup" to start the database.

  1. Automatically start the database
    Oracle sets the database to automatically start by default when creating the database. If your database starts automatically, the Oracle database will start automatically when the operating system starts. If you need to manually stop the Oracle database, please execute the following example command:
    $ORACLE_HOME/bin/dbshut

2. Oracle database shutdown method

  1. Close the database manually
    Before closing the database, please switch to the administrator user identity and use the following method to close the database:

(1) First, you need to execute the shutdown command in SQL*Plus. This command will shut down the background database process and listener process, but not the database instance and database process:

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

(2) Then execute the following command to shut down the database instance:
SQL> startup mount;
ORACLE instance started.

SQL> alter database close;
Database altered.

SQL> alter database dismount;
Database altered.

(3) Finally execute the shutdown command to close the database:
SQL> shutdown immediate;

  1. Automatically shut down the database
    Automatically stop the Oracle database when the system is shut down. If you need to manually stop the Oracle database, please execute the following example command:
    $ORACLE_HOME/bin/dbshut

3. Notes

  1. Please make sure you have the correct Access to the database, and sufficient system privileges to execute these commands.
  2. Before executing the command, please confirm that you have backed up all database files and log files.
  3. Please pay attention to the order of executing commands, otherwise the database may hang or fail to restart.
  4. Before performing the operation, please check the Oracle database documentation to ensure that you understand the operation process.

Starting and stopping the Oracle database is the most basic operation of database management. This article introduces the specific operation methods of manual and automatic starting and stopping in detail, hoping to be helpful to beginners. At the same time, you need to pay attention to operating under the premise of ensuring database security to avoid unnecessary errors.

The above is the detailed content of Detailed introduction to the startup and shutdown methods of Oracle database. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template