|
本帖最后由 botang 于 2016-11-22 23:17 编辑
上完1Z0-052第6章(网络 静态注册 动态注册 连接时故障转移 共享服务器 数据库链)
(052共19章,053共21章,063多租户共9章,49-3)
- select * from v_$session s
- where s.TERMINAL ='pts/2' ;
-
- select * from v_$transaction t;
-
- select * from v_$lock l where l.SID=71;
-
- ---------------------------
- select * from v_$session s
- where s.BLOCKING_SESSION is not null;
-
- select * from v_$session s
- where s.SID in (select BLOCKING_SESSION from v$session ) ;
复制代码 网络配置文件:
tnsnames.ora
- # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/tnsnames.ora
- # Generated by Oracle configuration tools.
- RCAT =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = rcat.example.com)
- )
- )
- ORCL =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = orcl.example.com)
- )
- )
- fordb =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1522))
- )
- )
- foronly =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
- )
- )
复制代码 数据库共享服务器配置:
- [oracle@station90 admin]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 17 09:45:45 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> show parameter dispa
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- dispatchers string (PROTOCOL=TCP) (dispatchers=3)
- (listener=foronly)
- max_dispatchers integer
- SQL> show parameter shar
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- cursor_sharing string EXACT
- hi_shared_memory_address integer 0
- max_shared_servers integer
- shared_memory_address integer 0
- shared_pool_reserved_size big integer 36909875
- shared_pool_size big integer 0
- shared_server_sessions integer
- shared_servers integer 4
- SQL>
复制代码 共享服务器与监听器:
- [oracle@station90 admin]$ lsnrctl services
- LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-NOV-2016 09:46:46
- Copyright (c) 1991, 2009, Oracle. All rights reserved.
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
- Services Summary...
- Service "+ASM" has 1 instance(s).
- Instance "+ASM", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:253 refused:0 state:ready
- LOCAL SERVER
- Service "orcl.example.com" has 2 instance(s).
- Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0
- LOCAL SERVER
- Instance "orcl", status READY, has 4 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:12 refused:0 state:ready
- LOCAL SERVER
- "D002" established:94 refused:0 current:4 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 8871>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=27145))
- "D001" established:88 refused:0 current:4 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 8867>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=55687))
- "D000" established:97 refused:0 current:4 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 3790>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=26260))
- Service "orclXDB.example.com" has 1 instance(s).
- Instance "orcl", status READY, has 0 handler(s) for this service...
- Service "rcat.example.com" has 2 instance(s).
- Instance "rcat", status UNKNOWN, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0
- LOCAL SERVER
- Instance "rcat", status READY, has 4 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:6 refused:0 state:ready
- LOCAL SERVER
- "D002" established:0 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 9997>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=11223))
- "D001" established:1 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 9995>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=61816))
- "D000" established:1 refused:0 current:0 max:1022 state:ready
- DISPATCHER <machine: station90.example.com, pid: 2864>
- (ADDRESS=(PROTOCOL=tcp)(HOST=station90.example.com)(PORT=50083))
- Service "rcatXDB.example.com" has 1 instance(s).
- Instance "rcat", status READY, has 0 handler(s) for this service...
- The command completed successfully
- [oracle@station90 admin]$
复制代码 第二个监听器:
- [oracle@station90 admin]$ lsnrctl services l2
- LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-NOV-2016 09:47:22
- Copyright (c) 1991, 2009, Oracle. All rights reserved.
- Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.90)(PORT=1522)))
- Services Summary...
- Service "+ASM" has 1 instance(s).
- Instance "+ASM", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0 state:ready
- LOCAL SERVER
- Service "orcl.example.com" has 2 instance(s).
- Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0
- LOCAL SERVER
- Instance "orcl", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:1 refused:0 state:ready
- LOCAL SERVER
- Service "orclXDB.example.com" has 1 instance(s).
- Instance "orcl", status READY, has 0 handler(s) for this service...
- Service "rcat.example.com" has 2 instance(s).
- Instance "rcat", status UNKNOWN, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0
- LOCAL SERVER
- Instance "rcat", status READY, has 1 handler(s) for this service...
- Handler(s):
- "DEDICATED" established:0 refused:0 state:ready
- LOCAL SERVER
- Service "rcatXDB.example.com" has 1 instance(s).
- Instance "rcat", status READY, has 0 handler(s) for this service...
- The command completed successfully
复制代码 共享服务器相关查询:
- select * from
- v_$dispatcher d where d.PADDR='00000001EC7542E0' ;
-
- select * from
- v_$session s where s.USERname='SYSTEM';
-
- select * from
- v$circuit c;
复制代码
|
|