Tuesday, May 29, 2007

Bad magic number

Hope this title didn't shock you.

Today is a nightmare day! While on the to office, someone SMS me that tens of jobs are failed.
Below is the funny message.

ORA-28575

/usr/lib/dld.sl: Bad magic number for shared library:
/home/app/oracle/product/9.0.1/lib/libclntsh.sl.9.0
/usr/lib/dld.sl: Exec format error

When spoke out this to sysadmin, 3 sysadmin jumped up and 3 others laughed.

While I was investigating, quite a few Managers checked with me other areas and question me WHY WHY WHY.
Not in the mood. Are their things important than production problem? Appreciate they can "PLAN" better in future in a whole picture.

Back to the subject, this is caused after change the ORACLE_HOME in the profile, subsequently caused the LIB_LIBRARY_PATH can't find 32bit lib file.

i.e the SHLIB_PATH includes $ORACLE_HOME/lib (64bit) and does not include lib32 (32bit).


ORA-1031 : change oracle owner group

Today hit ORA-01031 Insufficient Privilege during running dbua .

Action taken:
1. Update the new group of oracle owner in $ORACLE_HOME/rdbms/lib/config.c (this is HP-UX platform, other platform could be config.s)
2. make -f ins_rdbms.mk config.o ioracle

Explanation from Oracle
By modifying the OSDBA and OSOPER values in the "config.c" or "config.s"
file you can change the group that has OSDBA and/or OSOPER privlidges in
the database.

Thursday, May 24, 2007

TSM产品大比拼擂台

BMC
BMC Remedy ITSM Suite;BMC Magic Service Desk Suite
Remedy解决方案包括事件、问题、变更和资产管理模块,底层开发平台的灵活性是其最大优势。

CA
管理解决方案、桌面管理、作业调度管理解决方案、eTrust 安全管理解决方案、BrightStor存储管理解决方案等,产品非常全面。
ServicePlus Service Desk解决方案可以与Unicenter解决方案集成,共同管理基础设施,也可以独立实施。

HP
OpenView Service Desk及OpenView品牌下企业管理产品线中的资产库存、配置以及相关工具,比如OpenView Compliance Manager与OpenView SOA Manager。
Service Desk与OpenView实现紧密集成。OVSD本身在遵从ITIL上非常严格,而在收购Peregrine之后,OVSD的灵活性将得到增强。

IBM

Tivoli 流程集成、Tivoli变更和配置管理数据库(CCMDB)、Tivoli流程管理软件、Tivoli的技术平台;Tivoli License Manager;IT服务管理的相关服务。
Tivoli软件的配置管理数据库领引了ITSM的热点,同时,Tivoli技术平台上针对各个具体领域(比如监控)的软件工具正日益完善。

运用HP OpenView实施ITSM理念

ITSM (IT服务管理)是一套帮助企业对IT系统的规划、研发、实施和运营进行有效管理的方法,是全球领先的、为企业解决IT部门机制转变的一套行之有效的理论 体系。ITSM起源于ITIL(IT Infrastructure Library, IT基础架构标准库)。ITIL 是CCTA(英国国家电脑局)于1980年开发的一套IT服务管理标准库。它把英国各界在IT管理方面最好的方法归纳起来,变成规范,为企业的IT部门提 供一套从计划、研发、实施到运行维护的标准方法。这套标准已经被欧美很多企业采用,目前,全球有1万多家知名企业参照它来管理自己的IT系统。
ITSM强调流程、人员和技术三大要素的有机结合,ITSM在实施过程中不仅部署相应的管理工具,同时将根据企业的具体情况制定人员的岗位职责、设计日常 工作流程,以及突发事件和问题管理流程等等。ITSM的实施改变了过去IT服务被动的“救火”式的服务理念,更关注流程及技术和业务的结合,最终降低成 本,优化服务。

实施ITSM前 实施ITSM后
用户 客户
向内看 向外看
关注技术 关注流程
突发流程 合理的改进的流程
离散的 综合的,端到端的
被动的 主动的
业务经理 服务经理
系统技巧 倾听技巧

惠普是ITSM的主要推动者和倡导者,惠普在ITIL标准的基础上,加入自己多年来对各行业的IT部门进行服务支持的运营经验,设计了惠普独有的ITSM 模型。同时开发了实现ITSM的工具,即:OpenView家族产品,OpenView也是第一家符合ITIL标准的软件。OpenView Service Desk作为服务管理模块实现了ITSM理念,以下简要介绍它的几大主要功能。


1. 事件管理(服务请求管理)
事件管理负责响应突发事件或服务请求,使服务在最短时间内恢复,并与客户沟通解决方案。事件管理实施以下三种功能:
a) 作为IT和最终用户之间的日常接口
b) 为业务运作提供支持
c) 提供管理信息
事件管理流程不包括解决事件的潜在问题(发生问题根本原因),这些是由问题管理和变更管理来处理的。事件管理只是简单地用最快的方法使服务恢复正常,这通常会涉及临时的解决办法或避开问题的方法。

