--------------------- # 查看Oracle状态
-------------------
# 查看进程状态
[root@localhost6 ~]# ps aux | grep oracle
oracle 1967 0.0 0.9 1540464 37732 ? Ss Oct22 0:00 oraclerd (LOCAL=NO)
oracle 4180 0.0 0.1 22392 6204 ? Ssl Oct08 9:38 /oracle/product/10.2.0/db1/bin/tnslsnr LISTENER -inherit
oracle 4186 0.0 0.5 1540936 24812 ? Ss Oct08 0:01 ora_pmon_rd
oracle 11516 0.0 0.5 1541488 22700 ? Ss 15:47 0:00 oraclerd (LOCAL=NO)
root 15803 0.0 0.0 4208 632 pts/0 S+ 16:37 0:00 grep oracle
oracle 20666 0.0 9.3 1541508 385744 ? Ss Oct24 0:19 ora_s000_rd
# 查看端口号,默认1521
[root@localhost6 ~]# netstat -ant | grep 1521
tcp 0 0 10.8.8.8:1521 0.0.0.0:* LISTEN
tcp 0 0 10.8.8.8:1521 10.8.111.112:1451 ESTABLISHED
tcp 0 0 10.8.8.8:1521 10.8.111.156:51739 TIME_WAIT
tcp 0 0 10.8.8.8:1521 10.8.111.124:35187 ESTABLISHED
tcp 0 0 10.8.8.8:1521 10.8.11.121:51585 ESTABLISHED
tcp 0 0 10.8.8.8:1521 10.8.111.231:51745 ESTABLISHED
# 查看Listener状态
[oracle@localhost ~]$ su - oracle
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 26-OCT-2012 16:49:57
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.8.8.8)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 08-OCT-2012 09:52:47
Uptime 18 days 6 hr. 57 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10.2.0/db1/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0/db1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.8.8.8)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "RD_XPT" has 1 instance(s).
Instance "RD", status READY, has 1 handler(s) for this service...
Service "rd" has 2 instance(s).
Instance "RD", status READY, has 2 handler(s) for this service...
Instance "rd", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
-------------------
# 启动Oracle服务
-------------------
# 切换到oracle用户
[root@localhost bin]# su - oracle
# 启动Listener
[oracle@localhost ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 30-JAN-2012 11:12:22
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /oracle/product/10.2.0/db1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /oracle/product/10.2.0/db1/network/admin/listener.ora
Log messages written to /oracle/product/10.2.0/db1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.8.8.8)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.8.8.8)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 30-JAN-2012 11:12:22
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10.2.0/db1/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0/db1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.8.8.8)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "rd" has 1 instance(s).
Instance "rd", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
# 启动服务
[oracle@localhost ~]$ sqlplus /nolog
SQL> conn / as sysdba
Connected.
SQL> startup
[oracle@localhost ~]$ sqlplus sys/hollysys as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 30 11:13:16 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size 1267572 bytes
Variable Size 872417420 bytes
Database Buffers 587202560 bytes
Redo Buffers 15507456 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-------------------
# 停止Oracle服务
-------------------
# 停止服务
SQL> shutdown
Immediate.
# 停止Listener
[oracle@localhost ~]$ lsnrctl stop
|
|