db2 uninstall

在db2的安装目录中,例如:/opt/ibm/db2/v9.5/install中执行db2_deinstall命令,尝试卸载已经安装的db2可能遇到如下错误:

—————————————————————————————————————————————–

ERROR:There still exists DB2 instances related to the current installation directory where DB2 files are going to be completely uninstalled. The deinstallation process can’t continue because of this. If the deinstallation is for moving up or down DB2 level for the current DB2 installation, you need to use installFixPack in the DB2 images of the desired DB2 Level to update the current DB2 installation. If the purpose is to just uninstall DB2 in the current location, you need to drop the DB2 instances related to the installation directory if they are not needed any more. Or you need to update the DB2 instances to other DB2 installation location for the same version of DB2 and then restart db2_deinstall.

——————————————————————————————————————————————

解决的方法可以参考ibm官网的一些page,如下:

http://www-01.ibm.com/support/docview.wss?uid=swg21469364

Problem(Abstract)

When uninstalling an unused DB2 installation path after an upgrade to a new version or fix pack the db2_deinstall command fails stating instances still exist for the install path you wish to uninstall.

Symptom

The following message is seen:
ERROR:There still exists DB2 instances related to the current installation directory where DB2 files are going to be completely uninstalled. The deinstallation process can’t continue because of this. If the deinstallation is for moving up or down DB2 level for the current DB2 installation, you need to use installFixPack in the DB2 images of the desired DB2 Level to update the current DB2 installation. If the purpose is to just uninstall DB2 in the current location, you need to drop the DB2 instances related to the installation directory if they are not needed any more. Or you need to update the DB2 instances to other DB2 installation location for the same version of DB2 and then restart db2_deinstall.

Cause

The profiles.reg file in the installation path still contains references to the upgraded instance.

 

Environment

This is applicable to DB2 V9.1 and V9.5. Starting in V9.7 the profiles.reg file as been removed.

 

Diagnosing the problem

First, check to make sure your instance does not belong to the level you wish to uninstall by running “db2level” as the instance owner. You can also use “db2greg -dump” to verify the current level of the instance. If the instance no longer appears to be on the level you wish to uninstall then view the profiles.reg file to see if the instance is listed. The profiles.reg file is located under the DB2 installation path.

Example:

/opt/ibm/db2/V9.5

 

Resolving the problem

Remove the entry in the profiles.reg file using an editor, such as vim. Or, you can rename the file and create a new, blank profiles.reg file. Example:

 

mv /opt/ibm/db2/V9.5/profiles.reg /opt/ibm/db2/V9.5/profiles.bak

touch /opt/ibm/db2/V9.5/profiles.reg

db2 administration(1)

1.command line processor

db2和oracle一样,都是具备命令行环境的。如何进入db2的命令行环境?可以参考如下:

以windows平台为例子,在cmd环境下,输入db2cmd,然后就进入了db2的clp环境了,输入db2,cmd窗口就会变成以

“db2=>”为启示符的样子,这个类似”SQL>”,你可以开始输入sql以及一些管理命令了,例如create database,create tablespace等等。

2.create database

db2的逻辑结构为,一个服务器上只能有1个instance,instance下面可以有多个”库”,每个库下面有不同的tablespace,schema等等,你可以理解为objects…

 

 

db2 => CREATE DATABASE new1 AUTOMATIC STORAGE YES ON ‘E:’ DBPATH ON ‘E:’ USING CODESET GBK TERRITORY CN COLLATE USING SYSTEM PAGESIZE 4096
DB20000I CREATE DATABASE命令成功完成。

创建数据库的脚本命令需要”tablespace name”,”storage”,”charset”,”地域”,”pagesize”等要素。

3.create bufferpool(缓冲池)

缓冲池在创建tablespace的时候会指定bufferpool,所以需要有一个bufferpool,否则创建表空间的时候,会使用缺省的bufferpool

CONNECT TO NEW1
CREATE BUFFERPOOL NEWPOOL2 IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 4K

连接到新创建的库NEW1,然后创建新的bufferpool(NEWPOOL2)。注意一些:automatic的keywords

4.create tablespace

CONNECT TO NEW1
CREATE REGULAR TABLESPACE NEWTBS PAGESIZE 4 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 16 OVERHEAD 12.67 PREFETCHSIZE 16 TRANSFERRATE 0.18 BUFFERPOOL NEWPOOL DROPPED TABLE RECOVERY ON

5.create schema

//连接到库new1,然后创建schema。schema一般给用户使用。来逻辑划分、方便管理。

CONNECT TO NEW1
CREATE SCHEMA NEWSCHEMA AUTHORIZATION DB2ADMIN
CONNECT RESET

6.create database users

//db2的数据库用户需要寄生在一个表空间上,一个schema上,同时必须属于某一个”库”,这样方便管理。