2. 问题管理
问题管理分析事件数据,查找问题的根本原因,采取行动避免事件再次发生。它的主要目的是提高服务的有效性和质量,确保处理根本原因的长期方案能顺利实施, 以减少已知问题的再次出现。事件管理被形容成“救火”,是用最快的方式是服务恢复正常。而问题管理则被描绘成“防火”,是采取纠正行动以消除导致问题的根 本原因。问题管理包括以下内容:
a) 问题识别
b) 问题根本原因的分析
c) 开展纠正行动
d) 提交纠正行动的变更请求
e) 确保变更请求能满足纠正行动的目标
f) 维护问题数据库

3. 配置管理
配置管理的主要目标是识别、控制、维护和检验所存在的配置项以提供基础设施或服务的逻辑模型。配置管理是一个跨功能的流程,为IT部门提供快捷准确的决策 支持。它把所有的IT基础设施所涉及到的软件硬件以及服务都看作是一个配置项,记录配置项的状态,以便在最快的时间内了解IT环境的现状。

4. 变更管理
变更管理负责控制所管理的IT环境的变更,包括增加、减少或替换环境中的任何一个部件(配置项)或服务。凭经验,如果一个配置项需要改变,会给IT环境带来一定的风险,需要遵循变更管理流程来使风险降到最低。

OpenView Service Desk 的应用实施了ITSM理念,改变以往以技术专家为主的IT维护和管理模式,从技术主导转变为流程主导,从而消除IT服务过程中对单个人的依赖,实现IT服务的“工程化”。


About ITIL

五年前,在英国之外没人听说过ITIL。现如今,拿起任何一本贸易杂志,就会发现有人提到这个名词。但尽管人们大肆宣传ITIL,许多IT专业人士并不完全了解ITIL到底指的是什么。下面是对它的一些主要介绍。

1:ITIL代表信息技术基础构架库

ITIL包括一组用来开发并执行IT服务管理的广泛最佳实践。它具有许多优势,包括通过降低成本、增长与灵活性增强竞争优势、通过简化业务流程提高效率、通过商业与IT运作与目标调整促进IT价值、以及改善内部客户与用户满意度。

2:支持ITIL的组织团体位于英国

自20世纪80年代以来,总体的ITIL方法就已成形,并多年在互联网上发布。但是,在许多重要的大型公司和媒体出版物开始注意它之前,它在美国还不为人所知。现在全世界有一万多家公司采用ITIL。

3:ITIL由一系列提供指导与建议的书籍构成

ITIL正在进行一些更新与重建来反映技术变化。现在,有关书籍包括以下领域:

ITIL介绍
服务支持
服务交付
执行服务管理规划
安全管理
商业前景
ITC基础构架管理
应用管理
软件资产管理
小规模执行过程

4:ITIL强调,要取得成功,需要一个强大的发起人

ITIL是一项文化转变计划。由于所做的事情与以往不同,人们会产生抱怨。您需要一个强有力的发起人来推动这种转变。如果没有这样的发起人,不要尝试执行ITIL——或寻求有限的成功。

5:ITIL不是项目管理

ITIL并不注重建立包括项目在内的事物;相反,它着重向公司提供IT服务。

6:虽然极为流行,ITIL的内容有限

ITIL由一套方法和最佳实践组成。它是一个提供IT服务的模型。它确实包含一些过程与模板,但它不是方法,并不包括所有的执行细节。希望执行ITIL的公司能够遵循ITIL的总体指导方针,然后为某个组织开发出更为详尽的过程。

7:ITIL不是一个工具

您可以使用工具执行许多ITIL内容,但工具并非必要。如果公司规模较小,只需要一些简单的模板与电子表格。如果公司规模较大,您可能需要找到合适的软件进行辅助。


8:ITIL并不是一个极端的主张


既然ITIL由各种领域内的一系列方法构成,但公司却可以执行部分或所有模型。没有规定要您执行全部模型。



9:您可以分阶段执行ITIL


也没有规则规定您必须一次执行所有的ITIL模型。许多公司在一段时期内分阶段执行ITIL。


10:您可以通过ITIL认证

共有三种级别的ITIL认证:


基础认证:通过这一级认证表明您理解术语并了解ITIL模型的基本知识。
实践认证:通过这一级认证表明您对模型有了一定了解,能够在适当的地方应用特定、正确的ITIL过程。
管理认证:这一级别主要针对对ITIL服务进行管理的从业人员。 (zdnet)

论中国ITIL实施

