Switch root to Oracle database account
Su–oracle
To view the database service status:
Ps-ef |grep Oracle
Netstat–an|grep 1521
To view the database listening status:
[[Email protected] ~]$ lsnrctl Statuslsnrctl forLinux:version11.2.0.1.0-Production on --nov- . Geneva: $: $Copyright (c)1991, the, Oracle. All rights reserved. Connecting to (DESCRIPTION= (address= (PROTOCOL=IPC) (key=EXTPROC1521))) STATUS of the LISTENER------------------------Alias listenerversion Tnslsnr forLinux:version11.2.0.1.0-Productionstart Date --nov- . Geneva: -: -Uptime0Days0hr.9Min. insectrace level offsecurity on:local OS authenticationsnmp Offli Stener Parameter File/u01/oracle/network/admin/Listener.oralistener Log File/u01/diag/tnslsnr/dbsrv/listener/alert/log.xmllistening Endpoints Summary ... (DESCRIPTION= (address= (PROTOCOL=IPC) (key=EXTPROC1521))) (DESCRIPTION= (address= (protocol=tcp) (host=dbsrv) (port=1521)) Services Summary ... Service"ORCL"Has1instance (s). Instance"ORCL", status ready, have1Handler (s) forThis service ... Service"Orclxdb"Has1instance (s). Instance"ORCL", status ready, have1Handler (s) forThis service ... The command completed successfully
Start and stop process:
[[Email protected] ~]$ lsnrctl Startlsnrctl forLinux:version11.2.0.1.0-Production on --nov- . Geneva: $: -Copyright (c)1991, the, Oracle. All rights reserved. TNS-01106: Listener using Listener name Listener has already been started[[email protected]~]$ [[email protected]~]$ [[email protected]~]$ Sqlplus/As Sysdbasql*plus:release11.2.0.1.0Production on Fri Nov - Geneva: -: Geneva .Copyright (c)1982, the, Oracle. All rights reserved. Connected to an idle instance. SQL>Startuporacle instance started. Total System Global Area1.3495E+10bytesfixed Size2218032bytesvariable Size6845106128Bytesdatabase Buffers6576668672Bytesredo Buffers71471104bytesdatabase mounted. Database opened. SQL>SQL>shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down. SQL>SQL>exitdisconnected from Oracle Database 11g Enterprise Edition Release11.2.0.1.0-64bit Productionwith The partitioning, OLAP, Data Mining and Real Application testing Options[[email protected]~]$ [[email protected]~]$ [[email protected]~]$ lsnrctl Stoplsnrctl forLinux:version11.2.0.1.0-Production on --nov- . Geneva: -: -Copyright (c)1991, the, Oracle. All rights reserved. Connecting to (DESCRIPTION= (address= (PROTOCOL=IPC) (key=EXTPROC1521))) The command completed Successfully[[email protected]~]$
Oracle database Start stop command in Linux environment