473,748 Members | 8,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Autostart DB2 under Red Hat Enterprise Linux

Can anyone tell me what I am doing wrong?

I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1),
using the command line method (i.e. db2_install and vi and ....)

The one bit that didn't seem to be documented was how to set the
system up so that my instance would start automatically at boot time.

The /etc/inittab has the db2fmcd included.
The instance has DB2AUTOSTART=TR UE

Any idea what is missing?

Bill
Nov 12 '05 #1
10 14121
Bill Medland wrote:
Can anyone tell me what I am doing wrong?

I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1),
using the command line method (i.e. db2_install and vi and ....)

The one bit that didn't seem to be documented was how to set the
system up so that my instance would start automatically at boot time.

The /etc/inittab has the db2fmcd included.
The instance has DB2AUTOSTART=TR UE

Any idea what is missing?

Bill


I do have idea what is missing: you must start the instance(s). Here is
how I do mine:

In directory /etc/rc.d/init.d I have a file 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

# 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|res tart|reload}"
exit 1
esac

#-----------------------------------------------------------------------
# Exit successfully.
#-----------------------------------------------------------------------
exit 0

You will want to modify the "INSTANCE=/dataA/db2inst1" line to find your
instance. You should also run /sbin/chkconfig on this (read the manual
page). This file should list like this:

trillian:jdbeye r[/etc/rc.d/init.d]$ ls -l IBMdb2
-rwxr-xr-x 1 root root 1360 Apr 29 15:17 IBMdb2

In fact, you might want to remove execute permission from world--other.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 14:20:00 up 17 days, 15:03, 3 users, load average: 4.11, 4.05, 3.18

Nov 12 '05 #2
Bill Medland wrote:
Can anyone tell me what I am doing wrong?

I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1),
using the command line method (i.e. db2_install and vi and ....)

The one bit that didn't seem to be documented was how to set the
system up so that my instance would start automatically at boot time.

The /etc/inittab has the db2fmcd included.
The instance has DB2AUTOSTART=TR UE

Any idea what is missing?

Bill


I do have idea what is missing: you must start the instance(s). Here is
how I do mine:

In directory /etc/rc.d/init.d I have a file 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

# 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|res tart|reload}"
exit 1
esac

#-----------------------------------------------------------------------
# Exit successfully.
#-----------------------------------------------------------------------
exit 0

You will want to modify the "INSTANCE=/dataA/db2inst1" line to find your
instance. You should also run /sbin/chkconfig on this (read the manual
page). This file should list like this:

trillian:jdbeye r[/etc/rc.d/init.d]$ ls -l IBMdb2
-rwxr-xr-x 1 root root 1360 Apr 29 15:17 IBMdb2

In fact, you might want to remove execute permission from world--other.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 14:20:00 up 17 days, 15:03, 3 users, load average: 4.11, 4.05, 3.18

Nov 12 '05 #3
Jean-David Beyer wrote:
Bill Medland wrote:
Can anyone tell me what I am doing wrong?

I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1),
using the command line method (i.e. db2_install and vi and ....)

The one bit that didn't seem to be documented was how to set the
system up so that my instance would start automatically at boot time.

The /etc/inittab has the db2fmcd included.
The instance has DB2AUTOSTART=TR UE

Any idea what is missing?

Bill


I do have idea what is missing: you must start the instance(s). Here is
how I do mine:

In directory /etc/rc.d/init.d I have a file 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

# 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|res tart|reload}"
exit 1
esac

#-----------------------------------------------------------------------
# Exit successfully.
#-----------------------------------------------------------------------
exit 0

You will want to modify the "INSTANCE=/dataA/db2inst1" line to find your
instance. You should also run /sbin/chkconfig on this (read the manual
page). This file should list like this:

trillian:jdbeye r[/etc/rc.d/init.d]$ ls -l IBMdb2
-rwxr-xr-x 1 root root 1360 Apr 29 15:17 IBMdb2

In fact, you might want to remove execute permission from world--other.


Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE

Phil
Nov 12 '05 #4
Jean-David Beyer wrote:
Bill Medland wrote:
Can anyone tell me what I am doing wrong?

I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1),
using the command line method (i.e. db2_install and vi and ....)

The one bit that didn't seem to be documented was how to set the
system up so that my instance would start automatically at boot time.

The /etc/inittab has the db2fmcd included.
The instance has DB2AUTOSTART=TR UE

Any idea what is missing?

Bill


I do have idea what is missing: you must start the instance(s). Here is
how I do mine:

In directory /etc/rc.d/init.d I have a file 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

# 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|res tart|reload}"
exit 1
esac

#-----------------------------------------------------------------------
# Exit successfully.
#-----------------------------------------------------------------------
exit 0

You will want to modify the "INSTANCE=/dataA/db2inst1" line to find your
instance. You should also run /sbin/chkconfig on this (read the manual
page). This file should list like this:

trillian:jdbeye r[/etc/rc.d/init.d]$ ls -l IBMdb2
-rwxr-xr-x 1 root root 1360 Apr 29 15:17 IBMdb2

In fact, you might want to remove execute permission from world--other.


Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE

Phil
Nov 12 '05 #5
Philip Nelson wrote:
Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE


I love it.

After a quick check ... it seems that the following are recognised
valid values for this parameter:

YES
yes
ON
on

Almost anything else, including YeS, is considered false. I believe
that something like ahuonfasdh would also be considered true (note the
"on" in the middle), but I wouldn't count on that for long term usage.
;-)

