当前位置:数据库 > Oracle >>

怎样启动、关闭和重新启动oracle易做图in linux

怎样启动、关闭和重新启动oracle易做图in linux
 
对于DBA来说,启动和关闭oracle易做图是很基础的任务,但是Linux系统管理员或者程序员有时也需要在开发数据库中做一些基本的DBA操作,因此了解一些基本的管理操作对他们来说很重要。
 
本文将讨论用LSNRCTL命令启动、关闭和查看易做图的状态的方法。
 
怎样启动、关闭和重新启动oracle易做图
 
在启动、关闭或者重启oracle易做图之前确保使用lsnrctl status命令检查oracle易做图的状态。除了得到易做图的状态之外,你还可以从lsnrctl status命令的输出中得到如下的信息:
 
易做图的启动时间 
易做图的运行时间 
易做图参数文件listener.ora的位置,通常位于$ORACLE_HOME/network/admin目录下 
易做图日志文件的位置 
如果oracle易做图没用运行,你将得到如下的信息
 
$ lsnrctl status   

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:39   

Copyright (c) 1991, 2007, Oracle. All rights reserved.   

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))   
TNS-12541: TNS:no listener   
TNS-12560: TNS:protocol adapter error   
TNS-00511: No listener   
Linux Error: 111: Connection refused   
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))   
TNS-12541: TNS:no listener   
TNS-12560: TNS:protocol adapter error   
TNS-00511: No listener   
Linux Error: 2: No such file or directory 
$ lsnrctl status

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:39

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory

 

 
如果oracle易做图正在运行,你将得到如下信息
 
$ lsnrctl status   

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:02   

Copyright (c) 1991, 2007, Oracle. All rights reserved.   

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))   
STATUS of the LISTENER   
————————   
Alias                     LISTENER   
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production   
Start Date                29-APR-2009 18:43:13   
Uptime                    6 days 21 hr. 43 min. 49 sec   
Trace Level               off   
Security                  ON: Local OS Authentication   
SNMP                      OFF   
Listener Parameter File   /u01/app/oracle/product/11.1.0/network/admin/listener.ora   
Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml   
Listening Endpoints Summary…   
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))   
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))   
Services Summary…   
Service “devdb” has 1 instance(s).   
Instance “devdb”, status UNKNOWN, has 1 handler(s) for this service…   
Service “devdb.thegeekstuff.com” has 1 instance(s).   
Instance “devdb”, status READY, has 1 handler(s) for this service…   
Service “devdbXDB.thegeekstuff.com” has 1 instance(s).   
Instance “devdb”, status READY, has 1 handler(s) for this service…   
Service “devdb_XPT.thegeekstuff.com” has 1 instance(s).   
Instance “devdb”, status READY, has 1 handler(s) for this service…   
The command completed successfully 
$ lsnrctl status

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:02

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
STATUS of the LISTENER
————————
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                29-APR-2009 18:43:13
Uptime                    6 days 21 hr. 43 min. 49 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary…
Service “devdb” has 1 instance(s).
Instance “devdb”, status UNKNOWN, has 1 handler(s) for this service…
Service “devdb.thegeekstuff.com” has 1 instance(s).
Instance “devdb”, status READY, has 1 handler(s) for this service…
Service “devdbXDB.thegeekstuff.com” has 1 instance(s).
Instance “devdb”, status READY, has 1 handler(s) for this service…
Service “devdb_XPT.thegeekstuff.com” has 1 instance(s).
Instance “devdb”, status READY, has 1 handler(s) for this service…
The command completed successfully

 

 
2.启动oracle易做图
 
如果oracle易做图没用运行,你可以用lsnrctl start命令启动oracle易做图,该命令将启动所有的易做图,如果你只想启动特定的易做图,可以再start后面指定易做图的名字,例如:lsnrctl start [listener-name]。
 
$ lsnrctl start   

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:42   

Copyright (c) 1991, 2007, Oracle. All rights reserved.   

Starting /u01/app/oracle/product/11.1.0/bin/tnslsnr: please wait…   

TNSLSNR for Linux: Version 11.1.0.6.0 - Production   
System parameter file is /u01/app/oracle/product/11.1.0/network/admin/listener.ora   
Log messages written to /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml   
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))   
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))   

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))   
STATUS of the LISTENER   
————————   
Alias                     LISTENER   
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production   
Start Date                04-APR-2009 16:27:42   
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/11.1.0/network/admin/listener.ora   
Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml   
Listening Endpoints Summary…   
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))   
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))   
Services Summary…   
Service “devdb” has 1 instance(s).   
Instance “devdb”, status UNKNOWN, has 1 handler(s) for this service…   
The command completed successfully 
$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:42

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Starting /u01/app/oracle/product/11.1.0/bin/tnslsnr: please wait…

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Liste
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,