oracle taf type类型为session和select的区别

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:239

oracle taf type类型为session和select的区别

客户端配置方法
racdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.201)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.202)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
(FAILOVER_MODE =
(TYPE = SESSION)
(METHOD = BASIC)
)
)
)

1.type=session
C:\Documents and Settings\yibin>sqlplus system/abcdefg@racdb
SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 1月 28 16:01:05 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb1
SQL> set pause on
SQL> select trigger_name from dba_triggers;

TRIGGER_NAME
------------------------------
DEF$_PROPAGATOR_TRIG
REPCATLOGTRIG
MASTER_AGENT_CHANGE_TRIGGER
METRICS_INSERT_TRIGGER
METRICS_DELETE
TARGET_PROP_DEFS_TR
TARGETS_INSERT_TRIGGER
TARGETS_AVAILABILITY_DEFAULT
CHECK_DUPLICATE_TARGETS
EM_TARGETS_DELETE
RAW_METRICS_AFTER_INSERT

利用PAUSE的暂停功能,然后在另一个会话中关闭当前连接实例:
srvctl stop instance -d racdb -i racdb1
返回刚才执行sql的窗口,按回车继续:
TRIGGER_NAME
------------------------------
METRIC_ERRORS_CUR_AND_DUPES
BLACKOUT_CHANGE
BLACKOUT_STATUS
INSERT_FLAT_TARGETS
ERROR:
ORA-25401: 无法继续读取

已选择15行。
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
racdb2
可以看出会话已经切换到实例2,但查询没有完成,也就是说select trigger_name from dba_triggers的结果没有全部出来,
只出来数据库关闭前的数据

2.type=select
racdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.201)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.202)(PORT = 1521))
(LOAD_BALANCE = yes)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = BASIC)
)
)
)

C:\Documents and Settings\yibin>sqlplus system/abcdefg@racdb
SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 1月 28 16:18:36 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb1
SQL> set pause on
SQL> select trigger_name from dba_triggers;

TRIGGER_NAME
------------------------------
DEF$_PROPAGATOR_TRIG
REPCATLOGTRIG
MASTER_AGENT_CHANGE_TRIGGER
METRICS_INSERT_TRIGGER
METRICS_DELETE
TARGET_PROP_DEFS_TR
TARGETS_INSERT_TRIGGER
TARGETS_AVAILABILITY_DEFAULT
CHECK_DUPLICATE_TARGETS
EM_TARGETS_DELETE
RAW_METRICS_AFTER_INSERT

TRIGGER_NAME
------------------------------
METRIC_ERRORS_CUR_AND_DUPES
BLACKOUT_CHANGE
BLACKOUT_STATUS
INSERT_FLAT_TARGETS
UPDATE_SOURCE
BLACKOUT_WINDOW_INSERT
HANDLE_RELATED_TARGETS
MGMT_METRIC_COLL_INS
MGMT_METRIC_COLL_DEL
MGMT_CREDS_UPD
MGMT_CREDS_INS_UPD
利用PAUSE的暂停功能,然后在另一个会话中关闭当前连接实例:
srvctl stop instance -d racdb -i racdb1
返回刚才执行sql的窗口,按回车继续:
TRIGGER_NAME
------------------------------
MGMT_TARGET_CREDS_DEL
MGMT_HOST_CREDS_DEL
MGMT_CONT_CREDS_DEL
MGMT_ENT_CREDS_DEL
MGMT_JOB_CREDS_DEL
MEMBERSHIPS_INSERT_TRIGGER
MEMBER_ADDITION_TRIGGER
MEMBER_DELETION_TRIGGER
EXECPLAN_DELETE_TRIGGER
JOB_SUMM_INS_TRIGGER
JOB_DELETE_TRIGGER

TRIGGER_NAME
------------------------------
JOB_TARGET_INSERT_TRIGGER
JOB_TARGET_DEL_TRIGGER
MGMT_JOB_EXEC_INSERT
MGMT_JOB_EXEC_UPDATE
JOB_CMD_BLK_DELETE_TRIGGER
JOB_EXEC_DELETE_TRIGGER
JOB_EXEC_UPDATE_TRIGGER
MGMT_JOB_PARAM_INSERT
MGMT_JOB_PARAM_DELETE
SEVERITY_DELETE
METRICS_SEVERITY_DUPLICATES

TRIGGER_NAME
------------------------------
MGMT_SEVERITY_UPDATES
SEV_ANNOTATION_INSERT_TR
SEV_ANNOTATION_DELETE_TR
SPACE_METRICS_PURGE_TRIGGER
MGMT_DB_HDM_METRIC_TR
MGMT_SQL_METRIC_TR
XDB_RV_TRIG
XDB$ACL$xd
xdb-log9_TAB$xd
SERVLET$xd
ftp-log14_TAB$xd

TRIGGER_NAME
------------------------------
http-log20_TAB$xd
Folder23_TAB$xd
XDB_PV_TRIG
XDB$STATS$xd
XDB$CONFIG$xd
XDBCONFIG_VALIDATE
AW_DROP_TRG
NO_VM_DDL
NO_VM_DROP_A
AURORA$SERVER$STARTUP
AURORA$SERVER$SHUTDOWN

TRIGGER_NAME
------------------------------
CDC_ALTER_CTABLE_BEFORE
CDC_CREATE_CTABLE_AFTER
CDC_CREATE_CTABLE_BEFORE
CDC_DROP_CTABLE_BEFORE
EXPFIL_RESTRICT_TYPEEVOLVE
EXPFIL_ALTEREXPTAB_MAINT
XDB_PI_TRIG
EXPFIL_DROPOBJ_MAINT
EXPFIL_DROPUSR_MAINT
RLMGR_TRUNCATE_MAINT
已选择76行。
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
racdb2
SQL>
这次不但将会话切到了正常的实例上,而且SELECT的结果也全部出来,
没有因实例故障而出现错误。
这就是TAF下type类型为session和select 的区别

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】