Nov 12 '05 #6
Philip Nelson wrote:
Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE


I love it.

After a quick check ... it seems that the following are recognised
valid values for this parameter:

YES
yes
ON
on

Almost anything else, including YeS, is considered false. I believe
that something like ahuonfasdh would also be considered true (note the
"on" in the middle), but I wouldn't count on that for long term usage.
;-)

Nov 12 '05 #7
"Darin McBride" <dm******@naboo .to.org.no.spam .for.me> a écrit dans le
message de news:lhVnc.4405 72$Ig.251771@pd 7tw2no...
Philip Nelson wrote:
Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE


I love it.

After a quick check ... it seems that the following are recognised
valid values for this parameter:

YES
yes
ON
on

Almost anything else, including YeS, is considered false. I believe
that something like ahuonfasdh would also be considered true (note the
"on" in the middle), but I wouldn't count on that for long term usage.
;-)


Darin, a nice example to show that control is necessary with the db2set
command, isn't it ?
When will that be implemented ?

Best regards,

Jean-Marc
Nov 12 '05 #8
"Darin McBride" <dm******@naboo .to.org.no.spam .for.me> a écrit dans le
message de news:lhVnc.4405 72$Ig.251771@pd 7tw2no...
Philip Nelson wrote:
Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE


I love it.

After a quick check ... it seems that the following are recognised
valid values for this parameter:

YES
yes
ON
on

Almost anything else, including YeS, is considered false. I believe
that something like ahuonfasdh would also be considered true (note the
"on" in the middle), but I wouldn't count on that for long term usage.
;-)


Darin, a nice example to show that control is necessary with the db2set
command, isn't it ?
When will that be implemented ?

Best regards,

Jean-Marc
Nov 12 '05 #9
Jean-Marc Blaise wrote:
"Darin McBride" <dm******@naboo .to.org.no.spam .for.me> a écrit dans le
message de news:lhVnc.4405 72$Ig.251771@pd 7tw2no...
Philip Nelson wrote:
> Try DB2AUTOSTART=YE S rather than DB2AUTOSTART=TR UE


I love it.

After a quick check ... it seems that the following are recognised
valid values for this parameter:

YES
yes
ON
on

Almost anything else, including YeS, is considered false. I believe
that something like ahuonfasdh would also be considered true (note the
"on" in the middle), but I wouldn't count on that for long term usage.
;-)


Darin, a nice example to show that control is necessary with the db2set
command, isn't it ?
When will that be implemented ?


As soon as I can extend my personal empire ... um, this is a public
newsgroup, right? Oops! :-)

(Seriously - talk to your IBM rep about functional improvements you'd
like to see - it helps management decide on what is important to do and
what isn't.)
Nov 12 '05 #10

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

Similar topics

1
14433
by: ! Chris | last post by:
Seeking Patch 3006854 (p3006854_9204_LINUX.zip) to install Oracle 9i under Red Hat Enterprise Linux 3 ES/AS Hi all, Aparently the 9i install bug:- Error occurred during initialization of VM Unable to load native library: /tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386/libjava.so:
1
1956
by: TOTO | last post by:
Hi, I was wondering if there are some users out there, that use: "non commercial enterprise" linux distributions (like suse linux enterprise server8, or redhat enterprise server 3) with oracle database 9i in production environments? Are you using one of those in production: 1) gentoo, 2) debian
0
2384
by: Eric Raymond | last post by:
When installing the rpms (or the tar file) onto Red Hat Enteprise Linux AS Beta 1 (Taroon), we get the follwing error: Installing all prepared tables /usr/bin/mysql_install_db: line 1: 7690 Segmentation fault /usr/sbin/mysqld --bootstrap --skip-grant-tables --basedir=/ --datadir=/var/lib/mysql --skip-innodb --skip-bdb Installation of grant tables failed The log file simply shows a start and a stop of the server.
28
2184
by: guru.slt | last post by:
Hi, Who can recommend a good IDE for C++ in Linux ? Thanks! Does the IDE use gcc compiler?
2
1745
by: dba_db2 at nospam gmx.net | last post by:
Looking at http://www-306.ibm.com/software/data/db2/linux/validate/ it told us that db2 v8.1 is not validated yet for suse90 professional ed. Do you have any experience regarding the stability of db2 on that or other up to date linux platforms ? Has anyone using that configuration made a call to the db2 support ? Does the support appease that questions ? Best regards.
0
509
by: Bill Medland | last post by:
Can anyone tell me what I am doing wrong? I installed DB2 8.1 + FP5 on Red Hat Enterprise Linux 3 (Update 1), using the command line method (i.e. db2_install and vi and ....) The one bit that didn't seem to be documented was how to set the system up so that my instance would start automatically at boot time. The /etc/inittab has the db2fmcd included. The instance has DB2AUTOSTART=TRUE
3
1971
by: Harold Pritchett | last post by:
Will FixPak 10 for db2 UDB work on Redhat Enterprise Linux V3? The IBM site says that FixPak 10 is only available for the 2.6 kernel. http://www-306.ibm.com/software/data/db2/udb/support/downloadv8_linux2632bitintel.html RHEL V3 has a 2.4 kernel with much of the 2.6 functionality added. The latest FixPak available for the 2.4 kernel is FixPak 9a.
1
2272
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 installation. My MySql server is on another box. That is why I think I should to install just the MySql client (am I right?). My Linux is "Red Hat Enterprise Linux ES release 4 (Nahant)"
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.