vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 Any idea what is missing? Bill |
| |||
| 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=TRUE > > 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|restart|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:jdbeyer[/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 |
| |||
| 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=TRUE >> >> 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|restart|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:jdbeyer[/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=YES rather than DB2AUTOSTART=TRUE Phil |
| |||
| Philip Nelson wrote: > Try DB2AUTOSTART=YES rather than DB2AUTOSTART=TRUE 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 McBride" <dmcbride@naboo.to.org.no.spam.for.me> a écrit dans le message de news:lhVnc.440572$Ig.251771@pd7tw2no... > Philip Nelson wrote: > > > Try DB2AUTOSTART=YES rather than DB2AUTOSTART=TRUE > > 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 |
| ||||
| Jean-Marc Blaise wrote: > "Darin McBride" <dmcbride@naboo.to.org.no.spam.for.me> a écrit dans le > message de news:lhVnc.440572$Ig.251771@pd7tw2no... >> Philip Nelson wrote: >> >> > Try DB2AUTOSTART=YES rather than DB2AUTOSTART=TRUE >> >> 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.) |