Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150

    Unanswered: DB2 EEE syntax question

    I'm trying to list the tablespaces on my 2 node but I get the following errors:

    Environment is AIX db2 8.1 FP14

    $ db2_all "<<+2<db2 connect to arcprodb"


    Database Connection Information

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

    archb04: db2 connect to arcprodb completed ok
    $ db2_all "<<+2<db2 list tablespaces show detail"|more

    SQL1024N A database connection does not exist. SQLSTATE=08003
    archb04: db2 list tablespaces ... completed rc=4

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Each invokation of db2_all (indeed, even each invokation of db2) spawns a separate shell; the connection is terminated when the first shell terminates. If you want to issue multiple commands I guess you should put them in a db2 script:
    Code:
    db2_all "<<+2<db2 -tf /path/to/my/script.db2
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150
    Thanks

    I used this syntax

    db2_all "<<+2<db2 connect to arcprodb; db2 list tablespaces show detail" > ~/output.txt

Posting Permissions

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