Start/shutdown of Oracle database in linux system

1. Log in to the device and switch users

su oracle		//root登录之后切换至oracle用户操作

2. Connect to the database

  • Connect under the Oracle user
sqlplus oracle/oracle@oracleDB
  • Use administrator privileges
connect / as sysdba
sqlplus / as sysdba  //sysdba直接登录,与切换管理员权限相同

3. Start/shut down the service

  • start: "startup"

    • Start the database instance and open the database without parameters, so that users can use the database. In most cases, this method is used;
    • "nomount", only starts the database instance, but does not open the database, used when you want to create a new database;
    • "mount", used when changing the name of the database;
  • shutdown: "shutdown"

    • Normal: It is necessary to wait for all users to disconnect before executing the task of closing the database (new connections are not allowed after executing this command);
    • Immediate: wait for the user to complete the current statement, and do not allow new users to connect;
    • Transactional: Wait for the user to complete the current transaction, and do not allow new users to connect;
    • Abort: Close the database directly without waiting;

4. Monitor port status

  • start up
lsnrctl start
  • closure
lsnrctl stop
  • view current status
lsnrctl status

Guess you like

Origin blog.csdn.net/weixin_43833430/article/details/122322888