Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 09:01 AM
tunity5@yahoo.com
Guest
 
Posts: n/a
Default 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?
  #2  
Old November 12th, 2005, 09:01 AM
Jean-David Beyer
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

tunity5@yahoo.com wrote:[color=blue]
> 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.[/color]

That should not happen:

db2 => select * from emps;
SQL0204N "JDBEYER.EMPS" is an undefined name. SQLSTATE=42704
db2 =>
[color=blue]
>
> 2) db2cc does not start, gives error messages about "Can't find
> library
> db2jdbc (libdb2jdbc.so)"[/color]

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[color=blue]
>
> 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"
>[/color]
trillian:jdbeyer[~]$ locate libdb2adtca.so
/opt/IBM/db2/V8.1/lib/libdb2adtca.so
/opt/IBM/db2/V8.1/lib/libdb2adtca.so.1[color=blue]
> 4) How do I stop/start instances?[/color]

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

  #3  
Old November 12th, 2005, 09:01 AM
Mark A
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

<tunity5@yahoo.com> wrote in message
news:32bcd267.0407240825.355e7d40@posting.google.c om...[color=blue]
> 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?[/color]

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).


  #4  
Old November 12th, 2005, 09:01 AM
Private Pyle
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

tunity5@yahoo.com wrote in message news:<32bcd267.0407240825.355e7d40@posting.google. com>...[color=blue]
> 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)"[/color]

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.

[color=blue]
>
> 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?[/color]
  #5  
Old November 12th, 2005, 09:01 AM
Tunity
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

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!

  #6  
Old November 12th, 2005, 09:01 AM
Tunity
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

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.


  #7  
Old November 12th, 2005, 09:01 AM
Tunity
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

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!


  #8  
Old November 12th, 2005, 09:01 AM
Mark A
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

> Mark,[color=blue]
>
> 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.
>[/color]
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.


  #9  
Old November 12th, 2005, 09:01 AM
Mark A
Guest
 
Posts: n/a
Default Re: installing DB2 on Linux

"Mark A" <nobody@nowhere.com> wrote in message
news:IYUMc.626$yR1.58431@news.uswest.net...[color=blue][color=green]
> > 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[/color][/color]
fine,[color=blue][color=green]
> > actually, and is working apart from db2cc/db2ca tools.
> >[/color]
> No, it did install fine. Go to the newsgroup archive on Google and find[/color]
the[color=blue]
> instructions like I told you to. The Java stuff will not work unless you[/color]
do[color=blue]
> some workaround steps, because DB2 does not work properly with Linux[/color]
version[color=blue]
> 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.
>[/color]
Correction:

No, it did NOT install fine.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.