Declarative Rule-Based transformation Streams
As I mentioned last time, there are 2 type of Rule transformations, one is declarative rule-based transformation (rules provided by Oracle itself), and the other is Custom rule-base transformation ( rules coded by Oracle users, write PL/SQL to realize the rule).[@more@]As I mentioned last time, there are 2 type of Rule transformations, one is declarative rule-based transformation (rules provided by Oracle itself), and the other is Custom rule-base transformation ( rules coded by Oracle users, wr
Error: cannot fetch last explain plan from plan_table
环境:OS: Solaris 10DB: 10.2.0.3今天碰到这样的怪事,用dbms_xplan.display显示一条SQL执行计划时,报错"Error: cannot fetch last explain plan from plan_table". 一开始就觉得Plan_table的版本是不是过时了,也没仔细看,就重新生成plan_table,再跑刚条SQL,还是报一样的错误,这样看来,就不是Plan_table版本的问题了,那会不会是SQL本身的问题呢?换一条SQL:select sysdate from dual,通过dbms_xplan.display正确显示结果,再跑一下有问题的那SQL,错误依旧。从上面的现象来判断,那应是SQL本身的问题。分析一下出问题的
du和df
两个命令常用于计算/查看磁盘使用率:df: 查看文件系统空间使用率.du: 常用于查看一个目录下的文件占用磁盘空间大小。[@more@]今天一同事,在Solaris 10上做数据库升级遇到问题,把ORACLE_HOME空间不够了,赶紧df看一下,8G的空间使用了95%,但有点疑惑的是,整个Oracle数据库软件,不可能占用8G空间的呀?肯定里面的某个或几个不相关文件占用了比较大的空间,跑到ORACLE_HOME目录下 du -sk,屏幕显示的是2G,这个跟df的结果相差太远了。难道du计策有误,没有统计到相关的目录? 还是自己写段bash shell来处理,检查ORACLE_HOME下的每个目录占
Oracle 10G/11G自带DBI了
Oracle 10G/11G自带了DBI[@more@]Oracle9i及之前的版本,如果用Perl访问Oracle,还得用ppm安装DBI包或编译器编译源代码。 10G之后,貌似这一情况改变了。自己的台式机上装了11G,就上面测试通过了。在Linux上的10G也测试没问题。主要之前要设置下面几个环境变量:PATH, PERL5LIB, LD_LIBRARY_PATH附上测试的日志Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.c:>set PATH=C:appproduct11.1.0db_1perl5.8.3binMSWin32-x86-multi-thread;%PATH%c:>echo %PATH%C:appproduct11.1.0db_1perl5.8.3binMSWi
执行计划导致错误的结果
执行计划导致不正确的结果.[@more@]环境:Oracle: 10.2.0.4OS: Redhat Linux 2.6.9-42.ELsmp构建测试环境:CREATE TABLE AA( A NUMBER(11,0),B VARCHAR2(12),C NUMBER(11,0)) ;CREATE TABLE AB( D VARCHAR2(4) NOT NULL ENABLE,ID NUMBER(11,0),DATE1 DATE NOT NULL ENABLE,B VARCHAR2(12) NOT NULL ENABLE,C NUMBER(11,0) NOT NULL ENABLE);CREATE TABLE AC( ID NUMBER(11,0) NOT NULL ENABLE,E VARCHAR2(50)) ;CREATE TABLE AD( F NUMBER(2,0) NOT NULL ENABLE,E VARCHAR2(20) NOT NULL ENABLE) ;insert into AA values(2155,'0000000000
Slow expdp with parallel when exporting LONG RAW data type
A case I suffered recently.Normally, expdp is more efficient than triditional exp, so many users tend to use expdp. yet, there are some limitions on this tool, or performance issue. since it is a new tool, it can be perfect. below is the case, I met recently.[@more@]Environment:OS: AIX 5.3.0.0, Num of Physical CPU: 8, Physical Mem 20GBDB: 10.2.0.3This case happened last Saturday during the process to deploy an application release. As the plan scheduled there was a step to export the whole databa
LOGMNR遭遇Ora-600
LOGMNR遭遇Ora-600OS: AIX 5.3.0.0DB: 10.2.0.3数据被误删除之后,最容易想到的解决方案是logmnr, 但logmnr也时也会出问题(在非常时期,真是什么都有可能)。按照logmnr的操作流程:SQL> dbms_logmnr.add_logfile(‘归档文件全路径’, dbms_logmnr.new);SQL> dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);SQL> create table temp_logmnr as select * from v$logmnr_contents; create table temp_logmnr tablespace data_01 as select * from v$logmnr_contents
转一篇AIX内存配置的文档
AIX内存分为计算页面和非计算页面。Oracle跑在AIX上所分配的内存SGA属于计算页面,出于对oracle性能的考虑,应尽量减少计算页面的换出,曾经碰到在AIX默认的参数配置中,当oracle做备份时,大量的SGA被换出,导致前端报性能问题。这里转一篇metalink 316533.1SymptomsDatabase performance continues to get slower and slower the longer the database is left running. You may also notice a continuing increase in the amount of paging space usage the longer the database is left running. However, database performance return
Temporary LOB导致临时表空间暴满.
环境:OS:linuxDB:10.2.0.4引子:最近的数据库时不时的报临时表空间的满的警告,后来跟踪代码,发现是做CLOB操作时,导致的。测试代码:先建一个临时表空间,文件大小为100M, 开三个session, 依次在每个session里跑下面的代码:declareclb clob;ch varchar2(32767);k number;begindbms_lob.createtemporary(clb,true,dbms_lob.call);for i in 1..1500 loopch:=lpad('o',32767,'Y');dbms_lob.writeappend(clb,length(ch),ch);end loop;k:=dbms_lob.getlength(clb);dbms_lob.freetemporary(clb);dbms_output.put_line('the clob length:
Ora-600 [17059]
前一段时间碰到的问题.环境:DB:Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64biOS SunOS 5.10 Generic_127111-11 sun4u sparc SUNW,Netra-T12具体的错误:ORA-00600: internal error code, arguments: [17059], [0x4468DA9C8], [], [], [], [], [], []处理:从alert 文件里找到相应的trace文件, trace文件的内容:LIBRARY OBJECT HANDLE: handle=48af69c08 mtx=48af69d38(0) cdp=237name=把错误时执行的SQLhash=5a6bb2113c18cd8df5bb3c573f18f594 timestamp=02-14-2009 17:20:24namespace=CRSR flags=RON/KGHP/
Oracle 10G streams configuration example.
Streams configuration step by stepStreams is a new way to duplicate data. Normally, we have the Streams to duplicate data from one database to another database; we can also have the data duplication with Stream technology within one database, Here, I will give an example to do Streams configuration in a database to duplicate data from one schema (TEST1) to another schema (TEST2).Environments:OS: Linux version 2.6.9-67.ELsmpOracle: Oracle Database 10g Enterprise Edition Release 10.2.0.4.01, Overv