亚博色碟博彩平台最低提现金额_Oracle 从分享池删除指定SQL的实行盘算推算
[[440190]]
本文转载自微信公众号「DBA闲想杂想录」,作家潇湘隐者 。转载本文请有关DBA闲想杂想录公众号。
Oracle 11g在DBMS_SHARED_POOL包中引入了一个名为PURGE的新存储经过,用于从对象库缓存中刷新特定对象,举例游标,包,序列,触发器等。也即是说不错删除、计帐特定SQL的实行盘算推算, 这么在零散情况下,就幸免你要将扫数SHARED POOL清空的危急情况。举例某个SQL语句由于优化器产生了颠倒的实行盘算推算,咱们但愿优化器再行融会,生成新的实行盘算推算,必须无将SQL的实行盘算推算从分享池中刷出或将其置为无效,那么优化器才能将后续SQL进行硬融会、生成新的实行盘算推算。这在当年只可使用清空分享池的时代或对表进行DDL操作。当今就不错指定刷新特定SQL的实行盘算推算。固然在10.2.0.4 和10.2.0.5的补丁纠合该包也被包含进来,该包的存储经过有三个参数,如下所示:
DBMS_SHARED_POOL.PURGE 皇冠棋牌( name VARCHAR2, flag CHAR DEFAULT 'P', heaps NUMBER DEFAULT 1) Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- NAME VARCHAR2 IN FLAG CHAR IN DEFAULT HEAPS NUMBER IN DEFAULT
第一个参数为逗号分隔的ADDRESS列和HASH_VALUE列的值。
博彩平台最低提现金额亚博色碟![银河娱乐城网址](/images/img/hg86a071.jpg)
第二个参数不错有多个选项,举例C、P、T、R、Q等。具体道理如下所示 C默示PURGE的对象是CURSOR
Set to 'P' or 'p' to fully specify that the input is the name of a package/procedure/function. Set to 'T' or 't' to specify that the input is the name of a type. Set to 'R' or 'r' to specify that the input is the name of a trigger. Set to 'Q' or 'q' to specify that the input is the name of a sequence. ...................................
第三个参数heaps,一般使用默许值1
狂热Heaps to be purged. For example, if heap 0 and heap 6 are to be purged: 1<<0 | 1<<6 => hex 0x41 => decimal 65, so specify heaps =>65.Default is 1, that is, heap 0 which means the whole object would be purged
在ORACLE 11g当中,你不错在$ORACLE_HOME/rdbms/admin/dbmspool.sql中检察该包的具体界说. 然而这个DBMS_SHARED_POOL.PURGE在10.2.0.4.0(实质测试发现10.2.0.5.0也存在相似问题)齐有一些问题,它可能无法收效,欧博官网appapp固然在Oracle 11g中莫得这个问题,具体演示如下所示:
在刚刚结束的大型体育赛事中,明星运动员YYY在比赛中展现出了惊人的实力和技巧,让所有观众都为之惊叹。不过,有传言称他在比赛前曾经遭遇了困难,差点儿放弃参赛。皇冠信用最新地址SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.5.0 - 64bit Production PL/SQL Release 10.2.0.5.0 - Production CORE 10.2.0.5.0 Production TNS for Linux: Version 10.2.0.5.0 - Production NLSRTL Version 10.2.0.5.0 - Production SQL> alter system flush shared_pool; System altered. SQL> set linesize 1200; SQL> select * from scott.dept where deptno=40; DEPTNO DNAME LOC ---------- -------------- ------------- 40 OPERATIONS BOSTON SQL> select sql_id, first_load_time 2 from v$sql 3 where sql_text like 'select * from scott.dept%'; SQL_ID FIRST_LOAD_TIME ------------- --------------------------------------------------------- 3nvuzqdn6ry6x 2016-12-29/08:51:21 SQL> col sql_text for a64; SQL> select address, hash_value, sql_text 2 from v$sqlarea 3 where sql_id='3nvuzqdn6ry6x'; ADDRESS HASH_VALUE SQL_TEXT ---------------- ---------- ---------------------------------------------------------------- 00000000968ED510 1751906525 select * from scott.dept where deptno=40 SQL> exec dbms_shared_pool.purge('00000000968ED510,1751906525','C'); PL/SQL procedure successfully completed. SQL> select address, hash_value, sql_text 2 from v$sqlarea 3 where sql_id='3nvuzqdn6ry6x'; ADDRESS HASH_VALUE SQL_TEXT ---------------- ---------- ---------------------------------------------------------------- 00000000968ED510 1751906525 select * from scott.dept where deptno=40 SQL>
如上截图所示,DBMS_SHARED_POOL.PURGE并莫得拆除这个特定的SQL的实行盘算推算,其实这个是因为在10.2.0.4.0 要收效就必须开启5614566 EVNET,不然不会收效。具体不错参考官方文档:
DBMS_SHARED_POOL.PURGE Is Not Working On 10.2.0.4 (文档 ID 751876.1) Bug 7538951 : DBMS_SHARED_POOL IS NOT WORKING AS EXPECTED Bug 5614566 : WE NEED A FLUSH CURSOR INTERFACE DBMS_SHARED_POOL.PURGE is available from 11.1. In 10.2.0.4, it is available through the fix for Bug 5614566. However, the fix is event protected. You need to set the event 5614566 to make use of purge. Unless the event is set, dbms_shared_pool.purge will have no effect. Set the event 5614566 in the init.ora to turn purge on. event="5614566 trace name context forever"
如下所示,建造5614566 event后,必须重启数据库才能收效,这个亦然一个比拟挫折的事情。
控股股东、实际控制人郑铁江保证信息披露的内容真实、准确、完整,没有虚假记载、误导性陈述或重大遗漏。
alter system set event = '5614566 trace name context forever' scope = spfile;
下一篇:太平洋官网网站账号被盗_“把壮乡风韵展当今更多东谈主眼前”