If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 EEE syntax question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-20-08, 10:35
mark_maz mark_maz is offline
Registered User
 
Join Date: Feb 2002
Location: Hamilton
Posts: 138
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
Reply With Quote
  #2 (permalink)  
Old 03-20-08, 11:16
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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
Reply With Quote
  #3 (permalink)  
Old 03-20-08, 11:28
mark_maz mark_maz is offline
Registered User
 
Join Date: Feb 2002
Location: Hamilton
Posts: 138
Thanks

I used this syntax

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On