ITIL在中国的金融、电信领域已经大部分实施并运行良好。在一些国内的一些外资企业(如motorola,bosch,amway等)和最前沿的IT公司(如alibaba)已经开始实施。但对中国来说, ITIL还是刚刚起步,许多企业实施都是被动的接受。有 部分企业虽然实施了ITIL项目,但并没有真正的得以灌输和利用,企业中的领导和员工没有加以重视,还只是个形式而已。主要是大家的观念没有转变过来,往 往是遇到了问题先用技术解决,然后再去做一些形式上的流程处理,所以ITIL实施的关键是要让企业的观念得以转变,要不然纯属是浪费资源。看来,市场成熟需要过程,成熟的服务、成熟的客户。。。。。。

向版主反映这个帖子

Recover from loss of the password file

--set REMOTE_LOGIN_PASSWORDFILE=NONE
--then re-create it and reset REMOTE_LOGIN_PASSWORDFILE to EXECLUSIVE again

Recovering from a Read-Only Tablespace

--If no change sicne the time made it read-only, just restore the datafiles will do
--However, if changes was made after you backup the tablespace. All the redo logs are quired since the moment are required . (SCN basis)

Wednesday, May 23, 2007

Mview log is not purged

Today during analyze the growing trend of one tablespace and noticed that the biggest segment is a materialized view log. What a big size ! 7Gb , while the master table is only 21Mb.

After do some research, suspected this could be an orphan mview log from previous upgrade.

Key tables to lookup for investigation are:
master_owner.mlog$_master_table (snaptiem$$)
sys.slog$ (snaptime and snapid)
dba_regestered_mviews(mview_id)
dba_rgroups, dba_refresh_children( for those using refresh group)

Q:When mivew log is purged?
A: Only when all regiested mviews are refreshed, i.e check that all sys.slog$.snaptime are equal or before
master_owner.mlog$_master_table.snaptime$$


From this practice, I also learned that if the refresh method is complete, no mview log is required.


How to check locality of partition table's index

select LOCALITY from dba_part_indexes where index_name='';

LOCALITY indicates whether this partitioned index is LOCAL or GLOBAL.

Tuesday, May 22, 2007

Error Message: "Total lru latches configured: 1; latches required for buffer pools = 2"

This occurred in one 8i database during failover to another sever with less CPUs.
Solution
1.This is due to CPU changed from 4 to 2 after permanently switch to another server, which affects db_block_lru_latches (default is CPU/2).
2.comment out init parameter buffer_pool_keep and alter affected table's buffer pool to DEFAULT.

Recovering from loss of an Index Tablespace

Detail steps:
1. alter tablespace INDEX offline immediate
--IMMEDIATE keyword instructs Oracle to take the tablespace offline with attempting to flush any dirty buffers from the tablespace to disk.

2. Prepare the DDL from dictionary for recreation, before drop the damaged tablespace
2.1 Either by check the dicionary : dba_ind_columns
2.2 Or dbms_metadata.get_ddl
2.3 Or use database pump
a) expdp hr/hr directory=dp_dir dumpfile=ind.dmp include=index;
b) then export to a text file
impdp hr/hr directory=dp_dir dumpfile=ind.dmp sqlfile=ind.sql
3. Drop the tablespace and delete its datafiles
--drop tablespace including contents and datafiles;
4. Create a new tablespace
5. Re-create the indexes. To speed up creation, using nologging and parallelism.

Monday, May 21, 2007

recovering from loss of an Online Redo Log File

Method 1:drop the damaged member and add a replacement member
1. drop the member
-- alter database drop logfile member '';
2. delete the file from disk physically
3. add a new member
-- alter database add logfile member '' to group ;


Method 2: clear the group (simple and devoid of any chance of error)
--This works only when no disk problem and the group has been archived
e.g
alter database clear logfile group 1;

recovering from loss of a Temporary Tablespace

1.add another tempfile to the damaged temporary tablespace
2.take the damaged tempfile offline
3. Drop the damaged file
e.g
--alter tablespace temp_ts3 add temfile '' size 100M;
--alter tablespace tempfile '' offline;
--alter tablespace tempfile '' drop;

or work at the tablespace level
1. Create a new temporary tablespace
2. Switch users to the new temporary tablespace via ALTER DATABASE command
3. Drop the damaged tablespace
--alter tablespace temp_ts3 add temfile '' size 100M;
--alter tablespace tempfile '' offline;
--alter tablespace tempfile '' drop;

Create DB Control in Active/Passive High Availability Environments H/A

Before create DB Control, if environment variable ORACLE_HOSTNAME is not exported. The default DB Control Agent Name would be DBConsole__SID.

Since it is using actual hostname, this will cause DB control can't work upon failover.

The idea way is using virtual name.
Should you forget this , you can try to re-create DB control on both node, prior to create database or run dbua
i.e
export ORACLE_HOSTNAME=
emca -config dbcontrol db -repos recreate