Home  >  Article  >  Database  >  How to restart oracle database

How to restart oracle database

下次还敢
下次还敢Original
2024-04-19 00:18:13972browse

Oracle database restart steps: Stop the database: Use the SHUTDOWN IMMEDIATE command. Start the listener: Use the lsnrctl start command. Restart the database: use the STARTUP command.

How to restart oracle database

How to restart Oracle database

Steps to restart Oracle database:

  1. Stop the database:

    • Log in to the database server.
    • Open a command prompt or terminal window.
    • Use sqlplus command to connect to the database:

      <code>sqlplus / as sysdba</code>
    • Enter <code>SHUTDOWN IMMEDIATE</code> command:

      <code>SHUTDOWN IMMEDIATE</code>
  2. Start the listener:

    • If the listener is not already running, use lsnrctl Command to start it:

      <code>lsnrctl start</code>
  3. Restart the database:

    • Use sqlplus command to connect to the database again:

      <code>sqlplus / as sysdba</code>
    • Enter <code>STARTUP</code> command:

      <code>STARTUP</code>

Other related information:

  • <code>SHUTDOWN IMMEDIATE</code> command will shut down the database immediately without waiting for any transactions to complete.
  • If you need a cleaner shutdown, you can use the SHUTDOWN NORMAL command, which will wait for all transactions to complete.
  • If the database crashes or encounters an error, you can use the STARTUP MOUNT command to mount it in read-only mode for recovery operations.
  • Use the lsnrctl stop command to stop the listener.

The above is the detailed content of How to restart oracle database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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