Topic
  • 60 replies
  • Latest Post - ‏2016-11-16T08:39:36Z by chaoj
LeoPetraz
LeoPetraz
235 Posts

Pinned topic DB2 Express-C 10.1 for Mac OS X installation guide

‏2013-01-10T21:37:53Z |

DB2 Express-C installation guide for Mac OS X

Updated November 2016

Instead of installing DB2 for Mac natively, I recommend running DB2 using the DB2 Express-C Docker image.


Prerequisites

  • Mac OS X Mountain Lion or newer
  • XCode developer tools must be installed. These can be installed from the Mac App Store.


Configure Mac OS X and install DB2 (updated 2015-06-05)

1. Ensure the following entries are in the /etc/sysctl.conf. Create the file /etc/sysctl.conf if it does not exist.

kern.sysv.shmmax=1073741824
kern.sysv.shmmin=1
kern.sysv.shmmni=4096
kern.sysv.shmseg=32
kern.sysv.shmall=1179648
kern.maxfilesperproc=65536
kern.maxfiles=65536

Restart your Mac after creating the file to make the values take effect.

2. Open a terminal with a shell for the the user that will become instance owner.

3. Ensure that otool is in the path. Execute otool:

     otool

If the error is "command not found" then run the following

     export PATH=$PATH*:*/Applications/XCode.app/Contents/Developer/usr/bin

4. Extract the DB2 install image from the tar archive:

     tar -xzvf db2_v101_macos_expc.tar.gz

The image will be extracted into an expc directory.

5. Enter the expc directory and run the installer and perform a non-root install:

     cd expc
     ./db2_install
  # *** DO NOT RUN db2_install AS ROOT ***

This will install DB2 to the following default location: /Users/$(whoami)/sqllib

Execute step 6 if you need to enable connections for a userid other than the instance owner:

6. Enable OS authentication. (You need to be an Admin user to run these commands):

         cd /Users/$(whoami)/sqllib/security
         sudo chown root /Users/$(whoami)/sqllib/security/db2ckpw
         sudo chmod u+rxs /Users/$(whoami)/sqllib/security/db2ckpw 
         sudo chmod o+rx  /Users/$(whoami)/sqllib/security/db2ckpw

The instructions for starting DB2 and configuring remote access are the same as before.

In case you're reinstalling

7. Re-catalog your previous database. If you have a local database the following should do the work
    
        db2 catalog db <db_name>


Start DB2 Server

Open up the Terminal.

The current instructions are to install as yourself, so you don't need to become a different user. (In the past, you would have had to switch users via: su - db2inst1 )

Initialize the environment for DB2:


cd $HOME/sqllib 
.   ./db2profile


Start DB2:


db2start

Network access

The instructions below assume that you installed DB2 with your current user account. If you manually created a different account such as "db2inst1", replace $(whoami) with db2inst1

If you need to access this DB2 instance remotely, you should configure the service:

db2 update dbm cfg using svcename db2c_$(whoami)

sudo su -

echo "db2c_$(whoami) 50000/tcp" >> /etc/services

exit

db2set -all
db2set DB2COMM=TCPIP
db2stop force
db2start

DB2 tips

Create a database:

db2 CREATE DATABASE yfs USING CODESET utf8 TERRITORY us PAGESIZE 32 k

Find your JDBC driver (db2jcc.jar):

cd ~/sqllib/java/

open .

 

Updated November 2016

Instead of installing DB2 for Mac natively, I recommend running DB2 using the DB2 Express-C Docker image.

 

Regards,

 

Leons Petrazickis

Platform Architect, IBM Big Data University

