Under some circumstance it may be neccessary to recreate an instance with out dropping the databases.
Some OS related error is preventing instance start or a connections to a database. Usually this is a SQL1042C error but there can be others. Usually caused by some corrupt or missing file. Can also be caused by file permissions issues.
Use the following steps to drop and recreate the instance with out affecting the databases.
Example:
Assuming the following:
DB2 is installed under: /opt/ibm/db2/V9.7
The instance is named "db2inst1" with a home directory of "/home/db2inst1"
1) Run the following as the instance owner db2inst1 to export the database manager configuration, registry variables and catalog information.
db2cfexp <output.file>
2) Identify who the fenced user account is by running:
ls -la /home/db2inst1/sqllib/ctrl/.fencedID
The owner of this file is the fenced user account.
3) Login as user root and run the following from the /opt/ibm/db2/V9.7/instance path to drop the instance:
./db2idrop db2inst1
4) Verify that the instance record is removed by logging in as root and running "/opt/ibm/db2/V9.7/bin/db2greg -dump". A line like this should no longer be displayed
I,DB2,9.7.0.9,db2inst1,/home/db2inst1/sqllib,,1,0,/opt/ibm/db2/V9.7,,
5) If the above line is still listed, manually remove the old instance from the registry by running the following as root:
/opt/ibm/db2/V9.7/db2greg -delinstrec service=DB2,instancename=db2inst1
6) Recreate the instance by logging in as root and using the following command from the DB2 install path /opt/ibm/db2/V9.7/instance (assuming the fenced user was identified as "db2fenc1" from step 2):
./db2icrt -u db2fenc1 db2inst1
7) Run the following as instance owner db2inst1 to import the database manager configuration, registry variables and catalog information.
db2cfimp <output.file>
Note: This is for none DPF systems running on UNIX and LINUX operating systems.
Recreate an instance
精选 转载文章标签 recreate instance 文章分类 数据库
-
Oracle11g之OGG单instance单向复制
ogg
oracle 初始化 ide -
How To Drop and Recreate ASM Diskgroup
<br /> <br /> <br />This article describe how we can drop and recreate ASM
disk header command unix file -
Recreate failovered primary database using Flashback Database
很多朋友一直对DataGuard的fast-start failover持怀疑的态度;通过observer的观察,(Fast-Start Failover)FSFO提供了一种在primary数据库不可用情况下自动故障切换到standby数据库的能力。造成很多朋友不愿意使用FSFO的原因之一是故障切换后不得不重建原primary数据库,不过如果我们能配合使用10g中的闪回数据库特性的话,这一重建数据
Oracle database observer failover flashback fast-start