473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

installing DB2 on Linux

I recently installed DB2 v8.1 on Linux. The installation went
smoothly. I can now connect to the "sample" database and work with
it.

However, I noticed the following. How do I go about fixing these?

1) When in db2, if the SQL statements contain a syntax error, the
whole application crashes. This happens, for example, if I type
"select * from emps" where the table emps does not exist.

2) db2cc does not start, gives error messages about "Can't find
library
db2jdbc (libdb2jdbc.so)"

3) db2ca does not start. It too gives error messages about some java
class: "Can't find library db2adtca (libdb2adtca.so) in
java.library.path"

4) How do I stop/start instances?
Nov 12 '05 #1
8 5113
tu*****@yahoo.com wrote:
I recently installed DB2 v8.1 on Linux. The installation went
smoothly. I can now connect to the "sample" database and work with
it.

However, I noticed the following. How do I go about fixing these?

1) When in db2, if the SQL statements contain a syntax error, the
whole application crashes. This happens, for example, if I type
"select * from emps" where the table emps does not exist.
That should not happen:

db2 => select * from emps;
SQL0204N "JDBEYER.EMPS" is an undefined name. SQLSTATE=42704
db2 =>

2) db2cc does not start, gives error messages about "Can't find
library
db2jdbc (libdb2jdbc.so)"
I do not use db2cc; got in the habit of not using that in V6.1 days when
it ran so slowly that I could not stand it.

Did you install it?

trillian:jdbeyer[~]$ locate libdb2jdbc.so
/opt/IBM/db2/V8.1/lib/libdb2jdbc.so
/opt/IBM/db2/V8.1/lib/libdb2jdbc.so.1
3) db2ca does not start. It too gives error messages about some java
class: "Can't find library db2adtca (libdb2adtca.so) in
java.library.path"
trillian:jdbeyer[~]$ locate libdb2adtca.so
/opt/IBM/db2/V8.1/lib/libdb2adtca.so
/opt/IBM/db2/V8.1/lib/libdb2adtca.so.1 4) How do I stop/start instances?


db2istrt

In Red Hat Enterprise Linux 3 ES, I have a file in /etc/rc.d/init.d for
that. Named IBMdb2. It is like this:

#!/bin/sh
# chkconfig: 35 98 02
# description: Start and Stop IBM's db2 dbms.
BASE=/opt/IBM/db2
VERSION=V8.1
INSTANCE=/dataA/db2inst1 # Where (a small part of the) instance will be.
# Set the path.
PATH=/sbin:/bin:/usr/bin:/usr/sbin
.. /etc/rc.d/init.d/functions
# Check we have the start and stop programs.
test -x $INSTANCE/sqllib/adm/db2start || exit 0
test -x $INSTANCE/sqllib/adm/db2stop || exit 0
test -x $BASE/$VERSION/bin/db2 || exit 0
case "$1" in
start)
# Check if IBMdb2 not already running
if [ ! -f /var/lock/subsys/IBMdb2 ]; then
echo -n 'Starting IBMdb2 daemons: '
su - db2inst1 -c $INSTANCE/sqllib/adm/db2start
echo
touch /var/lock/subsys/IBMdb2
fi
;;
stop)
# We first try twice to kill all existing applications.
# There really should be none most of the time.
echo 'Stopping IBMdb2 daemons: '
su - db2inst1 -c "$BASE/$VERSION/bin/db2 FORCE APPLICATION ALL"
sleep 2
su - db2inst1 -c "$BASE/$VERSION/bin/db2 FORCE APPLICATION ALL"
sleep 2
su - db2inst1 -c $INSTANCE/sqllib/adm/db2stop
echo
rm -f /var/lock/subsys/IBMdb2
;;
reload|restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: /etc/rc.d/init.d/IBMdb2 {start|stop|restart|reload}"
exit 1
esac
#-----------------------------------------------------------------------
# Exit successfully.
#-----------------------------------------------------------------------
exit 0
~

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 12:55:00 up 7 days, 22:36, 5 users, load average: 4.16, 4.12, 4.09

Nov 12 '05 #2
<tu*****@yahoo.com> wrote in message
news:32**************************@posting.google.c om...
I recently installed DB2 v8.1 on Linux. The installation went
smoothly. I can now connect to the "sample" database and work with
it.

However, I noticed the following. How do I go about fixing these?

1) When in db2, if the SQL statements contain a syntax error, the
whole application crashes. This happens, for example, if I type
"select * from emps" where the table emps does not exist.

2) db2cc does not start, gives error messages about "Can't find
library
db2jdbc (libdb2jdbc.so)"

3) db2ca does not start. It too gives error messages about some java
class: "Can't find library db2adtca (libdb2adtca.so) in
java.library.path"

4) How do I stop/start instances?


Need more info on which Linux you are using. If using RH9 or equivalent,
check the google groups archive for tips on getting it to work (DB2 is not
officially supported on RH9).
Nov 12 '05 #3
tu*****@yahoo.com wrote in message news:<32**************************@posting.google. com>...
I recently installed DB2 v8.1 on Linux. The installation went
smoothly. I can now connect to the "sample" database and work with
it.

