On Jun 29, 10:27*am, db2Harakiri <non... (AT) gmail (DOT) com> wrote:
Quote:
Anybody have a solution for *this error:
db2top -d $dbname
* * Function not implemented (smcr_procattr)
info: db2 9.5 fp7 on AIX 5.3 |
A (faulty) change in AIX is causing this (even a workaround fix is
available in db2).
db2top is shipped as 'not stripped' (file db2top)
So.
Create a new program mydlsym.c
#include <errno.h>
#include <dlfcn.h>
#include <stdio.h>
static int i=0;
static char * po_1;
void * realdlsym(void * handle, const char * name);
void * mydlsym(void * handle, const char * name)
{
if(i==0) {i=1;
fprintf(stderr,"\n Before addidtional dlerror call");
dlerror();
fprintf(stderr,"\n After addidtional dlerror call");
}
return realdlsym(handle,name);
}
cc -c -q64 mydlsym.c
Then
DB2DIR=${DB2DIR:=/usr/opt/db2_09_05_install}
rm -f db2top.new
ld -b64 -r -o tmp0.o $DB2DIR/bin/db2top -brename:.dlsym,.mydlsym
ld -b64 -o db2top.new tmp0.o mydlsym.o -brename:.realdlsym,.dlsym
$DB2DIR/lib32/libdb2trcapi.a $DB2DIR/lib32/libdb2osse.a $DB2DIR/lib32/
libdb2g11n.a $DB2DIR/lib32/libdb2install.a $DB2DIR/lib32/
libdb2genreg.a $DB2DIR/lib32/libdb2locale.a $DB2DIR/lib32/
libdb2dascmn.a /usr/lib/libC.a $DB2DIR/lib32/libdb2.a /usr/lib/
libdl.a /usr/lib/libpthreads.a -lcurses -lc
rm tmp0.o
chmod +x db2top.new
Will create a working db2top.new that can be installed over db2top.
Bernard (Dhooghe)