oracle 各种服务关闭启动

时间:2021-04-24 23:48:05

 

 

-----------windows环境-------------------------------------

1、监听启动&关闭

lsnrctl start  //提示启动监听成功后net start OracleServiceORCL

lsnrctl stop
//提示启动监听成功后net stop OracleServiceORCL。

 

2、检查监听器状态

C:\-----\Administrator>lsnrctl status
LSNRCTL
for 64-bit Windows: Version 10.2.0.1.0 - Production on 16-3月 -2012 09:
0:59
Copyright (c)
1991, 2005, Oracle. All rights reserved.
正在连接到 (DESCRIPTION
=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS
-12541: TNS: 无监听程序
TNS
-12560: TNS: 协议适配器错误
TNS
-00511: 无监听程序

 

3、oracle 服务实例

C:\----\Administrator>net start oracleServiceOrcl  //启动
OracleServiceORCL 服务正在启动 .........
OracleServiceORCL 服务已经启动成功

C:\
----\Administrator>net stop oracleServiceOrcl //关闭
OracleServiceORCL 服务正在停止......
OracleServiceORCL 服务已成功停止

 

4、em启动&关闭

   em启动问题:http://www.cnblogs.com/what-/p/7353764.html

emctl start dbconsole //启动

set ORACLE_SID=ORCL (ORCL是我的实例名,也是服务名)

emctl start dbconsole
//启动

emctl secure dbconsole
-reset //执行

emctl stop dbconsole
//关闭

 

 

-----------Linux环境-------------------------------------

1、查看oracle相关进程服务是否启动

ps -ef |grep oracle  //oracle进程

service iptables stop
//临时停止防火墙

 

2、oracle启动&关闭

启动:
#su oracle
#export ORACLE_SID
=//实例名称
#sqlplus /nolog
#connect
/ as sysdba
#start up
#quit

#lsnrctl start
//启动监听服务
#lsnrctl status //查看监听是否已经启动

关闭:
#lsnrctl start
#sqlplus
/nolog
#connect
/as sysdba
#shutdown immediate
#quit