ocssd.bin引起的SWAP空间不足问题
问题症状:swap使用爆炸式增长 从 2G->8G-20G,最后SWAP耗尽 数据库DOWN机分析:1: vmstat 查看内存 物理内存有剩余 CPU 磁盘正常2: 在SWAP到达8G的时候,数据库几乎没有大负荷性能SQL 数据库运行良好3:每次SWAP耗尽后 重启过2次服务器 每次都是运行几小时就出现同样问题问题最后解决:prstat -as size 发现 SIZE列进程ocssd.bin占用了39G496 oracle 39G 15M sleep 59 0 0:00.00 0.0% ocssd.bin/11ocssd.bin 进程介绍:Oracle 集群同步服务 (OCSSD) 是 Oracle 集群就绪服务 (CRS) 的一个组件,用于 RAC 和使用 ASM 的单个实例数据库。
window+10g+rac安装问题
"You are missing local node, localhost information. Enter public node name, private node name and virtual host name for all the nodes in“解决方案:设置网卡的绑定识别顺序打开网络连接-》菜单栏的高级-》高级设置 选择pub网卡为第一顺序/etc/host的配置内容:127.0.0.1 localhost# Public192.168.2.101 rac1.localdomain rac1192.168.2.102 rac2.localdomain rac2#Private192.168.0.101 rac1-priv.localdomain rac1-priv192.168.0.102 rac2-priv.localdomain rac2-priv#Virtual192.168.2.111
主题: RMAN: Tablespace Point In Time Recovery (TSPITR) Procedure.
主题: RMAN: Tablespace Point In Time Recovery (TSPITR) Procedure. 文档 ID: 109979.1 类型: BULLETIN Modified Date: 28-JUN-2009 状态: PUBLISHED "Checked for relevance on 28-Jun-2009"Below describes TSPITR procedure using manual auxiliary intance. If you are running 10g or above, you may want to check below note that describes automaticTSPITR procedure:Note 335851.1 Automatic TSPITR in 10G RMAN -A walk ThroughTablespace point in time recovery (TSPITR) wi
Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g
文档 ID: 28814.1 类型: BULLETIN Modified Date: 23-SEP-2009 状态: PUBLISHED Handling Block Corruptions in Oracle7 / 8 / 8i / 9i / 10g / 11g Contents Introduction Overview of Steps to handle a Corruption Corruption due to NOLOGGING or UNRECOVERABLE (1) Determine the Extent of the Corruption Problem (2) Replace or Move Away from Suspect Hardware (3) Which Objects are Affected ? Options for various Segment Types: CACHE CLUSTER INDEX PARTITION INDEX LOBIND
windows下删除过期的文件脚本
调用:c:delete_log.bat=============contentcscript c:delete_log.vbs====================delete_log.vbs '需要自定义3个常量 Delete_Log_Dir Delete_Long Delete_His_Record' Option Explicit Dim m_lngFileCount Dim m_objFSO Const Delete_Log_Dir="E:HH" '定义被删文件所在目录' Command1_Click Private Sub DelFolder(strPath) Const ForReading = 1, ForAppending = 8 Const Delete_Long=2 '定义需要删除多少天前的日志' Const Delete_His_Record="c:kxt_errlo
ORACLE RAC:监听原理 简介
RAC1 RAC2 都需需要配置监听,各自监听自己的 实例;客户端使用SERVER的虚拟IP配置2个监听地址;为什么使用虚拟地址?监听地址使用 VIP(如果没有vip,连接失败节点的process会有一个比较长的tcp超时等待,才能返回错误,有了vip后,节点失效后,由于vip漂移到其它节点,连接该vip的process很快就能返回错误,从而更快的尝试连接其它活动的节点)客户最终连接到哪个INSTANCE?如果客户端没有指定连接到哪个实例则 决定分配到哪个实例由以下2个设置决定:Client-Side Load Balancing(CLB):由客户端tnsname.ora配置Server-Side Load Balancin
小程序:根据“列内容”查找内容在哪个表哪个列中
CREATE OR REPLACE PROCEDURE search_col1(p_look varchar2) IStmpVar NUMBER;v_col varchar2(3200);v_look varchar2(32);-已知的要查找的列内容v_colname varchar2(32);v_sql varchar2(3200);/**************************t**************************************************** NAME: search_col PURPOSE: REVISIONS: Ver Date Author Description --------- ---------- --------------- ------------------------------------ 1.0 2008-11-24 1. Created this proce
根据数据库告警日志 统计数据库不可用时间
创建目录:CREATE OR REPLACE DIRECTORY ALERT_LOG AS 'D:oracleproduct10.2.0adminorclbdump';GRANT READ, WRITE ON DIRECTORY ALERT_LOG TO PLOG WITH GRANT OPTION;创建外部表:CREATE TABLE PLOG.ALERT_PTS( TEXT VARCHAR2(1000 BYTE) NULL)ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER DEFAULT DIRECTORY ALERT_LOG ACCESS PARAMETERS ( records delimited by newline ) LOCATION (ALERT_LOG:'alert_orcl.log') )REJECT LIMIT UNLIMITEDNOPARALLELNOMONITORING;创建关机 开机字符时
"ORA-01846: 周中的日无效"
症状:执行SQL提示"ORA-01846: 周中的日无效"select to_date('Sun Aug 23 00:05:13 2009','Dy Mon DD HH24:MI:SS YYYY' from dual 原因分析:查看客户端注册表(客户端环境变量)nls_lang=SIMPLIFIED CHINESE_CHINA.ZHS16GBK解决:修改为客户端注册表(客户端环境变量)nls_lang=AMERICAN_AMERICA.zhs16cgb231280或者 会话级修改SQL> alter session set nls_language='AMERICAN';结果验证:SQL> select to_date(to_date('Sun Aug 23 00:05:13 2009','Dy Mon DD HH24:MI:SS YYYY'),'yyyy-mm-dd hh24:mi:ss') from dual;
绑定变量和共享SQL的深入分析
一:parent cursor与child cursor得区别 联系SQL> ALTER SESSION SET optimizer_mode = all_rows;SQL> SELECT count(*) FROM t;SQL> ALTER SESSION SET optimizer_mode = first_rows_10;SQL> SELECT count(*) FROM t;The result is that a single parent cursor (5tjqf7sx5dzmj) and two child cursors (0 and 1) arecreated.parent cursor:10g中v$sql,v$sqlarea的sql_id代表一个parent cursor.child cursors:child_number代表一个child cursors,plan_hash_value代表相同的执行计划user global area (UGA):存储指向SHARE P
连接Oracle 10g时ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 错误的解决
环境10G RAC(2NODES)+WINDOWS2003:症状:一直用着好好的,重启 数据库后,一开始偶尔出现以下错误,到后面 都连接不上 :ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 错误的解决分析:1:tnsping 服务名 OK2:ping IP 网络正常 无掉包3:查看监听日志,没有 大量客户请求 排除监听负荷过大可能造成的问题;4:有一个节点的监听日志 显示所有请求都能正确服务,另外个节点 都 是 “ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 错误的解决”5:重启 instance,asm,nodeapps 后半小时内
外部表:特殊字符串格式
文本 字符 串格式:jpg "Mozilla/4.0 (compatible; MSIE“ cc分析:通常分割符为 空格问题:这里双引号内包含有空格 (导致问题:双引号内字符串将不能作为一个字段处理),解决:创建表时增加特定语句实现双引号内字符串为一个字段: OPTIONALLY ENCLOSED BY '"' AND '"'CREATE TABLE PLOGXI.PROXY_LOG_01( str1 VARCHAR2(60 BYTE) NULL, str2 VARCHAR2(60 BYTE) NULL, str3 VARCHAR2(60 BYTE) NULL,)ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER
查找导致磁盘繁忙的应用程序
一:查看 卷组及对应的所有物理卷xxx:xx >lspvhdisk0 0009bebc4e6d09a9 rootvg activehdisk1 0009bebcc15ace7a rootvg activehdisk2 0009bebcc1961887 oracle active二:查看卷组及对应的文件系统#smit lsvg选择 第3项oracle: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv00 jfs2log 1 1 1 open/syncd N/A fslv00 jfs2 25
WAITEVENT: "library cache pin" Reference Note
主题: WAITEVENT: "library cache pin" Reference Note 文档 ID: 34579.1 类型: REFERENCE Modified Date: 06-OCT-2009 状态: PUBLISHED "library cache pin" Reference Note This is a reference note for the wait event "library cache pin" which includes the following subsections: Brief definition Individual wait details (eg: For waits seen in <View:V$SESSION_WAIT>) Systemwide wait details (eg: For waits seen in <View:V$SYSTEM_EVEN
AIX常用命令之 lslpp--查看 fileset
Commands Reference, Volume 3, i - m lslpp Command Purpose Lists installed software products. Syntax lslpp { -d | -E | -f | -h | -i | -l | -L | -p } [ -a] [ -c] [ -J ] [ -q ] [ -I ] [ -O { [ r ] [ s ] [ u ] } ] [ FilesetName ... | -b File | all ] lslpp -w [ -c ] [ -q ] [ -O { [ r ] [ s ] [ u ] } ] [ FileName ... | all ] lslpp -L -c [ -v] lslpp -S [A|O] lslpp -e Description The lslpp command displays information about installed fi
数据库DOWN之ORA-27061: waiting for async I/Os failed
症状:数据库日志记录Thu Oct 8 12:11:51 2009Errors in file /oracle/admin/cpqs/bdump/cpqs_dbw0_315766.trc:ORA-27061: waiting for async I/Os failedIBM AIX RISC System/6000 Error: 22: Invalid argumentThu Oct 8 12:11:51 2009DBW0: terminating instance due to error 27061Instance terminated by DBW0, pid = 315766原因分析 :主题: ORA-27061: waiting for async I/Os failed on IBM AIX RISC System/6000 Error: 22: Invalid argument 文档 ID: 464768.1 类型: PROBLEM Modified Date: 04-APR-2
CLUSTER 安装内容介绍及补丁安装方法
主题: Oracle Clusterware: Patch installation 文档 ID: 557934.1 类型: REFERENCE Modified Date: 30-JUL-2009 状态: PUBLISHED In this Document Purpose Scope Oracle Clusterware: Patch installation How Oracle Clusterware is Different from the RDBMS Types of patches Applying PatchSets Applying Bundle Patches (CRSBP/MLR) Conclusion References Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.4 to 11.1
查看OCR备份内容失败
主题: OCRDUMP -BACKUPFILE Is Failing With PROT-302 文档 ID: 782233.1 类型: PROBLEM Modified Date: 27-MAY-2009 状态: PUBLISHED In this Document Symptoms Cause Solution References Applies to: Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 This problem can occur on any platform. Symptoms The command : ocrdump -backupfile <filename> ; used to dump contents of a backup Oracle Cluster Registry (OCR) file will fa
ORACLE 密码策略验证程序
密码字符串要求:-- Check if the password is same as the username-- Check for the minimum length of the password-- Check if the password contains at least one letter, one digit and one-- Check if the password differs from the previous password by at leastCREATE OR REPLACE FUNCTION SYS.verify_function(username varchar2, password varchar2, old_password varchar2) RETURN boolean IS n boolean; m integer; differ integer; isdigit boolean; ischar boolean; ispunct boolean; digitarray va
OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack is running
主题: OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack is running 文档 ID: 390880.1 类型: ALERT Modified Date: 13-MAR-2009 状态: PUBLISHED In this Document Description Likelihood of Occurrence Possible Symptoms Workaround or Resolution Patches Modification History References Applies to: Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 Information in this document applies to any platfo