Posts

Showing posts from February, 2015

SQL1034C The database is damaged - DB2

DB2 v9.1 AIX 5.3 This post demonstrate step by step approach to restart a database which returns SQL1034C in DB2. Error → bash-4.2$ db2 connect to TESTDB SQL1034C The database is damaged. All applications processing the database have been stopped. SQLSTATE=58031 1. DB2 stop with force application all. b ash-4.2$ db2 force application all DB20000I The FORCE APPLICATION command completed successfully. DB21024I This command is asynchronous and may not be effective immediately. bash-4.2$ db2 list active databases SQL1611W No data was returned by Database System Monitor. bash-4.2$ db2stop 02/24/2015 01:38:16 0 0 SQL1025N The database manager was not stopped because databases are still active. SQL1025N The database manager was not stopped because databases are still active. 2. DB2 quiesce instance force connections bash-4.2$ db2 quiesce instance TINST1 immediate force connections SQ

DB2 skip tablespace restore

OS – AIX 5.3 DB – DB2 9.1,9.5,10.1 LUW In earlier posts ( post1 , post2 ) full db2 restoration in to a different server was discussed. This post is kind of add-on showing the restoration process skipping set of table spaces. For this restoration generated script will be used instead of manually issuing redirect commands. Step 1 → Generate the script skipping tablespaces db2 "restore database skipdb rebuild with all tablespaces in image except tablespace(VL_USR_8K,VL_IDX_USR_8K,VL_USR_MSTR_4K,USR_MSTR_IDX_4K,TS_INOUT_IDX,TS_INOUT_SEP12,TS_INOUT_OCT12,TS_INOUT_JAN13,TS_INOUT_FEB13,TS_INOUT_MAR13,TS_INOUT_APR13,TS_INOUT_MAY11,TS_INOUT_JUN11) from /DB2restore dbpath on '/DB2restore' into skipdb logtarget '/DB2restore/mtrptlog' redirect generate script skip_gen.clp" Step 2 → Change the redirect paths in generated script. The script generated (skip_gen.clp) includes datafile paths of the original db. If restoring to different setup cha

Virtulabox Linux guest network configuration

Platform – Oracle Virtualbox4.3.2 Guest OS – RHEL 5.5 This is short post on troubleshooting some of the issues that were encountered during multiple network interface configuration in Oracle Virtual box with RHEL 5.5. VM setup → 1 Nat adapter, 1 Host-only adapter. Issues Faces → Nat adapter was not resolving DNS. This was due to an issue with automatically generated /etc/resolve.conf. By using below command to force usage of host machine DNS in guest this issue was resolved. VBoxManage modifyvm "<VM_NAME>" --natdnshostresolver1 on 2. DNS was ok but couldn't access the internet. The NAT interface was simple not connecting to internet. Simple trace route to google.com showed that internet connection was tried via the hostonly network. Routes were not correctly configured in the VM guest. The defult route getwway was set to hostonly adapter. Below are the steps to correct the route table. [root@localhost ~]# route Kernel IP

Oracle 9i activating read only standby database

Oracle version -- Oracle 9i Below are the steps to open a read-only standby BCV database as a production ready (read-write) in oracle 9i. SQL> alter database mount standby database; Database altered. SQL> alter database open read only; Database altered. SQL> SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE; Database altered. SQL> SQL> alter database mount; Database altered. SQL> alter database open; Database altered. SQL> select name, open_mode, log_mode from v$database; NAME OPEN_MODE LOG_MODE --------- ---------- ------------ FXBPADM READ WRITE ARCHIVELOG SQL>

Simple script to move AIX LVs from one VG to another

OS -- AIX 5.3 This is a very simple script that can be used to transfer set of AIX logical volumes (LV) from one volume group (VG) to another. This was used to move all oracle db LVs from one VG to another. 1. List all LVs to be moved in a txt file in the format of "lsvg -l" output. [root@BLOGHOST:/vg_move]$lsvg -l datavg | grep -i ora > oracle_lv.txt [root@BLOGHOST:/vg_move]$ cat oracle_lv.txt oracle_home2_lv jfs2 40 40 1 open/syncd /oracle oracle_home3_lv jfs2 32 32 1 open/syncd /cust fslv02 jfs2 120 120 3 open/syncd /orahome11g fslv05 jfs2 80 80 1 open/syncd /orahome nms_temp jfs2 8 8 1 open/syncd /ora_temp orahome10gg_2 jfs2 280 280 2 open/syncd /orahome10_2 oradataictpslt_ jfs2 444 444 5 open/syncd /oradata2 oradata1_lv jfs2 400 400 9 open/syncd /oradata1 oradataicp1_lv jfs2 400 400 5 open/syncd /ora fx_orahome