2012-02-14 dbms_shared_pool.purge
前阵子被问到有没有办法把某句特定SQL的execution plan flush出shared pool,或者强制生成新的执行计划。当时上了Metalink和Google一顿狂搜,毫无所获。后来从一个朋友那里得到这篇文章,正是我想要的,赶快记...
2012-02-14 level,connect_by_isleaf,connect_by_iscycle
nat@ORCL-10.1.16.14>select lpad(' ',4*(level-1))||e.empno empno,e.mgr,connect_by_isleaf,connect_by_iscycle,level from emp e start with e.mgr is null connect by nocycle prior e.empno=e.mgr;EMPNO &...
2012-01-17 口令文件
1.win和unxi下口令文件不同:grant sysdba to scottORA-01994: GRANT failed: password file missing or disabled参数:remote_login_passwordfile EXCLUSIVE重建口令文件:orapwd file=$oracle_hom...
2012-01-09 log errors into clause
新知识点1: log errors into clausescott@ORCL-10.1.16.14>exec dbms_errlog.create_error_log('emp','emp_log');PL/SQL procedure successfully completed.Elapsed: 00:00:00.00scott@ORCL-10....
2012-01-06 10gR2 HASH GROUP BY BUG
新知识点1:10GR2 HASH GROUP BY BUGBUG 描述:This problem is introduced in the 10.2.0.1 base release.Wrong results possible from the result of a non-distinct aggregation with a group by (such as sum(co...
2012-01-05 Redo Parallelism && In Memory Undo
新知识点1:Redo Parallelismhttp://www.hellodba.com/reader.php?ID=28&lang=cn Redo log 是用于恢复和一个高级特性的重要数据,一个redo条目包含了相应操作导致的数据库变化的所有信息,所有redo...
2011-12-21 11gR2 DBA_TAB_MODIFICATIONS BUG
新知识点1: 11GR2 DBA_TAB_MODIFICATIONS BUG查询 DBA_TAB_MODIFICATIONS 遇到BUGsys@ORCL-10.1.16.14>select * from v$version where rownum<2;BANNER---------------------------------------------------...
2011-12-20 supplemental log data
新知识点1: supplemental log data查询flashback_transaction_query 发现 OPERATION 为unknown,undo_sql 为空有两种可能:1.UNDO被覆盖2.未启用 supplemental logalter database add supplemental log data;alter ...
2011-12-16 MODEL实现列转行
新知识点1: MODEL实现列转行CREATE TABLE t_col_row(ID INT,c1 VARCHAR2(10),c2 VARCHAR2(10),c3 VARCHAR2(10));INSERT INTO t_col_row VALUES (1, 'v11', 'v21', 'v31');INSERT INTO t_col_row VALUES (2, ...
2011-12-15 Tuning Distributed Queries
Tuning Distributed QueriesThe local Oracle Database server breaks the distributed query into a corresponding number of remote queries, which it then sends to the remote nodes for execution. The re...
2011-12-14 USER_TAB_MODIFICATIONS
新知识点1: USER_TAB_MODIFICATIONSkey: select monitoring from user_tables where table_name='TABLE'alter table t monitoringexec dbms_stats.FLUSH_DATABASE_MONITORING_INFO;转自 http://foxmile.blog.163.co...
2011-12-13 gather statistics
巩固知识点1:收集统计信息包dbms_stats, ORACLE建议用这个代替analyze tableOracle在文档Doc ID: 433240.1中描述了统计信息被锁定的可能性:手工执行DBMS_STATS包的LOCK_TABLE_STATS过程;使用imp或impdp,...
2011-12-08 Exceptions into exceptions
新知识点1: Exceptions into exceptionsSELECT * FROM emp a WHERE rowid > ANY (SELECT rowid FROM emp b WHERE a.ename = b.ename ) 可以找到冗余的数据 今个发现还有一个比较简便的方法,如下使用 exception...
2011-11-30 dblink与执行计划
巩固知识点1: DBLINK 可能导致糟糕的执行计划:mig_atgcore@SEPMIGDB-UnknownIP>explain plan for SELECT DCC.CREDIT_CARD_ID, 2 DCCE.E...
2011-11-29 外键无索引
巩固知识点1: 外键上无索引的危害在编程艺术上就看到tom说过外键上没有索引是造成死锁的主要原因,今天在PUB上看到一贴,也是外键上没有索引的案例:同事用主键=value作为条件delete一个大表delete fr...
2011-11-28 数据库挂起
新知识点1 数据库挂起:数据库处于挂起状态,数据库所有的物理文件(控制文件/数据文件以及重做日志文件)的I/O操作都被暂停。这样能够保证数据库在没有任何I/O操作的情况下进行物理备份。挂起...
2011-11-25 打开与关闭dblink
新知识点一: 打开与关闭db link之前使用db link 都不知道有打开和关闭的说法, 今天在pub上偶然看到,引起了注意Closing Database LinksIf you access a database link in a session, then the link remain...
2011-11-24 awr分析之direct path read
巩固知识点1:direct path read, db file sequential read,db file scattered read今天在pub上帮人看一个awr,分析结果如下:Event Waits ...
2011-11-23 从这里开始 技术积累每日总结
左思右想,觉得每天可能能学到很多新东西,或者巩固了以前的知识,但是过久了就会忘,于是决定把每天积累的知识记录下来,可以定期去REVIEW,加深印象,也能在以后看到自己逐渐成长的过程。 新知识点...
Insert All & Insert First
一、无条件 INSERT ALL二、条件 INSERT ALL三、条件 INSERT FIRSTInsert…Select使用Insert Select实现同时向多个表插入记录2007/06/25一、无条件 INSERT ALL----------------------------------------...