Showing posts with label Troubleshooting. Show all posts
Showing posts with label Troubleshooting. Show all posts

Wednesday, September 17, 2014

db2_install or db2icrt or db2setup fails with memory corruption error on Ubuntu OS

While i started installation of DB2 data server trail v 10.1 FP0 i got struck with memory corruption error and wasn't able to move forward in installation. So solution to this problem is to install RPM package or else need to move to next fix pack level 1 FP1.

Problem :



db2inst1@ubuntu:~/server$ sudo ./db2setup  

DBI1190I  db2setup is preparing the DB2 Setup wizard which will guide
      you through the program setup process. Please wait.


*** glibc detected *** /tmp/db2.tmp.2521/db2/linuxamd64/install/../java/jre/bin/java: malloc(): memory corruption: 0x00007f35880c0ab0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7ec66)[0x7f358f61dc66]
/lib/x86_64-linux-gnu/libc.so.6(+0x80e2b)[0x7f358f61fe2b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x75)[0x7f358f6220b5]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x1d)[0x7f356f98dded]




 Solution : sudo apt-get install rpm
 
Here is the problem document from IBM link :

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

Friday, June 27, 2014

Error SQL10013N SQLSTATE=42724 create wrapper for federation support

When we need to setup federation we need to first create a wrapper which will identify data source of the federated server.
We get this error SQL10013N as shown below, When we don't have Informix data source support installed in our server.



db2inst1@test-machine:~$ db2 "create wrapper drda"
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL10013N  The specified library "libdb2drda.so" could not be loaded.  
SQLSTATE=42724

Below commands list the features that are installed on the server, we can seen there is no Informix Data Source Support Installed on the server

db2inst1@test-machine:~$ db2ls -q -b /opt/ibm/db2/V9.7

Install Path : /opt/ibm/db2/V9.7

Feature Response File ID             Level   Fix Pack   Feature Description
---------------------------------------------------------------------------------------------------------------------
BASE_CLIENT                         9.7.0.6          6   Base client support
JAVA_SUPPORT                        9.7.0.6          6   Java support
SQL_PROCEDURES                      9.7.0.6          6   SQL procedures
BASE_DB2_ENGINE                     9.7.0.6          6   Base server support
JDK                                 9.7.0.6          6   IBM Software Development Kit (SDK) for Java(TM)
COMMUNICATION_SUPPORT_TCPIP         9.7.0.6          6   Communication support - TCP/IP
REPL_CLIENT                         9.7.0.6          6   Replication tools
DB2_DATA_SOURCE_SUPPORT             9.7.0.6          6   DB2 data source support
LDAP_EXPLOITATION                   9.7.0.6          6   DB2 LDAP support
INSTANCE_SETUP_SUPPORT              9.7.0.6          6   DB2 Instance Setup wizard
SPATIAL_EXTENDER_CLIENT_SUPPORT     9.7.0.6          6   Spatial Extender client
APPLICATION_DEVELOPMENT_TOOLS       9.7.0.6          6   Base application development tools

As we identified the problem now we shall install the Informix Data source support, i'm using response file installation for this as its a single component installation. Just copy below things and change the parameter "FILE" according to your already installed location of db2 server

PROD                        = ADVANCED_ENTERPRISE_SERVER_EDITION
FILE                        = /opt/ibm/db2/V9.7_01
LIC_AGREEMENT               = ACCEPT
INSTALL_TYPE                = CUSTOM  
COMP                        = INFORMIX_DATA_SOURCE_SUPPORT

I will save above 5 lines in /home/db2inst1/resp

Now i will install the single component informix_data_source_support using below command

db2inst1@test-machine:~/server$ sudo ./db2setup -r /home/db2inst1/resp 
WARNING:
DBT3534W  The db2prereqcheck utility determined that ASLR is set to ON and that this could cause issues with some tools.
WARNING:
   The 32-bit library file libpam.so is not found on the system.
DBI1191I  db2setup is installing and configuring DB2 according to the
      response file provided. Please wait.

A minor error occurred while installing "DB2 Advanced Enterprise Server
Edition " on this computer. Some features may not function correctly.
For more information see the DB2 installation log at "/tmp/db2setup.log".

Once done i have connected to database and was able to create wrapper successfully

db2inst1@test-machine:/opt/ibm/db2/V9.7_01/instance$ db2 connect to attempt

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.6
 SQL authorization ID   = DB2INST1
 Local database alias   = ATTEMPT

db2inst1@test-machine:/opt/ibm/db2/V9.7_01/instance$ db2 create wrapper drda
DB20000I  The SQL command completed successfully.

Sunday, February 16, 2014

Important points to be noted when doing DB2 Database Refresh to UAT or DEV environments

Hey all, today i would discuss on the important points that needs to be kept in mind when refreshing from PROD to UAT or DEV environments. Below are the issues that i recently faced when doing a refresh activity from PROD to UAT.

1) Bufferpools unavailability, only hidden bufferpools started.
2) Server hangup during rollforward phase, even doesn't allow other users to login and kill it.
3) Rollforward fails saying no enough memory to allocate.
4) Rollforward fails due to archive log location is not valid.

Overall why are these incidents happened ? Answer for this is we have different physical configurations and different settings in PROD when noted to UAT or DEV. So before doing a refresh take a backup of all the DB CFG parameters for all the databases also DBM cfg of the instance for which you intend the refresh.

1) INSTANCE_MEMORY parameter
2) DATABASE_MEMORY parameter
3) Bufferpools size
4) LOGARCHMETH1 path

My  Scenario.

We have 120 GB phsyical memory available in prod so we used 110 GB for INSTANCE_MEMORY parameter. Also for one of the db we have 50 GB set to DATABASE_MEMORY parameter so what happened when did a backup and restore in UAT .

Restore was successful, then started rollforward of db then suddenly our prompt got hanged, not responding . When even tried to login from different session its not allowing to login. So we contacted system admin, and he told that total memory being used by DB2 and due to which its not allowing the users to ssh also. He then hard reboot the machine and then I checked and could see only 62 GB of physical RAM available on the server, but our DATABASE_MEMORY was set to 110 GB automatic so we understood that this is the main reason for server hangup. We then updated the DATABASE_MEMORY to 10 GB with automatic settings. A new issue started when trying to activate the db, as bufferpools memory settings in PROD are very high so only DB started only with hidden bufferpools which we didn't observe and started to rollforward again, which resulted in failure. So for time being i used this method, I made the bufferpools started with only 3000 pages initially, Here is the environment variable to set the BP intital pages to some number of pages, use command DB2SET DB2_OVERRIDE_BPF=3000 , after setting it check if reflected or not DB2SET -ALL , this command show all the environment variables that are set. Then tried rollforward again and this time it again resulted in failure as we are having LOGARCHMETH1 in prod location not matching in the UAT server which resulted in failure. We then updated the LOGARCHMETH1 parameter to valid path and then tried rollforward again and this time its SUCCESS.  Finally we have activated and connected to database and made valid changes to bufferpool size based on database_memory and restarted the DB.


Readers anybody has any doubts or any other errors that you faced please post your comments here and we shall discuss on them and update here.