Author: mac

  • Know more about RAC statistics and wait event

    以下列出了RAC中的主要统计信息和等待事件:   1. Statistics: 1.1 V$SYSSTAT, V$SESSTAT (join to V$STATNAME) gc cr blocks served gc cr block build time gc cr block flush time gc cr block send time gc current blocks served gc current block pin time gc current block flush time gc current block send time gc cr blocks received gc cr block…

  • 11g Real Application Testing:Database Replay使用方法

    .  Database Replay使用方法   1.1       捕获性能负载   1. 针对需要捕获性能负载时段执行如下PL/SQL脚本:      execute dbms_workload_capture.start_capture(‘&CAPTURE_NAME’,’&DIRECT_NAME’,default_action=>’INCLUDE’);  CAPTURE_NAME=> 本次capture的名字 可以通过 DBA_WORKLOAD_CAPTURES 视图监控   DIRECTORY_NAME=> ORACLE目录对象名,该目录用以存放catpure文件,现有测试表明在繁忙的OTLP数据中收集10分钟数据消耗磁盘空间1GB,建议为该目录分配足够的磁盘空间             2. 可以通过如下SQL监控capture的情况   查询1:select id,name,status,start_time,end_time,connects,user_calls,dir_path from dba_workload_captures where id = (select max(id) from dba_workload_captures) ;  set pagesize 0 long 30000000 longchunksize 1000 select dbms_workload_capture.report(&ID,’TEXT’) from dual;   其中ID是查询1获得的ID值…

  • runInstaller -ignoreInternalDriverError

    runInstaller -ignoreInternalDriverError,如果在使用OUI安装Oracle软件时遇到INS-30060错误的会可以考虑在runInstaller时加上该参数,绕过内部错误:     INFO: Validating state INFO: … PrivilegedOSGroupValidator: entering validate() SEVERE: [FATAL] [INS-30060] Check for group existence failed. CAUSE: Unexpected error occurred while trying to check for group existence. ACTION: Refer to the logs or contact Oracle Support Services. Note for advanced users: Launch the installer by passing the following flag ”-ignoreInternalDriverError”.. Refer…

  • RMAN CURSOR_SHARING=EXACT脚本

    RMAN CURSOR_SHARING=EXACT脚本     CREATE OR REPLACE TRIGGER RMAN_CURSOR_SHARING AFTER LOGON ON DATABASE BEGIN if (upper(sys_context(‘USERENV’, ‘MODULE’)) like ‘%RMAN%’) THEN execute immediate ‘ alter session set cursor_sharing=EXACT’; END IF; END;

  • 在AIX 6.1上安装11gR2 RAC

    以下在AIX 6.1+Veritas CFS环境上安装11gR2 RAC : 1.  11gR2 GI/RAC安装预备工作 1.1       安装环境: 硬件环境为2节点IBM p系列小型机,每个节点物理CPU数目32个,内存509440 MB,交换空间32768MB操作系统版本为64bit AIX 6.1(6100-06-09-1228)。     Setting Value Machine and version AIX macleandb-007 1 6 00F71C964C00 Fully qualified host name macleandb-007 Platform 64-bit AIX O/S Version 6.1.0.0 O/S Maintenance Level 6100-06 O/S Service Pack Level 6100-06-09-1228 Logged in as oracle Last run as uid=1101(oracle)…

  • CRS-5008: Invalid attribute value

    在用oifcfg修改一个11.2.0.2  RAC的public interface的时候遇到了该错误,该错误常见的原因是: 1. BUG 12559708 BUG 11077013 BUG 12888041 BUG 12870719 bug 12876147 bug 13425057 bug 13738734 bug 13846043 2. 用oifcfg 修改public 后未为使用 svrctl modify nodeapps -n <nodename> -A 90.224.207.150/255.255.255.224/nxge0\|nxge2 修改network服务资源属性 3. 子网掩码搞错,如果mask是 255.255.255.128,则网段结尾要求也是128 常见的诊断步骤是观察: 1.crsctl status resource  ora.net1.network -p 2.  $GRID_HOME/log/<hostname>/agent/crsd/orarootagent_root/orarootagent_root.log 3.考虑reboot node可能可以解决,最主要的仍是保证网段和掩码正确   常见错误信息为 orarootagent_root.log中出现: 2011-08-15 18:43:44.105: [ora.net1.network][21] {1:1729:2} [check] subnetmask=0.0.0.0 2011-08-15 18:43:44.105:…

  • Script:计算Oracle Streams进程所占用的内存大小

    以下脚本可以用于收集Oracle Streams进程的内存使用信息, 便于诊断因memory leak引起的内存问题:   ps auxgw | sort  -n +5 | tail -10 select a.apply_name,        a.server_id,        b.sid,        b.program,        c.spid,        trunc(c.pga_used_mem / (1024 * 1024), 2) PGA_USED,        trunc(c.pga_alloc_mem / (1024 * 1024), 2) PGA_ALLOC,        trunc(c.pga_freeable_mem / (1024 * 1024), 2) PGA_FREE,        trunc(c.pga_max_mem / (1024 * 1024), 2)…

  • Oracle内部视图X$KFFXP

    X$KFFXP是ASM(Automatic Storage Management)自动存储管理特性的重要内部视图,该视图反应了File Extent Map映射关系,ASM会将文件split成多个多个piece分片,这些分片被称为Extents。 在Disk上存放这些Extent的位置,就是我们常说的”Allocation Unit”。   KFF意为Kernel File,X$KFFXP即Kernel File Extent Maps, 该内部视图的一条记录代表一个Extent。   其字段含义如下:   GROUP_KFFXP        diskgroup number (1 – 63) ASM disk group number. Join with v$asm_disk and v$asm_diskgroup NUMBER_KFFXP      file number for the extent ASM file number. Join with v$asm_file and v$asm_alias COMPOUND_KFFXP    (group_kffxp << 24) + file # File identifier.…

  • Exadata Smart Flash Logging新特性

    从Exadata Storage Software 11.2.2.4开始引入了Exadata Smart Flash Logging的新特性,该特性允许LGWR进程将redo同时并行写入flash cache 和 disk controller 中, 只要在flash cache 和 disk controller中有任意一个率先写完成就会通知RDBMS数据库继续工作, 该特性着眼于改善了Exadata对Redo写入的响应时间和吞吐量。(The feature allows redo writes to be written to both flash cache and disk controller cache, with an acknowledgement sent to the RDBMS as soon as either of these writes complete; this improves response times and thoughput.);特别有利于改善log file sync等待事件是主要性能瓶颈的系统。 当频繁写redo重做日志的IO成为Exadata一体机的主要性能瓶颈的时候,Exadata开发部门自然想到了通过DBM上已有的flashcache来减少响应时间的办法。但是又要保证不会因为flashcache的引入而导致redo关键日志信息的丢失:…

  • enq: MS – contention Oracle等待

    当物化视图刷新时,可能出现大量的enq:ms等待事件     The event is raised because the MV is recompiled. The alter summary compile is fired because the MV is created with query rewrite enabled. The select query on the base table will try rewriting with the MV. But since MV is being refreshed, its invalid and therefore compile statement is fired. This…