Bo's Oracle Station

查看: 1508|回复: 0

课程第8次(2016-11-16星期三)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-11-17 09:47:15 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-11-22 23:17 编辑

上完1Z0-052第6章(网络 静态注册 动态注册 连接时故障转移 共享服务器 数据库链)
(052共19章,053共21章,063多租户共9章,49-3)
  1. select  * from v_$session   s
  2. where    s.TERMINAL  ='pts/2' ;
  3.   
  4.   select  * from v_$transaction t;
  5.       
  6.   select  * from v_$lock  l   where l.SID=71;
  7.   
  8.   ---------------------------
  9.   select  * from v_$session   s
  10.   where s.BLOCKING_SESSION is not null;
  11.   
  12.   select  * from v_$session   s
  13.    where s.SID in (select  BLOCKING_SESSION  from v$session  ) ;
复制代码
网络配置文件:
tnsnames.ora
  1. # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/tnsnames.ora
  2. # Generated by Oracle configuration tools.

  3. RCAT =
  4.   (DESCRIPTION =
  5.     (ADDRESS_LIST =
  6.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
  7.     )
  8.     (CONNECT_DATA =
  9.       (SERVICE_NAME = rcat.example.com)
  10.     )
  11.   )

  12. ORCL =
  13.   (DESCRIPTION =
  14.     (ADDRESS_LIST =
  15.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
  16.     )
  17.     (CONNECT_DATA =
  18.       (SERVICE_NAME = orcl.example.com)
  19.     )
  20.   )


  21. fordb =
  22.    (DESCRIPTION =
  23.     (ADDRESS_LIST =
  24.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
  25.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1522))
  26.     )
  27.   )


  28. foronly =
  29.    (DESCRIPTION =
  30.     (ADDRESS_LIST =
  31.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
  32.     )
  33.   )
复制代码
数据库共享服务器配置:
  1. [oracle@station90 admin]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 17 09:45:45 2016

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

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> show parameter dispa

  7. NAME                                     TYPE         VALUE
  8. ------------------------------------ ----------- ------------------------------
  9. dispatchers                             string         (PROTOCOL=TCP) (dispatchers=3)
  10.                                                   (listener=foronly)
  11. max_dispatchers                      integer
  12. SQL> show parameter shar

  13. NAME                                     TYPE         VALUE
  14. ------------------------------------ ----------- ------------------------------
  15. cursor_sharing                             string         EXACT
  16. hi_shared_memory_address             integer         0
  17. max_shared_servers                     integer
  18. shared_memory_address                     integer         0
  19. shared_pool_reserved_size             big integer 36909875
  20. shared_pool_size                     big integer 0
  21. shared_server_sessions                     integer
  22. shared_servers                             integer         4
  23. SQL>
复制代码
共享服务器与监听器:
  1. [oracle@station90 admin]$ lsnrctl services

  2. LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-NOV-2016 09:46:46

  3. Copyright (c) 1991, 2009, Oracle.  All rights reserved.

  4. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
  5. Services Summary...
  6. Service "+ASM" has 1 instance(s).
  7.   Instance "+ASM", status READY, has 1 handler(s) for this service...
  8.     Handler(s):
  9.       "DEDICATED" established:253 refused:0 state:ready
  10.          LOCAL SERVER
  11. Service "orcl.example.com" has 2 instance(s).
  12.   Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
  13.     Handler(s):
  14.       "DEDICATED" established:0 refused:0
  15.          LOCAL SERVER
  16.   Instance "orcl", status READY, has 4 handler(s) for this service...
  17.     Handler(s):
  18.       "DEDICATED" established:12 refused:0 state:ready
  19.          LOCAL SERVER
  20.       "D002" established:94 refused:0 current:4 max:1022 state:ready
  21.          DISPATCHER <machine: station90.example.com, pid: 8871>
  22.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=27145))
  23.       "D001" established:88 refused:0 current:4 max:1022 state:ready
  24.          DISPATCHER <machine: station90.example.com, pid: 8867>
  25.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=55687))
  26.       "D000" established:97 refused:0 current:4 max:1022 state:ready
  27.          DISPATCHER <machine: station90.example.com, pid: 3790>
  28.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=26260))
  29. Service "orclXDB.example.com" has 1 instance(s).
  30.   Instance "orcl", status READY, has 0 handler(s) for this service...
  31. Service "rcat.example.com" has 2 instance(s).
  32.   Instance "rcat", status UNKNOWN, has 1 handler(s) for this service...
  33.     Handler(s):
  34.       "DEDICATED" established:0 refused:0
  35.          LOCAL SERVER
  36.   Instance "rcat", status READY, has 4 handler(s) for this service...
  37.     Handler(s):
  38.       "DEDICATED" established:6 refused:0 state:ready
  39.          LOCAL SERVER
  40.       "D002" established:0 refused:0 current:0 max:1022 state:ready
  41.          DISPATCHER <machine: station90.example.com, pid: 9997>
  42.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=11223))
  43.       "D001" established:1 refused:0 current:0 max:1022 state:ready
  44.          DISPATCHER <machine: station90.example.com, pid: 9995>
  45.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=61816))
  46.       "D000" established:1 refused:0 current:0 max:1022 state:ready
  47.          DISPATCHER <machine: station90.example.com, pid: 2864>
  48.          (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=50083))
  49. Service "rcatXDB.example.com" has 1 instance(s).
  50.   Instance "rcat", status READY, has 0 handler(s) for this service...
  51. The command completed successfully
  52. [oracle@station90 admin]$
复制代码
第二个监听器:
  1. [oracle@station90 admin]$ lsnrctl services l2

  2. LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-NOV-2016 09:47:22

  3. Copyright (c) 1991, 2009, Oracle.  All rights reserved.

  4. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.90)(PORT=1522)))
  5. Services Summary...
  6. Service "+ASM" has 1 instance(s).
  7.   Instance "+ASM", status READY, has 1 handler(s) for this service...
  8.     Handler(s):
  9.       "DEDICATED" established:0 refused:0 state:ready
  10.          LOCAL SERVER
  11. Service "orcl.example.com" has 2 instance(s).
  12.   Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
  13.     Handler(s):
  14.       "DEDICATED" established:0 refused:0
  15.          LOCAL SERVER
  16.   Instance "orcl", status READY, has 1 handler(s) for this service...
  17.     Handler(s):
  18.       "DEDICATED" established:1 refused:0 state:ready
  19.          LOCAL SERVER
  20. Service "orclXDB.example.com" has 1 instance(s).
  21.   Instance "orcl", status READY, has 0 handler(s) for this service...
  22. Service "rcat.example.com" has 2 instance(s).
  23.   Instance "rcat", status UNKNOWN, has 1 handler(s) for this service...
  24.     Handler(s):
  25.       "DEDICATED" established:0 refused:0
  26.          LOCAL SERVER
  27.   Instance "rcat", status READY, has 1 handler(s) for this service...
  28.     Handler(s):
  29.       "DEDICATED" established:0 refused:0 state:ready
  30.          LOCAL SERVER
  31. Service "rcatXDB.example.com" has 1 instance(s).
  32.   Instance "rcat", status READY, has 0 handler(s) for this service...
  33. The command completed successfully
复制代码
共享服务器相关查询:
  1. select  * from
  2. v_$dispatcher  d  where  d.PADDR='00000001EC7542E0' ;

  3. select  * from
  4. v_$session s where s.USERname='SYSTEM';

  5. select  * from
  6.   v$circuit  c;
复制代码











回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-26 23:05 , Processed in 0.039885 second(s), 24 queries .

快速回复 返回顶部 返回列表