Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2002
    Posts
    13

    Unanswered: SQLCODE -1390 from DB2 UDB on AIX

    Hello all,

    I get SQLCODE -1390 when issuing the DB2 API "sqleatin" (attach to node) from a C++ program to attach to the default instance. Before issuing this API, my program first sets the environment variable DB2INSTANCE using the "putenv" system call. My application works just fine on all Solaris platforms. But it fails on some of the AIX boxes. Does anybody has any idea why it fails?

    Application details: C++ programs using CLI and API calls
    Database rel : DB2 UDB 7.1 (32 bit) Fix Pack 3
    O/S Platform : AIX 4.3 (32 bit).

    SQLCODE -1390 tells me that the DB2INSTANCE variable is not set or
    set to an invalid instance. "putenv" command was executed successfully (after the putenv call, I used "getenv" call to check the current value of DB2INSTANCE and it shows the correct value).

    I also tried my application after executing the "db2profile" script from
    my session. Still getting the same error.

    Any suggestions/ideas welcome.

    Thanks
    Anil.
    Last edited by dbfocris; 04-30-02 at 12:20.

  2. #2
    Join Date
    May 2002
    Posts
    10
    Did you try attaching to the instance explicitly in your pgm ?

  3. #3
    Join Date
    Apr 2002
    Posts
    13
    What do you mean by "attaching to the instance explicitly" ????
    Please be more specific (give an example if possible).

    Thanks
    Anil.

  4. #4
    Join Date
    May 2002
    Posts
    10
    write an embeded sql stmt with correct syntex for
    "db2 attach to <inst-name>"

  5. #5
    Join Date
    Apr 2002
    Posts
    13
    The problem with that is my application cannot use embedded SQL (to avoid pre-compilation).

    Note: As far as I know, pre-compiler translates all SQL statements to their correspondig API calls. So, I think it is going to end-up with the same situation.

    Anil.

  6. #6
    Join Date
    Oct 2001
    Posts
    68
    Hey db, Have you installed FP6 yet? This fixed a lot of problems we were having with our applications that want to "switch" between instances.

    WP

  7. #7
    Join Date
    Apr 2002
    Posts
    13
    Last week we applied DB2 FP 6 and still has the problem.

    Thanks
    Anil'

Posting Permissions

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