记录一次9i单节点转rac,以及一套rac存储迁移之后的整体容灾方案

数据库版本9.2.0.1 OS版本 AIX5

由于9.2.0.1的默认maxlogfiles 为5 maxinstance 为1所以需要重建controlfile 修改maxinstance为4 maxlogfiles 为 16

SQL> alter database backup controlfile to trace;

cd $ORACLE_BASE/admin/priap/udump/

查看最新的trace文件 priap_ora_143648.trc

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATAB[……]

Read more

使用job scheduler重建索引

在数据库优化中Index 是一个重要因素。在Oracle 10g中,rebuild online是组建索引的一个重要特性。
在以下情况下应该考虑重建索引:
• 删除的行数超过了总数的30%, 就是说 DEL_LF_ROWS / LF_ROWS > 0.3.
• 索引的高度大于4.
• 叶子节点的行数 (‘LF_ROWS’) 明显小于叶子块的数量(‘LF_BLKS’)这表明大量的数据被删除了, 需要重建索引.
• BLOCK_GETS 大于 5

在一个数据库中可能存在成千上万条索引,这样手工的去重建可能不是一件容易的事情,所以可以考虑使用job scheduler 来重建索[……]

Read more

AIX pTools — 进程监控的一组工具

pTools — 进程监控的一组工具
{
pTools是AIX 5.2中引进的System V UNIX 提供的一组极有用的工具,用于查看进程相关的信息。包括命令:
{
procwdx,
procfiles,
procflags,
proccred,
procmap,
procldd,
procsig,
procstack,
procstop,
procrun,
procwait,
proctree
}
procwdx, — 显示进程的当前工作目录。如:{
ccd[……]

Read more

svmon -S中inuse的求和脚本及其结果比svmon -G小的原因

很多客户可能认为svmon -S中inuse的求和结果和svmon -G中的inuse一样,但是实际是不一样的。下面的脚本可以用来统计svmon -S中的inuse的相加结果:

#!/usr/bin/ksh
svmon -S | cut -c54-62 | awk ‘/^[-sLm]/ {if ($1 ~ /L/)
{COUNT1 =($2*4096+COUNT1)}
else if ($1 ~ /m/)
{COUNT2 =($2*16+COUNT2)}
else {COUNT3 =$2+COUNT3}}
END {printf “The result is as f[……]

Read more

一次cursor: pin S wait on X的解决

环境描述:双节点rac 数据库版本10.2.0.5 通过awr发现down机时间段产生大量的cursor: pin S wait on X等待,同时伴随大量的library latch等待,通过与相关人员沟通得知,此库在每月的月头都会有大量的报表业务,从而负载将会增长几十倍之多。通过下面
的awr可以看出负载确实很高:

DB NameDB IdInstanceInst numReleaseRACHost

PORTALDB597889515portaldb1110.2.0.5.0YESptdb01

Snap IdSnap TimeSes[……]

Read more

手动升级9i-10g全步骤

某局威武,升级弄完都到凌晨6点了 居然还要搭DG ,下面记录这次的升级过程(9.2.0.7-10.2.0.4)

迁移步骤:

1 首先安装10g的数据库软件,基于当时的AIX情况,由于系统是通过OS升级重新导入到P6 570上的需要重新开启AIO,数据库版本为9.2.0.7 需要再打一个bos.cifs.**补丁

2 copy 10g ORACLE_HOME/rdbms/admin 下的脚本
ORACLE_HOME/rdbms/admin/utlu102i.sql /tmp/utlu102i.sql
ORACLE_HOME/rdbms/admin/utltzuv2[……]

Read more

处理一个ORA-00600: internal error code, arguments: [keltnfy-ldmInit] 错误

今天偶尔碰到一个ORA-600错误:

[oracle@honcho ~]$ sqlplus sys/oracle@honcho as sysdba

SQL*Plus: Release 10.2.0.1.0 – Production on Sat Oct 29 18:25:11 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> conn / as sysdba
Connected to an idle instanc[……]

Read more

基于foreign key 没有index引起的ssx锁等待的测试

创建测试环境:
[oracle@yang ~]$ sqlplus ‘/as sysdba’

SQL*Plus: Release 10.2.0.4.0 – Production on Thu Oct 27 00:03:46 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – Production
With the Partitioning, O[……]

Read more

Scroll to Top