The DB2 Library could not be loaded
Moderators: chulett, rschirm, roy
The DB2 Library could not be loaded
I have installed 11.3.1.1 on Redhat with two server topology Server1 (Repository, services), Server2 (Engine). Default install repository db2 v10.5
The installation has been successfully, installation test jobs have run successfully.
I now wish to create a test job with db2 as a source
I have configured dsenv
DB2DIR=/opt/IBM/DB2
export DB2DIR
DB2INSTANCE=db2inst1
export DB2INSTANCE
INSTHOME=/home/db2inst1
export INSTHOME
PATH=$PATH:$INSTHOME/sqllib/bin:$INSTHOME/sqllib/adm:$INSTHOME/sqllib/misc
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTHOME/sqllib/lib
export LD_LIBRARY_PATH
THREADS_FLAG=native
export THREADS_FLAG
Have stopped and restarted DSEngine and ASBAgent
the variables values have been taken from server1 (set | grep -i db2)
DB2DIR=/opt/IBM/DB2
DB2INSTANCE=db2inst1
DB2LIB=/home/db2inst1/sqllib/lib
DB2_HOME=/home/db2inst1/sqllib
HISTFILE=/home/db2inst1/.bash_history
HOME=/home/db2inst1
IBM_DB_DIR=/home/db2inst1/sqllib
IBM_DB_INCLUDE=/home/db2inst1/sqllib/include
IBM_DB_LIB=/home/db2inst1/sqllib/lib
INSTHOME=/home/db2inst1
INST_DIR=/home/db2inst1/sqllib
LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib32
LOGNAME=db2inst1
MAIL=/var/spool/mail/db2inst1
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc:/home/db2inst1/bin
My test job is db2connector -> peek stage
Connection details are
Instance: db2inst1
Databse: xmeta
Username: db2inst1
Password : <db2inst1 password>
when I test connection I get
"The connection failed. The DB2 library couuld not be be loaded'
What have I missed the configuration?
Thanking you all in advance
The installation has been successfully, installation test jobs have run successfully.
I now wish to create a test job with db2 as a source
I have configured dsenv
DB2DIR=/opt/IBM/DB2
export DB2DIR
DB2INSTANCE=db2inst1
export DB2INSTANCE
INSTHOME=/home/db2inst1
export INSTHOME
PATH=$PATH:$INSTHOME/sqllib/bin:$INSTHOME/sqllib/adm:$INSTHOME/sqllib/misc
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTHOME/sqllib/lib
export LD_LIBRARY_PATH
THREADS_FLAG=native
export THREADS_FLAG
Have stopped and restarted DSEngine and ASBAgent
the variables values have been taken from server1 (set | grep -i db2)
DB2DIR=/opt/IBM/DB2
DB2INSTANCE=db2inst1
DB2LIB=/home/db2inst1/sqllib/lib
DB2_HOME=/home/db2inst1/sqllib
HISTFILE=/home/db2inst1/.bash_history
HOME=/home/db2inst1
IBM_DB_DIR=/home/db2inst1/sqllib
IBM_DB_INCLUDE=/home/db2inst1/sqllib/include
IBM_DB_LIB=/home/db2inst1/sqllib/lib
INSTHOME=/home/db2inst1
INST_DIR=/home/db2inst1/sqllib
LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib32
LOGNAME=db2inst1
MAIL=/var/spool/mail/db2inst1
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc:/home/db2inst1/bin
My test job is db2connector -> peek stage
Connection details are
Instance: db2inst1
Databse: xmeta
Username: db2inst1
Password : <db2inst1 password>
when I test connection I get
"The connection failed. The DB2 library couuld not be be loaded'
What have I missed the configuration?
Thanking you all in advance
This post might help
viewtopic.php?p=422451
viewtopic.php?p=422451
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
DB2 connector will also use the catalog information. If you read the documentation that if DB2 client fails to connect to the server then DB2 Connector will also fail. Try to catalog xmeta on engine then try running the job again.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
We just resolved the same issue here. Our resolution was to comment out other variable settings and add these lines at the end of the dsenv file:
INSTHOME=/home/db2inst1;export INSTHOME
DB2DIR=/opt/IBM/DB2; export DB2DIR
DB2INSTANCE=db2inst1;export DB2INSTANCE
PATH=$PATH:$INSTHOME/sqllib/bin:$DB2DIR/bin:;export PATH
LIBPATH=$LIBPATH:$INSTHOME/sqllib/lib64;export LIBPATH
Then, stop and restart the DataStage engine and ASB Node Agent:
Stop DataStage (you have to run this from $DSHOME)
. ./dsenv
bin/uv -admin -stop
Stop the ASB Agent (you need to be root here)
Go to <InstallPath>/IBM/InformationServer/ASBNode/bin
Run ./NodeAgents.sh stop
Then,
Start ASB Agent as root
Go to <InstallPath>/IBM/InformationServer/ASBNode/bin
Run ./NodeAgents.sh start
Start DataStage (as dsadm)
Go to $DSHOME
Run bin/uv -admin -start
This procedure resolved our issue.
INSTHOME=/home/db2inst1;export INSTHOME
DB2DIR=/opt/IBM/DB2; export DB2DIR
DB2INSTANCE=db2inst1;export DB2INSTANCE
PATH=$PATH:$INSTHOME/sqllib/bin:$DB2DIR/bin:;export PATH
LIBPATH=$LIBPATH:$INSTHOME/sqllib/lib64;export LIBPATH
Then, stop and restart the DataStage engine and ASB Node Agent:
Stop DataStage (you have to run this from $DSHOME)
. ./dsenv
bin/uv -admin -stop
Stop the ASB Agent (you need to be root here)
Go to <InstallPath>/IBM/InformationServer/ASBNode/bin
Run ./NodeAgents.sh stop
Then,
Start ASB Agent as root
Go to <InstallPath>/IBM/InformationServer/ASBNode/bin
Run ./NodeAgents.sh start
Start DataStage (as dsadm)
Go to $DSHOME
Run bin/uv -admin -start
This procedure resolved our issue.
Are you able to provide the detailed commands steps I will need to do to catalog xmeta on the enginepriyadarshikunal wrote:DB2 connector will also use the catalog information. If you read the documentation that if DB2 client fails to connect to the server then DB2 Connector will also fail. Try to catalog xmeta on engine then try running the job again.
I believe you will need to catalog both the remote node and the remote database on your engine computer.
Check the DB2 command documentation in the knowledge center for the exact syntax and command options.
It should look something like this:
Mike
Check the DB2 command documentation in the knowledge center for the exact syntax and command options.
It should look something like this:
Code: Select all
db2 catalog tcpip4 node <node name> remote <ip address> server <port>
db2 catalog database xmeta at node <node name>
To see what you have catalogued currently:
Mike
Code: Select all
db2 list node directory
Code: Select all
db2 list database directory
Hi Mike
Looks like we are on the right track now
db2 list database directory works as expeted
When I excute db2 list node directory
I get "SQL1027N The node directory cannot be found"
So from Server1 (Repository,services) I need to issue the db2 catalog commands
db2 catalog database xmeta at node <node name> (Node name being?)
then
db2 catalog tcpip4 node <node name> remote <Server2 ip address>
is this right
Looks like we are on the right track now
db2 list database directory works as expeted
When I excute db2 list node directory
I get "SQL1027N The node directory cannot be found"
So from Server1 (Repository,services) I need to issue the db2 catalog commands
db2 catalog database xmeta at node <node name> (Node name being?)
then
db2 catalog tcpip4 node <node name> remote <Server2 ip address>
is this right
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Do you have a DB2 client installed on server 2 (engine)? I installed on Server 1 as repository is there in DB2 database created during installation. But did you install a client on Server 2 where engine resides?
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI