关闭时先关闭sqlplus和EM,然后关闭监听,最后是关闭DB。
启动时先启动监听,再启动DB、EM、SQLPLUS
/*--------------------关闭oracle--------------------*/
1.关闭sqlplus
[oracle@redhat4 ~]$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Stopping iSQL*Plus ...
iSQL*Plus stopped.
2.关闭EM
[oracle@redhat4 ~]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://redhat4:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...... Stopped.
3.关闭监听(监听的端口号是1521)
[oracle@redhat4 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-NOV-2015 20:03:27
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat4)(PORT=1521)))
The command completed successfully
4.关闭BD
[oracle@redhat4 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 9 20:07:09 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
/*--------------------启动oracle--------------------*/
1.启动监听
[oracle@redhat4 ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-NOV-2015 20:11:16
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat4)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 09-NOV-2015 20:11:16
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat4)(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...
The command completed successfully
2.启动DB
[oracle@redhat4 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 9 20:12:24 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020192 bytes
Variable Size 121638048 bytes
Database Buffers 155189248 bytes
Redo Buffers 6365184 bytes
Database mounted.
Database opened.
3.启动sqlplus
[oracle@redhat4 ~]$ isqlplusctl start
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
getnameinfo failed
Starting iSQL*Plus ...
iSQL*Plus started.
4.启动EM(EM一旦建立,Linux服务器的主机名字就不要改变)
[oracle@redhat4 ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://redhat4:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ................................. started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/redhat4_jiagulun/sysman/log