Linux oracle管理

使用Xshell工具。

以root身份登录:

[root@localhost ~]#

查看(oracle相关)进程状态:

[root@localhost ~]# ps aux|grep oracle

或者

[root@localhost ~]# ps -eaf | grep oracle

杀进程:

[root@localhost ~]# kill -9 13118

以oracle用户登录:

[root@localhost ~]# su - oracle

[oracle@localhost ~]$

查看Listenter状态:

[oracle@localhost ~]$ lsnrctl status

启动Listenter:

[oracle@localhost ~]$ lsnrctl start

停止Listenter:

[oracle@localhost ~]$ lsnrctl stop

查看$ORACLE_SID:

[oracle@localhost ~]$ echo $ORACLE_SID

设置并查看$ORACLE_SID:

[oracle@localhost ~]$ export ORACLE_SID=haiguaninf
[oracle@localhost ~]$ echo $ORACLE_SID

启动停止实例:

[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus  /nolog

 SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 16 15:37:33 2016

 Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn /as sysdba

启动:

SQL> startup

停止:

SQL> shutdown

 

posted @ 2016-08-16 15:39  smilelily126  阅读(344)  评论(0编辑  收藏  举报