Updated on 2016-11-15T15:57:01Z at 2016-11-15T15:57:01Z by LeoPetraz
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-01-13T11:18:32Z  
    There is a Typo!

    export PATH=$PATH_:_/Applications/XCode.app/Contents/Developer/usr/bin
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-01-13T11:20:24Z  
    There is a Typo!

    export PATH=$PATH*:*/Applications/XCode.app/Contents/Developer/usr/bin
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-01-13T20:03:39Z  
    I had to do two additional steps to get the database to communicate with my application. 1. Update the service name and then tell db2 to use TCPIP

    This might be because I created a seperate user account on my machine to run db2. (db2inst1)

    Using db2inst1 user account I typed the following:

    db2 update dbm cfg using svcename db2c_db2inst1

    Then under my admin ID for my Mac I did:

    sudo vim /etc/services
    I then added the following to the bottom of the file and saved it.
    db2c_db2inst1 50000/tcp
    Then under the db2inst1 account I typed:

    db2set DB2COMM=TCPIP

    Finally I did
    db2stop
    db2start
    I can not connect from my java application to db2
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-01-25T04:29:42Z  
    saya sudah mengikuti nya semua langkah tetapi masih belum bisa ya? ketika saya masuk untuk perintah ./db2setup nya terima kasih
  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-01-25T19:44:25Z  
    saya sudah mengikuti nya semua langkah tetapi masih belum bisa ya? ketika saya masuk untuk perintah ./db2setup nya terima kasih
    Sila hantar sebarang mesej ralat yang anda lihat. Adalah sukar untuk membantu tanpa mengetahui butiran lanjut.

    Regards,

    Leons
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-02-21T11:08:54Z  
    • LeoPetraz
    • ‏2013-01-25T19:44:25Z
    Sila hantar sebarang mesej ralat yang anda lihat. Adalah sukar untuk membantu tanpa mengetahui butiran lanjut.

    Regards,

    Leons
    Laputik sara kruf? Evehreey?
  • XV5J_santosh_Rao
    XV5J_santosh_Rao
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-12-01T19:16:00Z  

    Hello,

    I successfully installed DB2 10.1 on my mountain lion macbook pro and created the instance following the steps you provided.

    But when I run $HOME/sqllib  ./db2profile I am getting error message 

    "./db2profile: line 177: ulimit: open files: cannot modify limit: Invalid argument"

    When i run db2start i get the following error message

    "SQL1220N  The database manager failed to allocate shared memory."

    I couldn't find any solution anywhere. Please help.

    I even tried running sqllib/bin/db2ftok but it does not create .ftok file.

    regards

    Santosh

  • XV5J_santosh_Rao
    XV5J_santosh_Rao
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-12-03T18:17:42Z  

    Hello,

    I successfully installed DB2 10.1 on my mountain lion macbook pro and created the instance following the steps you provided.

    But when I run $HOME/sqllib  ./db2profile I am getting error message 

    "./db2profile: line 177: ulimit: open files: cannot modify limit: Invalid argument"

    When i run db2start i get the following error message

    "SQL1220N  The database manager failed to allocate shared memory."

    I couldn't find any solution anywhere. Please help.

    I even tried running sqllib/bin/db2ftok but it does not create .ftok file.

    regards

    Santosh

    Hello

     

    My issue resolved.  db2start is working now. I am not sure what was the issue but i removed :install db2" from the /etc/sysctl.conf file

    i copied the below content from here

    "kern.sysv.shmmax=1073741824 kern.sysv.shmmin=1 kern.sysv.shmmni=4096 kern.sysv.shmseg=32 kern.sysv.shmall=1179648 kern.maxfilesperproc=65536 kern.maxfiles=65536 Install DB2"

    which has "Install DB2 " . I removed it and rebooted the mac and db2start worked.

    Thanks

    Santosh

     

  • MajaDjordjevic
    MajaDjordjevic
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-12-23T14:13:20Z  

    It seems that my username gets obfuscated when I try and create my instance

    This is the command I'm running:

    ./db2icrt -u 'mdjordjevic' 'mdjordjevic'
    

    and I get this error message:

    DBI1131E  The user ID mdjordje is invalid.
    

     

  • janetrm
    janetrm
    5 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-12-31T20:23:28Z  

    Hi

    I already installed db2

    dc60client:~ root# db2ls

    Install Path                       Level   Fix Pack   Special Install Number   Install Date                  Installer UID 

    ---------------------------------------------------------------------------------------------------------------------

    /opt/IBM/db2/V10.1               10.1.0.0        0                            Thu Dec 26 00:25:44 2013 CST             0 

     

    But When I tried to create an instance of DB2 I had an error related to Hostname

    dc60client:instance root# ./db2icrt -a server -u db2fenc1 db2inst1

    DBI1446I  The db2icrt command is running, please wait.

    DB2 installation is being initialized.

     The host name "dc60client.spss.com" is invalid. Specify a valid host name.

    A major error occurred during the execution that caused this program to 

    terminate prematurely. If the problem persists, contact your technical service 

    representative.

    For more information see the DB2 installation log at 

    "/tmp/db2icrt.log.11022".

    DBI1264E  Errors were encountered in running db2icrt. Please

          refer to the installation log file /tmp/db2icrt.log.11022 for more

          information.

    I change the Hostname but I got the  same  error

    macbookpro:instance root# ./db2icrt -a server -u db2fenc1 db2inst1

    DBI1446I  The db2icrt command is running, please wait.

    DB2 installation is being initialized.

     The host name "macbookpro" is invalid. Specify a valid host name.

    A major error occurred during the execution that caused this program to 

    terminate prematurely. If the problem persists, contact your technical service 

    representative.

    For more information see the DB2 installation log at 

    "/tmp/db2icrt.log.16620".

    DBI1264E  Errors were encountered in running db2icrt. Please

          refer to the installation log file /tmp/db2icrt.log.16620 for more

          information.

    Do you have any idea what is causing this error?

  • janetrm
    janetrm
    5 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2013-12-31T20:56:21Z  
    • janetrm
    • ‏2013-12-31T20:23:28Z

    Hi

    I already installed db2

    dc60client:~ root# db2ls

    Install Path                       Level   Fix Pack   Special Install Number   Install Date                  Installer UID 

    ---------------------------------------------------------------------------------------------------------------------

    /opt/IBM/db2/V10.1               10.1.0.0        0                            Thu Dec 26 00:25:44 2013 CST             0 

     

    But When I tried to create an instance of DB2 I had an error related to Hostname

    dc60client:instance root# ./db2icrt -a server -u db2fenc1 db2inst1

    DBI1446I  The db2icrt command is running, please wait.

    DB2 installation is being initialized.

     The host name "dc60client.spss.com" is invalid. Specify a valid host name.

    A major error occurred during the execution that caused this program to 

    terminate prematurely. If the problem persists, contact your technical service 

    representative.

    For more information see the DB2 installation log at 

    "/tmp/db2icrt.log.11022".

    DBI1264E  Errors were encountered in running db2icrt. Please

          refer to the installation log file /tmp/db2icrt.log.11022 for more

          information.

    I change the Hostname but I got the  same  error

    macbookpro:instance root# ./db2icrt -a server -u db2fenc1 db2inst1

    DBI1446I  The db2icrt command is running, please wait.

    DB2 installation is being initialized.

     The host name "macbookpro" is invalid. Specify a valid host name.

    A major error occurred during the execution that caused this program to 

    terminate prematurely. If the problem persists, contact your technical service 

    representative.

    For more information see the DB2 installation log at 

    "/tmp/db2icrt.log.16620".

    DBI1264E  Errors were encountered in running db2icrt. Please

          refer to the installation log file /tmp/db2icrt.log.16620 for more

          information.

    Do you have any idea what is causing this error?

    I found how to fix it :D , 

    There is not  IP address associate  to my hostname. so  run the command 

    echo "127.0.0.1 $HOSTNAME" >>/etc/hosts

    And then, I could install db2. 

    More information  

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014876277&ps=100 

    Regards

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-01-07T10:12:12Z  
    I had to do two additional steps to get the database to communicate with my application. 1. Update the service name and then tell db2 to use TCPIP

    This might be because I created a seperate user account on my machine to run db2. (db2inst1)

    Using db2inst1 user account I typed the following:

    db2 update dbm cfg using svcename db2c_db2inst1

    Then under my admin ID for my Mac I did:

    sudo vim /etc/services
    I then added the following to the bottom of the file and saved it.
    db2c_db2inst1 50000/tcp
    Then under the db2inst1 account I typed:

    db2set DB2COMM=TCPIP

    Finally I did
    db2stop
    db2start
    I can not connect from my java application to db2

    Hi,

     

    well, you wrote, that you can't connect do DB2 with your Java application ... Same for me here, too.

    Did you already find a solution for that (I know, that this thread is already a couple of months old, but I just came to get my MacBook and I'm doing my first steps).

    I can connect to my DB2 10.1 with db2 command line tool but I can't use for instance the Database Explorer that is shipped with (My)Eclipse - which a Java application. Also - after setting the Oracle Compatibility - I cannot connect with clpplus (which in turn uses Java as well).

     

    Best regards and thx in advance ;-)

    Christian

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-01-15T18:51:52Z  

    I've made some small updates to the guide to fix typos and provide additional guidance.

    It's better to use a dedicated user like db2inst1 for the DB2 instance. This avoids permissions and username length issues.

    - Leons

  • oliverqg
    oliverqg
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-03-13T14:18:23Z  

    This guide worked for me perfectly.  Thanks.

  • teetom
    teetom
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-03-18T13:28:05Z  

    Can someone tell me how to uninstall DB2 on Mac, I am not familiar with Mac?

    I accidentally ran the db2setup file without configuration listed in this topic. The installation ended in some error. 

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-03-21T19:36:45Z  
    • teetom
    • ‏2014-03-18T13:28:05Z

    Can someone tell me how to uninstall DB2 on Mac, I am not familiar with Mac?

    I accidentally ran the db2setup file without configuration listed in this topic. The installation ended in some error. 

    Hi teetom

    Here's the information I have on uninstalling DB2 Express-C on Mac. It assumes a slightly older version, but the steps should still be the same:

    The db2_deinstall script is usually the recommended method for uninstalling DB2, however there are some outstanding issues with the db2_deinstall script on Mac OS X. Until these issues are fixed, you can uninstall DB2 manually by deleting the directories where DB2 is installed. If you performed an Admin user install, you need to remove the DB2 install dir as an Admin user by running sudo rm -rf <DB2 installdir> from the Terminal command line.

    Delete the following directories.
    DB2 install dir (eg /opt/ibm/db2/V10.1 for Admin user installs, ~/sqllib for Standard User installs)

    DB2 instance dir (for Admin installs only, eg ~<instance owning user>/sqllib
    DB2 database directory (~<instance owning user>/<instance owning user>, eg ~rchase/rchase)

     

  • Mark McConnell
    Mark McConnell
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-04-15T19:01:31Z  

    The guide worked well for me. No Problems at all.

    One thing that may help - you don't need to install the full Xcode setup. You just need the command line tools, which is a much smaller package.

    I installed them a while back, from memory just see if gcc is installed if it is you have the tools if not the system will prompt you.

    Select install NOT Get Xcode.

  • Innsbruck
    Innsbruck
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-08-05T20:29:41Z  

    Xcode 5.1.1  - no file otool found

    On my Mountailn Lion Mac Book - I installed for the first time Xcode - in Version 5.1.1. there is no file otool in the directory

    
    /Applications/XCode.app/Contents/Developer/usr/bin.
    

    on my mac mini with Lion / XCode 4.2.  the file is in  /usr/bin/otool

     

  • AngocA
    AngocA
    6 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2014-10-17T21:55:39Z  

    Hello

     

    My issue resolved.  db2start is working now. I am not sure what was the issue but i removed :install db2" from the /etc/sysctl.conf file

    i copied the below content from here

    "kern.sysv.shmmax=1073741824 kern.sysv.shmmin=1 kern.sysv.shmmni=4096 kern.sysv.shmseg=32 kern.sysv.shmall=1179648 kern.maxfilesperproc=65536 kern.maxfiles=65536 Install DB2"

    which has "Install DB2 " . I removed it and rebooted the mac and db2start worked.

    Thanks

    Santosh

     

    After updating to Yosemite, DB2 stopped working.

    SQL1220N  The database manager failed to allocate shared memory.
    

    I create another thread for this issue: https://www.ibm.com/developerworks/community/forums/html/topic?id=0597855f-0a90-46aa-be02-9fae4e93232f

    Updated on 2014-10-17T21:55:52Z at 2014-10-17T21:55:52Z by AngocA
  • prl99
    prl99
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-03-21T21:23:04Z  

    Now that Apple and IBM have declared themselves partners, when will an official DB2 Express-C installation package be made available for OS X 10.10.x? It only makes senses for IBM to officially support it so Mac users can develop databases off-line that run natively on Apple hardware. Oracle gave up on Macs years ago but it looks like there might be a future for IBM databases running on Macs without virtualization or from the cloud.

  • krrose
    krrose
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-05-19T19:04:07Z  
    • prl99
    • ‏2015-03-21T21:23:04Z

    Now that Apple and IBM have declared themselves partners, when will an official DB2 Express-C installation package be made available for OS X 10.10.x? It only makes senses for IBM to officially support it so Mac users can develop databases off-line that run natively on Apple hardware. Oracle gave up on Macs years ago but it looks like there might be a future for IBM databases running on Macs without virtualization or from the cloud.

    Instructions to install DB2 v10.1 on Mac OS Yosemite:

    Prereq: XCode developer tools must be installed. These can be installed from the Mac App Store.

    1. Ensure the following entries are in the /etc/sysctl.conf. Create the file /etc/sysctl.conf if it does not exist.

    kern.sysv.shmmax=1073741824
    kern.sysv.shmmin=1
    kern.sysv.shmmni=4096
    kern.sysv.shmseg=32
    kern.sysv.shmall=1179648
    kern.maxfilesperproc=65536
    kern.maxfiles=65536

    Restart your Mac after creating the file to make the values take effect.

    2. Open a terminal with a shell for the the user that will become instance owner.
    3. Ensure that otool is in the path. Execute otool:
        otool

    If the error is "command not found" then run the following
        export PATH=$PATH*:*/Applications/XCode.app/Contents/Developer/usr/bin

    4. Extract the DB2 install image from the tar archive:
        tar -xvf <imagename>

    The image will be extracted into an expc directory.
    5. Enter the expc directory and run the installer and perform a non-root install:
        cd expc
        db2_install
     *** DO NOT RUN db2_install AS ROOT ***

    This will install DB2 to the following default location: /Users/<userid>/sqllib


    Execute step 6 if you need to enable connections for a userid other than the instance owner:

    6. Enable OS authentication (You need to be an Admin user to run these commands):
            cd /Users/<userid>/security
            sudo chown root /Users/<userid>/sqllib/security/db2chkpw
            sudo chmod u+rxs o+rx  /Users/<userid>/sqllib/security/db2chkpw
        

    The instructions for starting DB2 and configuring remote access are the same.

  • prl99
    prl99
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-05-20T18:38:44Z  

    Thank you for providing these instructions but my original request had more to do with the lack of a typical OSX installer than how to actually install this software. If Apple and IBM are going to work together, IBM needs to realize there's a much easier way for Mac users to install software than using the terminal to enter a consistent set of commands. This is what an installer is for and depending on how many things change in the installation due to hardware and software, a set of binaries could probably be provided with a proper installation app that adds the sysctl.conf file as well as asking which userID to run the server application under. I know most of you on this forum only use the terminal but this database software is not for the typical large system installation so you'll have more small system installations looking to make use of the applications Apple and IBM are currently releasing. 

     

    Thanks for the instructions. I will give it shot.

  • MohanR
    MohanR
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-08-09T08:06:37Z  

    /Users/radhakrishnan/Documents/Algorithms/DB2/expc/db2/macos/install/db2setup: line 606: /tmp/db2.tmp.6723/db2/macos/install/../java/jre/bin/java: No such file or directory

    You are using a Java(TM) Runtime Environment that has not been officially tested for use with DB2.  This command will continue to execute, however if you experience problems, refer to the DB2 installation documentation for a list of supported environments.

    The UI is not showing installation options after the splash image.

    It is Yosemite with JDK 1.8.0_45

    Update : After I installed jdk 1.6 from Apple's site the splash image changed to a blank Java Window. This is very funny.

    Updated on 2015-08-09T08:35:24Z at 2015-08-09T08:35:24Z by MohanR
  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-05T16:07:01Z  

    Hi, I was able to follow these instructions till step#6. Then I tried  su - db2inst1 from step#7 but getting a message su:sorry . Looks like the installation didn't create db2inst1. Could you please advice how can I resolve this? I don't see Db2 in Applications either.

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-05T18:24:12Z  
    • AdhilM
    • ‏2015-10-05T16:07:01Z

    Hi, I was able to follow these instructions till step#6. Then I tried  su - db2inst1 from step#7 but getting a message su:sorry . Looks like the installation didn't create db2inst1. Could you please advice how can I resolve this? I don't see Db2 in Applications either.

    Hi Adhil,

     

    That was left over from an earlier version of the instructions. I've updated the instructions to no longer refer to a "db2inst1" user account. The current instructions install DB2 under your main user account.

     

    Regards,

     

    Leons

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-05T20:04:53Z  
    • LeoPetraz
    • ‏2015-10-05T18:24:12Z

    Hi Adhil,

     

    That was left over from an earlier version of the instructions. I've updated the instructions to no longer refer to a "db2inst1" user account. The current instructions install DB2 under your main user account.

     

    Regards,

     

    Leons

    Hi Leons,

     

    I am getting the following errors could you please advise how to resolve that?

    Adhils-MacBook-Pro:~ adhilm$ cd $HOME/sqllib
    Adhils-MacBook-Pro:sqllib adhilm$ .   ./db2profile
    -bash: ulimit: open files: cannot modify limit: Invalid argument
    Adhils-MacBook-Pro:sqllib adhilm$ db2start
    SQL1220N  The database manager failed to allocate shared memory.
    Adhils-MacBook-Pro:sqllib adhilm$

     

    Adhil M.

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-05T20:11:25Z  
    • AdhilM
    • ‏2015-10-05T20:04:53Z

    Hi Leons,

     

    I am getting the following errors could you please advise how to resolve that?

    Adhils-MacBook-Pro:~ adhilm$ cd $HOME/sqllib
    Adhils-MacBook-Pro:sqllib adhilm$ .   ./db2profile
    -bash: ulimit: open files: cannot modify limit: Invalid argument
    Adhils-MacBook-Pro:sqllib adhilm$ db2start
    SQL1220N  The database manager failed to allocate shared memory.
    Adhils-MacBook-Pro:sqllib adhilm$

     

    Adhil M.

    ulimit: open files: cannot modify limit: Invalid argument

     

    See Step 1 about creating /etc/sysctl.conf. Please double-check it's there with the values from Step 1, and make sure that you've restarted your Mac after setting those values.

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-05T23:57:05Z  
    • LeoPetraz
    • ‏2015-10-05T20:11:25Z

    ulimit: open files: cannot modify limit: Invalid argument

     

    See Step 1 about creating /etc/sysctl.conf. Please double-check it's there with the values from Step 1, and make sure that you've restarted your Mac after setting those values.

    Hi,

    I thought I did create this by using the instructions on this link: http://hints.macworld.com/article.php?story=20020722084339470

    I am not a Mac expert. Would you be able to provide instructions on

    1. How to check if those entries exist in /etc/sysctl.conf? I tried sudo -vi /etc/sysctl.conf, and got the following, not sure what to do after this:

    Adhils-MacBook-Pro:~ adhilm$ sudo -vi /etc/sysctl.conf
    usage: sudo -h | -K | -k | -L | -V
    usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
    usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u
                user name|#uid] [-g groupname|#gid] [command]
    usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
                name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
                name|#uid] file ...
    Adhils-MacBook-Pro:~ adhilm$

    2. How to edit it to add the entries specified in step#1 ?

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T06:40:07Z  
    • AdhilM
    • ‏2015-10-05T23:57:05Z

    Hi,

    I thought I did create this by using the instructions on this link: http://hints.macworld.com/article.php?story=20020722084339470

    I am not a Mac expert. Would you be able to provide instructions on

    1. How to check if those entries exist in /etc/sysctl.conf? I tried sudo -vi /etc/sysctl.conf, and got the following, not sure what to do after this:

    Adhils-MacBook-Pro:~ adhilm$ sudo -vi /etc/sysctl.conf
    usage: sudo -h | -K | -k | -L | -V
    usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
    usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u
                user name|#uid] [-g groupname|#gid] [command]
    usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
                name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
                name|#uid] file ...
    Adhils-MacBook-Pro:~ adhilm$

    2. How to edit it to add the entries specified in step#1 ?

    Hi,

    in your command, you should omit the "-", i.e. sudo vi /etc/sysctl.conf.

    You will be asked for a password, which should be your personal password, as long as you have admin privileges on your machine.

    And please take care of one thing: Make sure, you don't have trailing blanks in all the lines ! Otherwise your DB2 won't be able to start correctly. I had this issue some time back when I just copied the lines from a installation instruction and after an update to a newer MacOS X version, my DB2 didn't start anymore.

     

    Have fun using DB2 on your Mac :-)

    Christian

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T14:43:04Z  

    Hi,

    in your command, you should omit the "-", i.e. sudo vi /etc/sysctl.conf.

    You will be asked for a password, which should be your personal password, as long as you have admin privileges on your machine.

    And please take care of one thing: Make sure, you don't have trailing blanks in all the lines ! Otherwise your DB2 won't be able to start correctly. I had this issue some time back when I just copied the lines from a installation instruction and after an update to a newer MacOS X version, my DB2 didn't start anymore.

     

    Have fun using DB2 on your Mac :-)

    Christian

    Hi,

     

    Now I am getting the below message. Could you please advise how to fix this?

     

    Last login: Tue Oct  6 10:39:24 on ttys000
    adhils-mbp:~ adhilm$ sudo vi /etc/sysctl.conf

     

    E325: ATTENTION
    Found a swap file by the name "/etc/.sysctl.conf.swp"
              owned by: root   dated: Mon Oct  5 19:14:01 2015
             file name: /private/etc/sysctl.conf
              modified: YES
             user name: root   host name: Adhils-MacBook-Pro.local
            process ID: 10079
    While opening file "/etc/sysctl.conf"

    (1) Another program may be editing the same file.
        If this is the case, be careful not to end up with two
        different instances of the same file when making changes.
        Quit, or continue with caution.

    (2) An edit session for this file crashed.
        If this is the case, use ":recover" or "vim -r /etc/sysctl.conf"
        to recover the changes (see ":help recovery").
        If you did this already, delete the swap file "/etc/.sysctl.conf.swp"
        to avoid this message.

    Swap file "/etc/.sysctl.conf.swp" already exists!
    [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

     

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T14:57:15Z  
    • AdhilM
    • ‏2015-10-06T14:43:04Z

    Hi,

     

    Now I am getting the below message. Could you please advise how to fix this?

     

    Last login: Tue Oct  6 10:39:24 on ttys000
    adhils-mbp:~ adhilm$ sudo vi /etc/sysctl.conf

     

    E325: ATTENTION
    Found a swap file by the name "/etc/.sysctl.conf.swp"
              owned by: root   dated: Mon Oct  5 19:14:01 2015
             file name: /private/etc/sysctl.conf
              modified: YES
             user name: root   host name: Adhils-MacBook-Pro.local
            process ID: 10079
    While opening file "/etc/sysctl.conf"

    (1) Another program may be editing the same file.
        If this is the case, be careful not to end up with two
        different instances of the same file when making changes.
        Quit, or continue with caution.

    (2) An edit session for this file crashed.
        If this is the case, use ":recover" or "vim -r /etc/sysctl.conf"
        to recover the changes (see ":help recovery").
        If you did this already, delete the swap file "/etc/.sysctl.conf.swp"
        to avoid this message.

    Swap file "/etc/.sysctl.conf.swp" already exists!
    [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

     

    Hi,

    could you try to figure out, if the file really exists and what is the content of it ?

    Try using cat /etc/sysctl.conf to see the content.

    My local file contains only DB2 relevant entries. So there is a chance that you could try to continue editing. 

    Do you maybe have some other terminal window open, with which you try to edit the file ? if so, try closing that session.

    Christian

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T17:38:28Z  

    Hi,

    could you try to figure out, if the file really exists and what is the content of it ?

    Try using cat /etc/sysctl.conf to see the content.

    My local file contains only DB2 relevant entries. So there is a chance that you could try to continue editing. 

    Do you maybe have some other terminal window open, with which you try to edit the file ? if so, try closing that session.

    Christian

    Hi,

    I ran cat /etc/sysctl.conf. It seems file doesn't exist. I can continue editing. How can I save it after I add the entries after running sudo vi /etc/sysctl.conf? I think it will be helpful if we have basic instructions on how to view/edit sysctl.conf file in step#1. I can't find on the internet either.

     

    The below is the result of cat /etc/sysctl.conf.

    Last login: Tue Oct  6 10:41:11 on ttys000
    adhils-mbp:~ adhilm$ cat /etc/sysctl.conf
    cat: /etc/sysctl.conf: No such file or directory
    adhils-mbp:~ adhilm$

     

    Sorry these may be tiny issues, but I can't move forward.

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T18:01:48Z  
    • AdhilM
    • ‏2015-10-06T17:38:28Z

    Hi,

    I ran cat /etc/sysctl.conf. It seems file doesn't exist. I can continue editing. How can I save it after I add the entries after running sudo vi /etc/sysctl.conf? I think it will be helpful if we have basic instructions on how to view/edit sysctl.conf file in step#1. I can't find on the internet either.

     

    The below is the result of cat /etc/sysctl.conf.

    Last login: Tue Oct  6 10:41:11 on ttys000
    adhils-mbp:~ adhilm$ cat /etc/sysctl.conf
    cat: /etc/sysctl.conf: No such file or directory
    adhils-mbp:~ adhilm$

     

    Sorry these may be tiny issues, but I can't move forward.

     

    Hi,

    Ok, thats an excursion to vi... 

    If you have it open, you need to type i to get into editing mode. Then you can type in the stuff.

    After you finished, hit escape key. You will see a colon (:) in the lower left corner. Type wq and hit enter...

    More if you need more info ,:-)

    Christian

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T18:42:36Z  

     

    Hi,

    Ok, thats an excursion to vi... 

    If you have it open, you need to type i to get into editing mode. Then you can type in the stuff.

    After you finished, hit escape key. You will see a colon (:) in the lower left corner. Type wq and hit enter...

    More if you need more info ,:-)

    Christian

    maybe I should be a bit more precise and correct myself ...

    When using vi, you have at least two modes: Command mode and Edit mode. Per startup, you're in edition mode and you enter command mode by typing ":"
    You jump back to edition mode by either hitting esc key (without any command) or by executing a command, like write (i.e. save the file)

    Once you're in the editing mode, you need to tell vi, that you want to insert something. You achieve that by hitting the i key. Then you can type in your lines. You can also use copy and paste, i.e. you can use the CMD-c and CMD-v combinations, to insert a bunch of rows like the ones, you want to edit for your current issue. So you could select your entries you need from this website here with CMD-c and press CMD-v (once you are in inserting mode of vi) - But again: Pay attention on trailing blanks !

    you can hit esc to leave the inserting mode. You can then use your cursor keys to navigate to the end of each line to check, if there's some blank at the end. If so, type the x key to remove it. x removes the character your positioned at.

    if you hit double d (dd) in non inserting mode, you will delete the whole line, your cursor is positioned at.

    Once you've done editing everything (and left inserting mode with the esc key) - and here's my correction - you need to type a colon (:) to enter the vi's command mode. Then you will see the colon at the lower left corner.

    There you can save your work and quit vi.

    Saving you can achieve (in command mode) by entering a "w" for write and press enter.

    You can leave vi by entering command mode (:) and type "q" for quit and press enter. If you do both steps separately, you'll need to type the colon again ;-)
    You can of course combine both commands in one by :wq <enter>. That will save the file and quit vi and you are back on your command line.
    if you should want to leave vi and don't want to save your work or should want to force vi to write your stuff even if the file is marked readonly (appropriate file permission assumed), you could add an exclamation mark to it. E.g. the sequence :q! will force vi to quit the program without saving. :w! will force vi to write the file.
    Maybe this sheds some light on your task ;-)
    Cheers
    Christian

     

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T20:27:02Z  

    maybe I should be a bit more precise and correct myself ...

    When using vi, you have at least two modes: Command mode and Edit mode. Per startup, you're in edition mode and you enter command mode by typing ":"
    You jump back to edition mode by either hitting esc key (without any command) or by executing a command, like write (i.e. save the file)

    Once you're in the editing mode, you need to tell vi, that you want to insert something. You achieve that by hitting the i key. Then you can type in your lines. You can also use copy and paste, i.e. you can use the CMD-c and CMD-v combinations, to insert a bunch of rows like the ones, you want to edit for your current issue. So you could select your entries you need from this website here with CMD-c and press CMD-v (once you are in inserting mode of vi) - But again: Pay attention on trailing blanks !

    you can hit esc to leave the inserting mode. You can then use your cursor keys to navigate to the end of each line to check, if there's some blank at the end. If so, type the x key to remove it. x removes the character your positioned at.

    if you hit double d (dd) in non inserting mode, you will delete the whole line, your cursor is positioned at.

    Once you've done editing everything (and left inserting mode with the esc key) - and here's my correction - you need to type a colon (:) to enter the vi's command mode. Then you will see the colon at the lower left corner.

    There you can save your work and quit vi.

    Saving you can achieve (in command mode) by entering a "w" for write and press enter.

    You can leave vi by entering command mode (:) and type "q" for quit and press enter. If you do both steps separately, you'll need to type the colon again ;-)
    You can of course combine both commands in one by :wq <enter>. That will save the file and quit vi and you are back on your command line.
    if you should want to leave vi and don't want to save your work or should want to force vi to write your stuff even if the file is marked readonly (appropriate file permission assumed), you could add an exclamation mark to it. E.g. the sequence :q! will force vi to quit the program without saving. :w! will force vi to write the file.
    Maybe this sheds some light on your task ;-)
    Cheers
    Christian

     

    Thank you for the detailed instructions. I was able to edit and save those entries.

    After that, I went back to main instructions to star Db2, but I am getting the following message now. I think I accidentally ran db2start in adhilm instead of sqllib. Could you please advise how can I launch Db2?

     

    Last login: Tue Oct  6 16:20:02 on ttys000
    adhils-mbp:~ adhilm$ cd $HOME/sqllib
    adhils-mbp:sqllib adhilm$ .  ./db2profile
    adhils-mbp:sqllib adhilm$ db2start
    SQL1026N  The database manager is already active.
    adhils-mbp:sqllib adhilm$ cd

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-06T20:37:19Z  
    • AdhilM
    • ‏2015-10-06T20:27:02Z

    Thank you for the detailed instructions. I was able to edit and save those entries.

    After that, I went back to main instructions to star Db2, but I am getting the following message now. I think I accidentally ran db2start in adhilm instead of sqllib. Could you please advise how can I launch Db2?

     

    Last login: Tue Oct  6 16:20:02 on ttys000
    adhils-mbp:~ adhilm$ cd $HOME/sqllib
    adhils-mbp:sqllib adhilm$ .  ./db2profile
    adhils-mbp:sqllib adhilm$ db2start
    SQL1026N  The database manager is already active.
    adhils-mbp:sqllib adhilm$ cd

    Please disregard the earlier response. Now finally, db2start is showing a positive message DB2START processing was successful., but still do not see that the Db2 is Launched.

     

    adhils-mbp:~ adhilm$ cd $HOME/sqllib
    adhils-mbp:sqllib adhilm$ ./db2profile
    adhils-mbp:sqllib adhilm$ db2stop
    SQL1064N  DB2STOP processing was successful.
    adhils-mbp:sqllib adhilm$ ./db2profile
    adhils-mbp:sqllib adhilm$ ../db2profile
    -bash: ../db2profile: No such file or directory
    adhils-mbp:sqllib adhilm$ .   ./db2profile
    adhils-mbp:sqllib adhilm$ db2start
    SQL1063N  DB2START processing was successful.

  • AdhilM
    AdhilM
    8 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-07T03:48:29Z  
    • AdhilM
    • ‏2015-10-06T20:37:19Z

    Please disregard the earlier response. Now finally, db2start is showing a positive message DB2START processing was successful., but still do not see that the Db2 is Launched.

     

    adhils-mbp:~ adhilm$ cd $HOME/sqllib
    adhils-mbp:sqllib adhilm$ ./db2profile
    adhils-mbp:sqllib adhilm$ db2stop
    SQL1064N  DB2STOP processing was successful.
    adhils-mbp:sqllib adhilm$ ./db2profile
    adhils-mbp:sqllib adhilm$ ../db2profile
    -bash: ../db2profile: No such file or directory
    adhils-mbp:sqllib adhilm$ .   ./db2profile
    adhils-mbp:sqllib adhilm$ db2start
    SQL1063N  DB2START processing was successful.

    Hi,

    It is me again. Please disregard my prior two response. was able to figure out how to work with command line. I was successfully able to create sample database. This proves that the installation is complete. I have couple of questions as follows:

    I downloaded db2_v101_macos_expc.tar.gz

    1) Is there a client that comes with Db2 Express -C that I can use to connect to other databases hosted in my organization?

    2) I thought Db2 Express -C comes with Data Studio, if so how can I activate it?

     


     

  • c.kuhroeber
    c.kuhroeber
    32 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-10-07T05:20:47Z  
    • AdhilM
    • ‏2015-10-07T03:48:29Z

    Hi,

    It is me again. Please disregard my prior two response. was able to figure out how to work with command line. I was successfully able to create sample database. This proves that the installation is complete. I have couple of questions as follows:

    I downloaded db2_v101_macos_expc.tar.gz

    1) Is there a client that comes with Db2 Express -C that I can use to connect to other databases hosted in my organization?

    2) I thought Db2 Express -C comes with Data Studio, if so how can I activate it?

     


     

    Good Morning,

    ok, you downloaded the correct thing. The latest version of DB2 available for MacOS X - unfortunately this is not the latest version of DB2 :-(

    I don't know any edition of DB2 with comes with Data Studio - that is a change to (much) earlier versions of DB2, which came with that "wonderful" DB2 Control Center ;-)
    Anyway, you'll need to download Data Studio by hand from IBM websites - but - and that's the shadowy side of Mac OS X and IBM - there's no Mac OS X version of it. At least none that I knew of. I would love to see that.
    I like the Data Studio so I decided on my machine to install Parallels and install some Windows version as a virtual machine. Inside that I have installed Data Studio, which works fine for me, although I definitively would like to see a MacOS X version of it. This might change in the future, as Apple and IBM made a big deal, so that IBM will use > 150.000 MacBooks. Maybe they'll see the necessity, to port Data Studio to a native MacOS version.
    If you need a native MacOS database client and can ignore some of the functionality of Data Studio, you could think about e.g. DB Visualizer. This is available for MacOS and is able to connect to multiple Databases from different vendors.

    Keep on hacking and let us know you experience ;-)
    Cheers
    Christian

  • igovett
    igovett
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-11-30T19:12:45Z  

    I was able to successfully install DB2 express-C 10.1 on my Mac and am able to connect to a local database using the db2 command line processor (db2clp). 

    However, I'm seeing a problem with the process used for db2 authentication (db2ckpw).  When I connect via jdbc, or when using db2clp with a userid (e.g.  db2 connect to sample user igovett).   The connection is successful, however, a new db2ckpw process is created.   For every connect request, a new db2ckpw process is also created.  Eventually, I run out of process id's for the mac.   I can stop/restart the database manager to clean these up, but I shouldn't need to do this.

     

    I followed all the steps for installing db2, and changed the file permissions, and ownership for the db2ckpw file in ./sqllib/security.   All this works, but new processes are left around after successfully connecting with the database.   When I run junit tests via jdbc -  I run out of process id's in OSX.

     

    Easy to duplicate this problem.  

    1. count the number of db2ckpw processes ( e.g.   ps -ef | grep db2ckpw | wc -l ) 
    2. connect to the database (e.g.   db2 connect to sample user igovett )  - note:  you'll be prompted for the userid
    3. count the number of db2ckpw processes (same as step 1), but this time the number will have increased by one.

    Nothing special was done to create the local database (  db2 create database sample ).  Any ideas how to solve this problem ?

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2015-12-02T14:54:34Z  
    • igovett
    • ‏2015-11-30T19:12:45Z

    I was able to successfully install DB2 express-C 10.1 on my Mac and am able to connect to a local database using the db2 command line processor (db2clp). 

    However, I'm seeing a problem with the process used for db2 authentication (db2ckpw).  When I connect via jdbc, or when using db2clp with a userid (e.g.  db2 connect to sample user igovett).   The connection is successful, however, a new db2ckpw process is created.   For every connect request, a new db2ckpw process is also created.  Eventually, I run out of process id's for the mac.   I can stop/restart the database manager to clean these up, but I shouldn't need to do this.

     

    I followed all the steps for installing db2, and changed the file permissions, and ownership for the db2ckpw file in ./sqllib/security.   All this works, but new processes are left around after successfully connecting with the database.   When I run junit tests via jdbc -  I run out of process id's in OSX.

     

    Easy to duplicate this problem.  

    1. count the number of db2ckpw processes ( e.g.   ps -ef | grep db2ckpw | wc -l ) 
    2. connect to the database (e.g.   db2 connect to sample user igovett )  - note:  you'll be prompted for the userid
    3. count the number of db2ckpw processes (same as step 1), but this time the number will have increased by one.

    Nothing special was done to create the local database (  db2 create database sample ).  Any ideas how to solve this problem ?

    Hi Ian,

    I've reproduced the issue and opened an internal defect about this.

    One workaround would be for you to write a cron job that kills all but the newest db2ckpw process every n minutes.
     
    Another would be to instead run DB2 in a Docker container, which would run the Linux build on your Mac:

    Regards,

    Leons

  • de037427
    de037427
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-02-04T12:15:01Z  

    Team,

     

    when trying to install DB2 Express after successful extraction of the files (db2_v101_macos_expc.tar.gz) , I receive the error:

    DBI1189E There has been an attempt to use db2_install
    on an image for a platform that does not match the current platform
    'MacOS' on which it is being run.

     

    I am running OS X El Capitan Version 10.11.3

     

    Does anybody know how to get this resolved ?

     

    Many thanks - andy

     

    2016-02-12 Update:

    I renamed the folder so no 'blanks' are in the folder name and followed installation instructions at http://stackoverflow.com/questions/23341171/how-do-i-install-db2-express-c-10-1-on-osx-mavericks

    Then I could install successfully

    andy

    Updated on 2016-02-12T14:06:27Z at 2016-02-12T14:06:27Z by de037427
  • chuiyeng
    chuiyeng
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-02-10T10:27:38Z  

    Hi all,

    I am running OS X Yosemite v10.10.5 and find it very difficult to run QMF - tried for many hours and still unsuccessful.

     

    I am at this step: Extract the DB2 install image from the tar archive: tar -xvf db2_v101_macos_expc.tar.gz

    And I received this error: tar: Error opening archive: Failed to open 'db2_v101_macos_expc.tar.gz'

    Does anyone know how to resolve this? Thanks a lot in advance.

  • LeoPetraz
    LeoPetraz
    235 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-02-10T16:59:08Z  
    • chuiyeng
    • ‏2016-02-10T10:27:38Z

    Hi all,

    I am running OS X Yosemite v10.10.5 and find it very difficult to run QMF - tried for many hours and still unsuccessful.

     

    I am at this step: Extract the DB2 install image from the tar archive: tar -xvf db2_v101_macos_expc.tar.gz

    And I received this error: tar: Error opening archive: Failed to open 'db2_v101_macos_expc.tar.gz'

    Does anyone know how to resolve this? Thanks a lot in advance.

    Try tar -xzvf db2_v101_macos_expc.tar.gz

    If that still doesn't work, please download the file again.

     

    Regards,

    Leons

  • chuiyeng
    chuiyeng
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-02-11T09:30:46Z  
    • LeoPetraz
    • ‏2016-02-10T16:59:08Z

    Try tar -xzvf db2_v101_macos_expc.tar.gz

    If that still doesn't work, please download the file again.

     

    Regards,

    Leons

    Thanks. I have downloaded and able to extract now. I am now in step 5 but I received the error message below:

     

    Chuis-MacBook-Pro:~ chuiyeng$ cd expc
    Chuis-MacBook-Pro:expc chuiyeng$ ./db2_install
    DBI1324W  Support of the db2_install command is deprecated. For
          more information, see the DB2 Information Center.


    DBI1244I  Directory for non-root installation of DB2 - /Users/chuiyeng/sqllib


    DBI1160I  Non-root install is being performed.


    A major error occurred during the execution that caused this program to
    terminate prematurely. If the problem persists, contact your technical service
    representative.

    For more information see the DB2 installation log at
    "/tmp/db2_install_chuiyeng.log".
    Chuis-MacBook-Pro:expc chuiyeng$

     

     

    Any idea how to fix it? Thanks a lot for your help.

     

  • vcyee
    vcyee
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-03T18:19:40Z  
    • chuiyeng
    • ‏2016-02-11T09:30:46Z

    Thanks. I have downloaded and able to extract now. I am now in step 5 but I received the error message below:

     

    Chuis-MacBook-Pro:~ chuiyeng$ cd expc
    Chuis-MacBook-Pro:expc chuiyeng$ ./db2_install
    DBI1324W  Support of the db2_install command is deprecated. For
          more information, see the DB2 Information Center.


    DBI1244I  Directory for non-root installation of DB2 - /Users/chuiyeng/sqllib


    DBI1160I  Non-root install is being performed.


    A major error occurred during the execution that caused this program to
    terminate prematurely. If the problem persists, contact your technical service
    representative.

    For more information see the DB2 installation log at
    "/tmp/db2_install_chuiyeng.log".
    Chuis-MacBook-Pro:expc chuiyeng$

     

     

    Any idea how to fix it? Thanks a lot for your help.

     

    Did you every find a solution to this error? I am running into the same issue. I can not locate the DB2 installation log or find out who to contact.

  • DimiN
    DimiN
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-16T12:56:06Z  

    Hello I've since a view weeks a MacBook and are not yet familiar with OS X

    I tried to install DB2 Express-C 10.1 on OS X El Capitan Version 10.11.3 according this installation guide but hang at step 5 (./db2_install)  with the message as posted already before that the host name is invalid:

    .....

    DBI1160I  Non-root install is being performed.


    DB2 installation is being initialized.

     The host name "unknownF45C89AD1375" is invalid. Specify a valid host name.

    A major error occurred while installing "DB2 Express-C " on this computer. The
    installation cannot continue. If the problem persists contact your technical
    service representative.

    For more information see the DB2 installation log at
    "/tmp/db2_install_de109640.log".

    .....

    I tried to run the command in the terminal shown by janetrm (Dec 31,2013)

    echo "127.0.0.1 $HOSTNAME" >>/etc/hosts

    for  which the root privilege is necessary for the successful execution of it.

     

    I did it with "sudo" first but no permission

    unknownF45C89AD1375:expc de109640$ sudo echo "127.0.0.1 $HOSTNAME" >>/etc/hosts
    -bash: /etc/hosts: Permission denied

     

    and the without sudo:


    unknownF45C89AD1375:expc de109640$ echo "127.0.0.1 $HOSTNAME" >>/etc/hosts
    -bash: /etc/hosts: Permission denied

     

    I can ping the localhost but not the host name shown in the terminal (same as replied by comand hostname).

     

    Can somebody help who to fix this and hopefully get DB2 installed?

     

     

     

     

  • LuzERios
    LuzERios
    4 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-16T23:01:31Z  

    I installed jdk 8 then downloaded db2 express. After decompress the tar, I click db2setup I see this message in the terminal


    You are using a Java(TM) Runtime Environment that has not been officially tested for use with DB2.  This command will continue to execute, however if you experience problems, refer to the DB2 installation documentation for a list of supported environments.

    And the db2 setup Launchpad window keeps gray, nothing is displayed.  I tried re-installing apple java 6 and uninstall jdk 8, but got permission denied. 

    Could someone guide me to use the appropriate java version and install DB2 please?

    Thank you very much.

  • DimiN
    DimiN
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-17T14:19:55Z  

    Hi,

    the problem is solved ...

    I got help in other forum from Peter Kidwell and others.

     

    Peter  explained that:

    The problem is that the command line is interpreting this command as first run sudo echo "127.0.0.1 $HOSTNAME"  (do the "echo" command as root) and then redirect that output (as you) to /etc/hosts.  In other words, the redirection falls just outside of the "sudo" command.

    The easiest fix, since this is a one-time operation, is to run these commands instead:

     

    sudo su -

    enter your password here

    echo "127.0.0.1 $HOSTNAME" >>/etc/hosts

    exit

     

    this will create a small session where you run directly as the root id.  Within that session, the whole command -- including the redirection -- should work fine.

  • LuzERios
    LuzERios
    4 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-17T20:50:15Z  

    Hi,  which jdk version is supported?  I had to uninstall jdk 8 because I kept getting it was not tested and the launchpad won't display nothing.  Before installing another java version I would like confirmation. Or is it enough the Apple java 6?

     

    Thanks!!

  • LuzERios
    LuzERios
    4 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-05-19T15:46:25Z  
    • LuzERios
    • ‏2016-05-17T20:50:15Z

    Hi,  which jdk version is supported?  I had to uninstall jdk 8 because I kept getting it was not tested and the launchpad won't display nothing.  Before installing another java version I would like confirmation. Or is it enough the Apple java 6?

     

    Thanks!!

    I installed jdk 7 and jre 1.7 but same issue. Reading in the db2 notices file, I see java 7 is fine to use. So not sure why is not working the launchpad. I'm executing db2setup.  Any ideas?

    Thank you!!

  • vcyee
    vcyee
    2 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-02T15:04:58Z  
    • DimiN
    • ‏2016-05-17T14:19:55Z

    Hi,

    the problem is solved ...

    I got help in other forum from Peter Kidwell and others.

     

    Peter  explained that:

    The problem is that the command line is interpreting this command as first run sudo echo "127.0.0.1 $HOSTNAME"  (do the "echo" command as root) and then redirect that output (as you) to /etc/hosts.  In other words, the redirection falls just outside of the "sudo" command.

    The easiest fix, since this is a one-time operation, is to run these commands instead:

     

    sudo su -

    enter your password here

    echo "127.0.0.1 $HOSTNAME" >>/etc/hosts

    exit

     

    this will create a small session where you run directly as the root id.  Within that session, the whole command -- including the redirection -- should work fine.

    Hi, what other forum did you find this help on? Can you please post a link?

  • 1U04_AMIT_SUDHALKAR
    1U04_AMIT_SUDHALKAR
    3 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-15T16:34:22Z  
    • LeoPetraz
    • ‏2015-10-05T20:11:25Z

    ulimit: open files: cannot modify limit: Invalid argument

     

    See Step 1 about creating /etc/sysctl.conf. Please double-check it's there with the values from Step 1, and make sure that you've restarted your Mac after setting those values.

    I am trying to install db2 on mac and when I run the db2start command i get the following error:

     

    SQL1220N  The database manager failed to allocate shared memory.

     

    Any clues what needs to be done to fix this issue.

     

    Thanks.

  • 1U04_AMIT_SUDHALKAR
    1U04_AMIT_SUDHALKAR
    3 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-15T16:46:05Z  

    I am trying to install db2 on mac and when I run the db2start command i get the following error:

     

    SQL1220N  The database manager failed to allocate shared memory.

     

    Any clues what needs to be done to fix this issue.

     

    Thanks.

    I had an issue with /etc/sysctl.conf file.

    I fixed the issue, but now when I run db2start I get a different error:

     

    SQL1042C  An unexpected system error occurred.

     

    Any clues what is missing now ?

     

    Thanks.

  • 1U04_AMIT_SUDHALKAR
    1U04_AMIT_SUDHALKAR
    3 Posts

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-15T17:06:50Z  

    I had an issue with /etc/sysctl.conf file.

    I fixed the issue, but now when I run db2start I get a different error:

     

    SQL1042C  An unexpected system error occurred.

     

    Any clues what is missing now ?

     

    Thanks.

    Found a solution to the issue in another forum:

     

    https://www.ibm.com/developerworks/community/forums/html/topic?id=b78fe48e-b92c-448f-9154-c5ff4728f77a

     

    I ran the following commands:

     

    sudo chown db2inst1 /Users/db2inst1/sqllib/adm/*

     

    and now db2start ran successfully.

     

    Thanks.

  • rohithcsc
    rohithcsc
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-15T23:24:03Z  

    Can some one provide me the link to download the db2 express c edition for Mac. I don't find it on the web 

  • elianett
    elianett
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-06-30T21:30:01Z  

    I would like to know where I can download DB2 Express C v10.1 for Mac too.

  • PPorwal
    PPorwal
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-07-05T07:28:35Z  

    Hi All,

    Please could  some one provide me the link to download the db2 express c edition for Mac? I didn't find anywhere.

    Thanks in Advance!!

  • liukun1016
    liukun1016
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-07-06T18:52:00Z  

    when running db2_install:

    line 102 usr/bin/pwd: file or directory does not exist

    and I failed to create /pwd under usr/bin, even with sudo, as permission denied

     

    Any help on this?

  • cyper2
    cyper2
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-08-18T04:45:22Z  

    Found a solution to the issue in another forum:

     

    https://www.ibm.com/developerworks/community/forums/html/topic?id=b78fe48e-b92c-448f-9154-c5ff4728f77a

     

    I ran the following commands:

     

    sudo chown db2inst1 /Users/db2inst1/sqllib/adm/*

     

    and now db2start ran successfully.

     

    Thanks.

    Thanks. this solved my problem.

  • chaoj
    chaoj
    1 Post

    Re: DB2 Express-C 10.1 for Mac OS X installation guide

    ‏2016-11-16T08:39:36Z  

    Hi

    I run step #6, and got a lot of like below

     

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '/private/tmp/db2_jiangchao.tmp.3804/db2/macos/tools/msg/zh_TW.utf8/db2dbmig.txt': The file was not recognized as a valid object file.

    fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed

     

    please give a advice , thanks .