However, I noticed the following. How do I go about fixing these?

1) When in db2, if the SQL statements contain a syntax error, the
whole application crashes. This happens, for example, if I type
"select * from emps" where the table emps does not exist.

2) db2cc does not start, gives error messages about "Can't find
library
db2jdbc (libdb2jdbc.so)"
Do you have java installed on the system? I remember when I first
tried to use db2cc and db2dc on my linux laptop, I didn't have the
correct version of Java installed. After installing the rpms ( I use
RH9 ) for Java 1.3.2 I believe, I still was missing a link. I created
a symbolic link in /opt/IBM/db2/V8.1/ someplace and everything started
fine after that. I forget where right now and I don't have it in
front of me, but I know I found the missing link info in the DB2
information center on the web.

Sorry I can't be more helpful, but I can post more info on Monday if
you still need help.

Otherwise you can start/stop DB2 by executing the
/INSTANCE_OWNER_HOME/sqllib/db2profile in you current shell and then
just type db2start or db2stop.


3) db2ca does not start. It too gives error messages about some java
class: "Can't find library db2adtca (libdb2adtca.so) in
java.library.path"

4) How do I stop/start instances?

Nov 12 '05 #4
I got the db2 command line to work. I am not sure what I did but I was
trying the commands in the shell script.

As far as the the db2cc and db2ca, they still do not work. The locate
command returns nothing. How do I install them?

Thanks!

Nov 12 '05 #5
Mark,

I am using Mandrake 9.2. I realize this is not an officially supported
distro, but this is for personal use and for learning. It installed fine,
actually, and is working apart from db2cc/db2ca tools.
Nov 12 '05 #6
I believe I have Java installed. As you noted, it may be a different
version, though.. I will look into it. If you could post more info on
Monday, I'd appreciate it.

Thanks!
Nov 12 '05 #7
> Mark,

I am using Mandrake 9.2. I realize this is not an officially supported
distro, but this is for personal use and for learning. It installed fine,
actually, and is working apart from db2cc/db2ca tools.

No, it did install fine. Go to the newsgroup archive on Google and find the
instructions like I told you to. The Java stuff will not work unless you do
some workaround steps, because DB2 does not work properly with Linux version
9. The reason it is not "supported" is because it does not work properly
with Linux 9 (yes, IBM tested it). But you can get it to install correctly
with the workarounds.
Nov 12 '05 #8
"Mark A" <no****@nowhere.com> wrote in message
news:IY*****************@news.uswest.net...
Mark,

I am using Mandrake 9.2. I realize this is not an officially supported
distro, but this is for personal use and for learning. It installed fine, actually, and is working apart from db2cc/db2ca tools.
No, it did install fine. Go to the newsgroup archive on Google and find

the instructions like I told you to. The Java stuff will not work unless you do some workaround steps, because DB2 does not work properly with Linux version 9. The reason it is not "supported" is because it does not work properly
with Linux 9 (yes, IBM tested it). But you can get it to install correctly
with the workarounds.

Correction:

No, it did NOT install fine.
Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jean-Christian Imbeault | last post by:
I have a user account on a RH Linux machine but no root access. I succesfully installed apache 1.3 under my /home/ account but can't get PHP to install properly. I have done the following...
7
by: Edward Diener | last post by:
I can install Python 2.4 on the Fedora 3 Linux system, but after I do a number of Linux utilities and commands, like yum, stop working because they were dependent on the Python 2.3 installation....
0
by: Darren L. Weber | last post by:
The following is a first attempt to almost create a shell script for installation of ATLAS and LAPACK. It does not work right now and it is specific to a particular platform. It is posted here to...
2
by: Hemant Shah | last post by:
Folks, I have installed DB2 UDB 8.1 FP4 on a RedHat 9.0 system. I am trying to install Net Search Extender 8.1 but I am having problem with the install. Here is the error I get: #...
0
by: bwhitehd | last post by:
I'm having a problem installing php. The compile seems to go fine, but when it gets to the install step I get the following errors. Does anyone have an idea of what might be the problem? We...
1
by: gmax2006 | last post by:
Hi, I am having hard time with installing MySQLdb on Linux. My Python version is 2.3. I have downloaded "MySQL-python-1.2.1_p2.tar.gz" from sourceforge. The README file asks for MySQL...
7
by: Yansky | last post by:
I asked my hosting company if they would upgrade Python on my server to the latest version. They responded with: "Sorry no. We tend to stick with what comes packaged with the unix distribution...
5
by: jgelfand | last post by:
I'm installing Python 2.4.4 on a CentOS release 4.6 (Final) 64-bit machine. Running "./configure --prefix="/ usr/local/yosi/ciao-4.0/ots" --enable-shared" appears to be fine, but I get the...
6
by: everlast | last post by:
I'm installing BLT module (among others) in my directories - not as a root user. The installation of Tcl and Tk went fine(that means that all of my system variables like PREFIX are set correctly),...
2
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.