Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle startup process and mode

Shulou Source: shulou.com Published: 2022-06-01 15:29:00 10月01日 Update

1. Start the Oracle service (must be an oracle user)

Start Oracle: first start Oracle, start listening

Stop Oracle: stop monitoring first, and then stop Oracle

1. Monitor

Lsnrctl start / / start listening

Lsnrctl stop / / stop snooping

two。 Database opening (here are three different ways to open a database)

1) Open the database 1 / / start the system-- >

Sqlplus sys as sysdba / / Log in to Oracle

SQL > startup nomount; / / Open the instance

SQL > alter database mount; / / Mount the database

SQL > alter database open; / / Open the database

2) Open database 2 / / boot system-- > mount / mnt-- >

Sqlplus sys as sysdba / / Log in to Oracle

SQL > startup mount; / / Open the instance and mount the database

SQL > alter database open; / / Open the database

3) Open the database 3 / / start the system-- > mount / mnt-- > cd / mnt

Sqlplus sys as sysdba / / Log in to Oracle

SQL > startup; / / Open instance, mount database and open

3. Shut down the database

1) stop the database (four different "options" to stop the database)

Sqlplus sys as sysdba / / Log in to Oracle

Turn it off as follows: shutdown+ one of the four colors, or execute shutdown directly

SQL > shutdown [normal | immediate | transcaction | abort] close the database

Detailed explanation of the options:

1) shutdown NORMAL

/ / default value, which has the same effect as shutdown. After all users have finished writing, exit the database and close it.

2) shutdown IMMEDIATE

/ / rollback all uncommitted transaction operations, exit the database and close; more commonly used

3) shutdown TRANSCACTION

/ / wait for all user operations to be completed, then exit the database and close it. It is generally used to close the database on a regular basis.

4) shutdown ABORT

/ / all users are forcibly disconnected and all data is not saved, which will result in data loss. It is generally not recommended to use it.

Operation of Oracle server after boot (local current users can log in to the database without entering password)

2) 1) su-oracle

2) lsnrctl start

3) sqlplus sys as sysdba

SQL > startup

SQL > QUIT

4) emctl start dbconsole

Operation of Oracle server before shutdown

2) 1) su-oracle

2) lsnrctl stop

3) sqlplus sys as sysdba

SQL > shutdown IMMEDIATE

SQL > QUIT

4) emctl stop dbconsole

Tags: Data database user monitor login method instance system service different server same no transaction password commonly used suggestion effect color enforcement Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information Shulou Tech Info Shulou Technology Docker