//连接到库new1上,执行一些”授权”操作(难道这些就叫创建用户吗?)
CONNECT TO NEW1;
GRANT CREATETAB,BINDADD,CONNECT,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT ON DATABASE TO USER NEWUSER;
GRANT CREATEIN,DROPIN,ALTERIN ON SCHEMA NEWSCHEMA TO USER NEWUSER;
GRANT USE OF TABLESPACE NEWTBS TO USER NEWUSER;
CONNECT RESET;
//发现没有,db2的用户创建,在db层面没有显示的创建用户语句,仅仅是”授权”,拿来就直接使用了。

db2的”数据库”用户概念:db2弱化了数据库级别用户的概念,不像sqlserver,oracle,mysql,这些rdbms有数据库级别用户的概念,db2的数据库级别用户就是OS级别的用户。db2是ibm的产品,aix是ibm的OS,可能db2的设计理念就认为,用户的验证交给OS级别来做就行了,数据库不用操心这些。

所以:想创建db2数据库层面的用户,需要在db2所在的OS上创建OS级别的用户,然后在db2命令行中授权访问即可。

联系到上面的操作例子,只需要在windows上创建os级别用户newuser即可。

DB2的用户理念让人印象深刻。

-EOF-

libXp.so.6: cannot open shared object file: No such file or directory

oracle 10g was certificated on redhat 4 platform,if you try to install oracle 10g on redhat 5 platform, u may meet this error msg:

————————————————————————————————-

libXp.so.6: cannot open shared object file: No such file or directory

 

Exception java.lang.UnsatisfiedLinkError:/tmp/OraInstall2011-08-30_03-26-27PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6:cannot open shared object file: No such file or directory occurred..

java.lang.UnsatisfiedLinkError:/tmp/OraInstall2011-08-30_03-26-27PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6:cannot open shared object file: No such file or directory

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(Unknown Source)

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

———————————————————————————————-

try to load the rpm package “libXp-1.0.0-8.1.el5.i386.rpm” to fix the problem

–EOF–

aix errpt BFE4C025

客户的一套核心aix在巡检的时候发现了一些异常的信息。

IDENTIFIER   TIMESTAMP    T    C    RESOURCE_NAME      DESCRIPTION
BFE4C025      0625061812     P    H    sysplanar0     UNDETERMINED ERROR

详细的errpt code信息,如下:

hostname:/local/oracle#errpt -aj BFE4C025|more

—————————————————————————

LABEL: SCAN_ERROR_CHRP
IDENTIFIER: BFE4C025

Date/Time: Mon Jun 25 06:18:37 BEIST 2012
Sequence Number: 1061
Machine Id: 00C6Fxxxxx
Node Id: trade_b1
Class: H
Type: PERM
Resource Name: sysplanar0
Resource Class: planar
Resource Type: sysplanar_rspc
Location:

Description
UNDETERMINED ERROR

Failure Causes
UNDETERMINED

Recommended Actions
RUN SYSTEM DIAGNOSTICS.

