AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  Problems with OpenSSH and DB2

    Posted 10/05/07 02:11 AM

    Originally posted by: SystemAdmin


    Hello, I'd appreciate any help with the following problem I'm having using ssh to execute a pipeline on a remote server.

    The following pipeline works...

    $ ssh user1@host1 ". ./.profile; db2 connect to sample; db2 values current timestamp"

    Database Connection Information

    Database server = DB2/AIX64 8.2.7
    SQL authorization ID = USER1
    Local database alias = SAMPLE
    1

    2007-10-05-15.44.32.284687

    1 record(s) selected.
    However, the same pipeline on another different server fails...

    $ ssh user1@host2 ". ./.profile; db2 connect to sample; db2 values current timestamp"

    Database Connection Information

    Database server = DB2/6000 8.2.7
    SQL authorization ID = USER1
    Local database alias = SAMPLE

    SQL1024N A database connection does not exist. SQLSTATE=08003
    Both servers are running AIX 5.3.0.0 and OpenSSH 4.3.0.5301.

    I can't figure out why the database connection gets closed and what I can do to keep the database connection alive. Has anyone experienced this problem before or have any suggestions as why the database connection is being dropped ?

    Regards

    Rob.
    #AIX-Forum


  • 2.  Re: Problems with OpenSSH and DB2

    Posted 10/05/07 07:26 AM

    Originally posted by: SystemAdmin


    At the risk of asking a dumb question, what happens when you try the same command locally on host2, ie. not via ssh?

    FWIW

    Jim Lane
    #AIX-Forum


  • 3.  Re: Problems with OpenSSH and DB2

    Posted 10/05/07 03:47 PM

    Originally posted by: SystemAdmin


    Just noticed this difference:

    Database server = DB2/AIX64 8.2.7

    Database server = DB2/6000 8.2.7

    Or am I barking upo the wrong tree?

    Dave
    #AIX-Forum


  • 4.  Re: Problems with OpenSSH and DB2

    Posted 10/07/07 09:29 PM

    Originally posted by: SystemAdmin


    Hi Dave, I'm not sure if this has anything to do with the problem I'm experiencing. Both servers are running the same level os, so I struggling to see a reason why the hardware platform would have an impact in this instance.
    #AIX-Forum


  • 5.  Re: Problems with OpenSSH and DB2

    Posted 10/07/07 09:24 PM

    Originally posted by: SystemAdmin


    > At the risk of asking a dumb question, what happens
    > when you try the same command locally on host2, ie.
    > not via ssh?
    >
    > FWIW
    >
    > Jim Lane

    Hi Jim, the pipeline works if it is run locally on host2.

    #AIX-Forum


  • 6.  Re: Problems with OpenSSH and DB2

    Posted 10/07/07 09:51 PM

    Originally posted by: SystemAdmin


    After further investigation, the server I thought the pipeline worked, infact doesn't work. It gave the appearence of working due to the DB2DBDFT environment variable being set a database name. When this environment variable wasn't set, the pipeline failed. All I have to now is determine the reason for the pipeline failing.
    #AIX-Forum


  • 7.  Re: Problems with OpenSSH and DB2

    Posted 10/09/07 10:05 PM

    Originally posted by: SystemAdmin


    Well I've managed to get the pipeline working, though I don't have an understanding of the problem. The fix was to include another command to the pipeline - any command will do, even the do nothing (null command). So the following pipeline nows works:

    ssh user1@host1 ". ./.profile; db2 connect to sample; db2 values current timestamp; :"

    Database Connection Information

    Database server = DB2/AIX64 8.2.7
    SQL authorization ID = USER1
    Local database alias = SAMPLE
    1

    2007-10-10-12.01.49.259847

    1 record(s) selected.
    #AIX-Forum