Restart oracle database under linux
Restart the oracle database and listeners under linux:
Method 1:
Log in to linux with root as ssh, open the terminal and enter the following command:
Cd $ORACLE_HOME # go to the installation directory of oracle
Dbstart # restart the server
Lsnrctl start # restart the listener
Cd $ORACLE_HOME # go to the installation directory of oracle
Dbstart # restart the server
Lsnrctl start # restart the listener
-
Method 2:
Sql code
Cd $ORACLE_HOME/bin # go to the installation directory of oracle
. / dbstart # restart the server
. / lsnrctl start # restart the listener
-
Method 3:
(1) Log in to the database as oracle, and command: su-oracle
(2) enter the Sqlplus console and command: sqlplus / nolog
(3) Log in as system administrator, command: connect / as sysdba
(4) start the database, command: startup
(5) if the database is closed, the command: shutdown immediate
(6) exit the sqlplus console, command: exit
(7) enter the listener console, and command: lsnrctl
(8) start the listener, command: start
(9) exit the listener console, command: exit
(10) end of restarting the database
-
Method 4: (write your own script)
1) start script (dbstart.sh)
Lsnrctl start
Sqlplus / nolog startup
=
Starting oracle in linux is mainly divided into two steps: one is to start the listener, and the other is to start the instance (generally forget this step). The specific commands are as follows, which are provided for your reference:
1: connect to the server
Telnet ip
2: enter the administrator user and password
User-name:oracle
Password:oracle
3: enter the oracle root directory
Cd $ORACLE_HOME/bin
4: enter the monitor
. / lsnrctl
5: start the listener
Start
6: exit monitoring
Exit
7: enter sqlplus
Sqlplus / nolog
8: use administrator connection
Connect as sysdba
9: enter the user and password
User-name:oracle
Password:oracle
10: start the ORACLE instance
Startup