Detail Data
PROBLEM DATA
0644 00E0 0000 0600 B600 8E00 0000 0000 0000 0000 4942 4D00 5048 0030 0100 3F30
2012 0624 2218 2486 2012 0624 2218 2486 4500 0106 0000 0000 0000 0000 0000 0000
502E A13F 502E A13F 5548 0018 0100 3F30 6103 4400 0000 0000 0000 A804 0000 0000
5053 00F4 0101 3F30 0201 0002 0000 00EC 003C 0001 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 3131 3030 3135 3134 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020 C000 0029 502B 4C18 5537 3837 392E 3030
312E 4451 4432 3035 472D 4531 0000 0000 4944 1C1D 3339 4A32 3737 3900 3531 4237
594C 3131 3137 4D31 3632 3437 5045 1800 3931 3137 2D35 3730 3036 3646 3930 3000
0000 0000 502B 4C18 5537 3837 392E 3030 312E 4451 4432 3035 472D 5031 2D43 3800
4944 1C1D 3130 4E38 3530 3500 3238 4541 594C 3131 4337 3238 3532 3931 5045 1800
3931 3137 2D35 3730 3036 3646 3930 3000 0000 0000 5544 0094 0204 4400 0000 023B
2F62 696E 2F70 6F77 725F 4C34 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 6669 7073 3234 302F 6230 3832
3761 5F30 3732 352E 3234 3000 0000 0000 0000 0000 0000 0001 0000 0002 0000 0801
0000 0004 0000 0009 4D54 001C 0100 4400 3931 3137 2D35 3730 3036 3646 3930 3000
0000 0000 5544 0404 0000 3F30 0086 FE3C 0001 0086 2150 1001 0086 FE3C 0001 0086
2150 1001 0086 FE3C 0001 0086 2150 1E01 0086 FE3C 0001 0086 2150 3301 0086 FE3C
0001 0086 2150 3307 0000 FE3C 0001 0000 2159 0000 0000 FE3C 0001 0000 2159 0001
0003 FE3C 0001 0003 1064 0010 0003 FE3C 0001 0003 1064 0000 0003 FE3C 0001 0003
1065 0002 0003 FE3C 0001 0003 1065 0003 0003 FE3C 0001 0003 1100 4010 0003 FE3C
0001 0003 1100 4000 0005 FE3C 0001 0005 1062 0001 0007 FE3C 0001 0007 0101 0000
0008 FE3C 0001 0008 1016 1100 000C FE3C 0001 000C 0103 0000 000D FE3C 0001 000D
1016 1104 0012 FE3C 0001 0012 2150 2F07 0012 FE3C 0001 0012 2150 2501 0012 FE3C
0001 0012 2700 2501 0012 FE3C 0001 0012 0107 0000 0012 FE3C 0001 0012 1101 4000
0012 FE3C 0001 0012 1101 4000 0012 FE3C 0001 0012 0104 0000 0013 FE3C 0001 0013
2150 3001 0013 FE3C 0001 0013 15D7 0000 0013 FE3C 0001 0013 215B 3000 0013 FE3C
0001 0013 2150 1E01 0013 FE3C 0001 0013 1220 6000 0013 FE3C 0001 0013 2150 2401
0013 FE3C 0001 0013 2150 2401 0014 FE3C 0001 0014 2150 2501 0014 FE3C 0001 0014
2150 2501 0015 FE3C 0001 0015 1100 1000 0015 FE3C 0001 0015 1100 1000 0015 FE3C
0001 0015 1580 1000 0017 FE3C 0001 0017 1580 1001 0018 FE3C 0001 0018 2150 0A07
0018 FE3C 0001 0018 2700 0A02 0018 FE3C 0001 0018 2700 0A04 0018 FE3C 0001 0018
1580 1102 0019 FE3C 0001 0019 1580 1103 001B FE3C 0001 001B 0105 0000 001F FE3C
0001 001F 1102 0501 001F FE3C 0001 001F 1112 0001 0065 FE3C 0001 0065 1102 0700
0065 FE3C 0001 0065 13A0 1101 0065 FE3C 0001 0065 13A1 0B52 0065 FE3C 0001 0065
13A2 0103 0065 FE3C 0001 0065 13FF 0B52 0066 FE3C 0001 0066 13AF 1152 0066 FE3C
0001 0066 2150 1E01 0066 FE3C 0001 0066 2150 2001 0066 FE3C 0001 0066 2150 2001
0067 FE3C 0001 0067 2150 2101 0067 FE3C 0001 0067 2150 2101 0067 FE3C 0001 0067
2150 3707 0067 FE3C 0001 0067 2150 3607 0067 FE3C 0001 0067 13A0 1101 0067 FE3C
0001 0067 13A1 0B52 0067 FE3C 0001 0067 13A2 0106 0067 FE3C 0001 0067 13FF 0B52
0068 FE3C 0001 0068 1523 0100 0068 FE3C 0001 0068 13AF 1152 007F FE3C 0001 007F
2150 1E01 007F FE3C 0001 007F 2150 2401 007F FE3C 0001 007F 2150 2401 007F FE3C
0001 007F 2150 2001 007F FE3C 0001 007F 2150 2001 007F FE3C 0001 007F 2150 2101
007F FE3C 0001 007F 2150 2101 0080 FE3C 0001 0080 2150 3607 0080 FE3C 0001 0080
2150 3707 0080 FE3C 0001 0080 2150 0801 0080 FE3C 0001 0080 2150 0801 0082 FE3C
0001 0082 2150 0901 0082 FE3C 0001 0082 2150 0901 0084 FE3C 0001 0084 2150 2501
0084 FE3C 0001 0084 2150 2501 0086 FE3C 0001 0086 2150 0301 0086 FE3C 0001 0086
2150 0301 0088 FE3C 0001 0088 2150 1E01 0077 FE3C 0001 0077 2500 045A 0077 FE3C
0001 0077 1276 0399 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

Diagnostic Analysis
Diagnostic Log sequence number: 548
Resource tested: sysplanar0
Resource Description: System Planar
Location:
SRC: 11001514
Description: Power/Cooling subsystem Unrecovered Error, bypassed
with loss of redundancy. Refer to the system service
documentation for more information.
Additional Words: 2-003C0001 3-00000000 4-00000000 5-00000000
6-00000000 7-00000000 8-00000000 9-00000000
Possible FRUs:
Priority: L FRU: 39J2779 S/N: YL1117M16247 CCIN: 51B7
Location: U7879.001.DQD205G-E1
Priority: L FRU: 10N8505 S/N: YL11C7285291 CCIN: 28EA
Location: U7879.001.DQD205G-P1-C8

—————————————————————————————-

description部分已经描述的很清楚了,很可能是电源、风扇的问题。