Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Join Date
    Feb 2009
    Posts
    30

    Unanswered: I can't execute db2 command

    Hİ.
    I'm new with DB2. When I login as instance db2inst1. I want to create database and table, in short I want to execute query but when I write db2 ..... There appear an error:
    SQL10007N Message "-1390" couldn't be retrieved. Reason code "5".

    Please help me soon...
    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What is you DB2 version and OS?

    Andy

  3. #3
    Join Date
    Feb 2009
    Posts
    30
    DB2 V9.5 and I use Linux(Pardus)

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    What is the output of "db2ilist"?
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Feb 2009
    Posts
    30
    there isnt any error about instance I have one instance named db2inst1

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I assume you created the instance when you installed DB2. Did you install any fixpacks? What is the output of db2level? Did you issue db2start?

    Andy

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    do you login directly as db2inst1 or do you "su" from another user id?

    try to source db2profile
    . sqllib/db2profile


    .profile should be doing it for you if you login correctly.

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I'm thinking that your shell fails to execute the DB2 profile script, which should reside in ~/sqllib/db2profile

    Make sure you source it when executing, e.g. add the following to your shell profile:

    Code:
    . ~/sqllib/db2profile
    ---
    "It does not work" is not a valid problem statement.

  9. #9
    Join Date
    Feb 2009
    Posts
    30
    --I created instance while installing db2. and I execute also db2start command.
    --I tried both directly login as db2inst1 and login using su from other user id. I login correctly, there isnt problem on login in.
    -I execute db2level command and appeared:

    DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL09050" with level identifier "03010107".
    Informational tokens are "DB2 v9.5.0.0","s071001","LINUXIA3295", and Fİx Pack "0".
    Product is installed at "/opt/ibm/db2/v9.5".

  10. #10
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    did you try to source db2profile?

    also, verify that your .profile has the following:

    # The following three lines have been added by UDB DB2.
    if [ -f sqllib/db2profile ]; then
    . sqllib/db2profile
    fi

  11. #11
    Join Date
    Feb 2009
    Posts
    30
    how can I source db2profie.
    Moreover I looked profile and found these lines:

    if [ -f ${INSTHOME?}/sqllib/userprofile ]; then
    . ${INSTHOME?}/sqllib/userprofile
    fi

  12. #12
    Join Date
    Feb 2009
    Posts
    30
    My log file is:

    Installing DB2 file sets:.......Success
    Setting DB2 library path:.......Success
    Executing control tasks:.......Success
    Updating global registry:.......Success
    Updating the db2ls link:.......Success
    Registering DB2 licenses:.......Success
    Setting default global profile registry variables:.......Success
    Initializing instance list:.......Success
    Configuring DB2 instances:.......Success
    Updating global profile registry:.......Success

    ================================================== ==========

    DB2 Setup log file started at: Sat Feb 28 18:24:49 2009 EET
    ================================================== ==========

    Operating system information: Linux 2.6.25.20-114.#1 SMP Mon Jan 19 15:02:57 EET 2009 i686
    The DB2 installer could not find the IBM Tivoli System Automation for
    Multiplatforms Base Component (SA MP Base Component) on the DB2 install media.
    The SA MP Base Component should be located at db2/<platform>/tsamp sub
    directory under the top directory of the DB2 install media. If you want to use
    the SA MP Base Component with the DB2 HA feature, see the SA MP Base Compoenent
    Installation and Configuration Guide for information about how to manually
    install the SA MP Base Component.

    Product to install: IBM DB2 Express Edition
    Installation type: Typical
    Previously Installed Components:
    Base client support
    Java support
    SQL procedures
    Base server support
    IBM Software Development Kit (SDK) for Java(TM)
    Communication support - TCP/IP
    Replication tools
    Control Center
    DB2 data source support
    DB2 LDAP support
    DB2 Instance Setup wizard
    First Steps
    Sample database source
    Selected Components:

    Languages:
    English(already installed)

    Target directory: /opt/ibm/db2/V9.5

    Space required: 0 MB
    Install SA MP Base Component: No

    Existing instances to configure:
    Instance name: db2inst1
    Start instance on reboot: Yes
    Instance user information:
    User name: db2inst1
    UID: 1002
    Group name: db2iadm1
    Home directory: /home/db2inst1



    Response file name: /root/db2exp.rsp

    Installing DB2 file sets:.......Success
    Setting DB2 library path:.......Success
    Executing control tasks:.......Success
    Updating global registry:.......Success
    Updating the db2ls link:.......Success
    Registering DB2 licenses:.......Success
    Setting default global profile registry variables:.......Success
    Initializing instance list:.......Success
    Configuring DB2 instances:.......Success
    Updating global profile registry:.......Success

  13. #13
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    I recommend that you work through the "First Steps" that come with DB2.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  14. #14
    Join Date
    Feb 2009
    Posts
    30
    when I use db2cc and use control center and write a query there become
    ?
    ?

    message.

  15. #15
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Log out of Linux, and then log back in so you are at your home directory.

    Then type pwd and post the results.
    Then type: ls -all and post the results.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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