Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: How to automaticaly start DB2 after reboot of Linux

    Hi,
    I have installed DB2 v9.1 on Red Hat Linux. Installation completed successfully. But after reboot I need to start DB2 manually. How to set automatic start up of DB2 on Linux?
    Thanks,
    Grofaty

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    See the db2iauto command as described in the Command Reference manual.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    1. I have listed the instances by command: "db2ilist". I got result "db2inst1"
    2. I have executed command "db2iauto -on db2inst". No error was returned and db2set variable "DB2AUTOSTART=YES" was automatically created.
    3. I have rebooted Linux and the database after reboot still doesn't start automatically. Have I missed something?

    Thanks,
    Grofaty

  4. #4
    Join Date
    Jun 2006
    Posts
    471
    this setting is used when instance comes down for autostart at boot :
    - there is a process : db2fmcd : fault monitor coordinating daemon
    - controlled from initab file (for unix ..)
    in the structure of linux where processes are started at boot time
    (/etc/init.d..) you should create a file that will start db2 similar to startup of other processes and a file to stop db2 (sxxxxx and kxxxxx) no samples shipped with db2 anymore.
    it should contain : su -c db2inst1 "db2start"
    this will start db2
    keeping db2 up is controlled by db2fmcd
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    1. in file /etc/inittab there is the following data:
    Code:
    fmc:2345:respawn:/opt/ibm/db2/V9.1/bin/db2fmcd #DB2 Fault Monitor Coordinator
    2. I have created the file /etc/init.d/db2 assign privileges (chmod 777 db2) and put into the following commands:
    Code:
    #! /bin/sh
    . /home/db2inst1/sqllib/db2profile
    su -c /opt/ibm/db2/V9.1/adm/db2start db2inst1
    3. Reboot Linux and DB2 still doesn't start.

    By the way I have executed the /etc/init.d/db2 manually and DB2 starts successfully. It just looks like /etc/init.d/db2 file is not executed at startup.

    Any idea?

  6. #6
    Join Date
    Jun 2006
    Posts
    471
    is this the correct path ?
    according to me, there are some subdirectories that specify the startup/boot mode of linux /etc/rc5.d is normal start of linux..
    this directory keeps link to file, doing the startup
    or see for another example
    http://www.raibledesigns.com/tomcat/boot-howto.html
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  7. #7
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    @grofaty: have you tried the supported way, i.e. "db2iauto"?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  8. #8
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    sorry, I started working on Red Hat Linux at customer, but at my company I continued to work on Ubuntu 6.10 Linux x86. I just assumed the Linux is Linux, but...

    I found out there are some differences between Red Hat and Ubuntu. I have also got answer from IBM lab there is a problem of auto-start DB2 on Ubuntu, but I manage to work it anyway. I have posted the solution to DB2 IBM forum.

    So problem solved, thank you very much for hints ant tips.
    Lp,
    Igor

  9. #9
    Join Date
    Jan 2003
    Posts
    1,605
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Last edited by grofaty; 04-15-07 at 09:06.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •