天天看点

oracle启动

开启监听:

lsnrctl start

,停止和查看分别是:

stop

,

status

#没有实例的监听状态
[email protected] ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 05-DEC-2018 09:45:48

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                04-DEC-2018 17:51:31
Uptime                    0 days 15 hr. 54 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /home/oracle/oracle10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ccpbs118)(PORT=1521)))
The listener supports no services
The command completed successfully

#存在实例的监听状态
[[email protected] ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 05-DEC-2018 10:20:02

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                04-DEC-2018 17:51:31
Uptime                    0 days 16 hr. 28 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /home/oracle/oracle10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ccpbs118)(PORT=1521)))
Services Summary...
Service "ccpbs118" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
Service "ccpbs118XDB" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
Service "ccpbs118_XPT" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
The command completed successfully
           
  • (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ccpbs118)(PORT=1521))) status此处说明主机地址是ccpbs118,且开启的监听端口是1521
  • Service "ccpbs118" has 1 instance(s). Instance "ccpbs118", status READY, has 1 handler(s) for this service...

    有一个服务名为ccpbs118的服务,且启实例名为ccpbs118,状态为READY 动态注册;

查看服务:

lsnrctl services

[[email protected] ~]$ lsnrctl services

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 05-DEC-2018 11:39:19

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "ccpbs118" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:4 refused:0 state:ready
         LOCAL SERVER
Service "ccpbs118XDB" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: ccpbs118, pid: 13808>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ccpbs118)(PORT=2566))
Service "ccpbs118_XPT" has 1 instance(s).
  Instance "ccpbs118", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:4 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

           
  • 就服务ccpbs118而言,“DEDICATED” established:4 refused:0 state:ready其是专有连接 连接数为4,拒绝数为0,状态:动态
  • Instance "ccpbs118", status READY, has 1 handler(s) for this service...
      Handler(s):
        "D000" established:0 refused:0 current:0 max:1022 state:ready
           DISPATCHER <machine: ccpbs118, pid: 13808>
           (ADDRESS=(PROTOCOL=tcp)(HOST=ccpbs118)(PORT=2566))
               
- share模式,目前连接为0,拒绝为0,最大数为1022,状态是动态注册

连接oracl e  `sqlplus /nolog`

启动实例  `conn /as sysdba`,`startup`
           

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 1174405120 bytes

Fixed Size 2083464 bytes

Variable Size 721421688 bytes

Database Buffers 436207616 bytes

Redo Buffers 14692352 bytes

Database mounted.

Database opened.

参考链接:http://www.ecdoer.com/post/oracle-startup.html
           

继续阅读