Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2012
    Location
    Mainz, Europe
    Posts
    1

    Unanswered: init-script for db2

    Hello out there,
    I want to start db2 right up from the start of my linux system. So I looked for a init-skript to resist in /etc/init.d.
    And I found some howtos on the web like this:
    DB2 installation - OpenVZ Linux Containers Wiki and this one:
    developerWorks : Information Management : IBM DB2 Express Forum : How-to: Ubuntu 7.10 Server x86 32-bit ...

    but is this desirable?? I think db2 should run with the EUID of dasusr2 or something like this (please correct me) and not with root-rights. Right?

    Thank you

    /modo

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    DB2 does run as a non-root user.

    Based on the runlevel, /etc/inittab/db2 is called. This script in turn handles the start of the instance as the instnace owner.

    if you have done a default install, you can control auto start of an instance using db2iauto command.

    db2iauto -on/off <instance name>

    This sets a registry variable and the scripts called by inittab/db2 check this variable before starting the instance

    HTH
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Does /etc/inittab/db2 exist on some Linux distributions?

    At my place, what they do on some servers is to use /etc/inittab to call a script that su to the instance owner and uses -c to execute db2 force application/db2 terminate/db2stop. And a similar one for db2start.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Correction: db2 force application/db2 terminate/db2stop in not in inittab. It's called manually prior to the server reboot (root will su - <instance> -c "db2 force...". inittab just call a scripts that restarts the instance.

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Quote Originally Posted by db2girl View Post
    Correction: db2 force application/db2 terminate/db2stop in not in inittab.
    Thanks!!! Feels better now!
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Somewhere between " too small" and " too large" lies the size that is just right.
    - Scott Hayes

Tags for this Thread

Posting Permissions

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