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 > How to get previous executed command in db2 using DB2 Command Window

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-09, 08:57
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
How to get previous executed command in db2 using DB2 Command Window

Hi,
in DB2/Linux v9.5 when executing db2 and pressing enter DB2 opens Command Window mode, so only SQL commands need to be written.

On DB2/Windows when I press up-key I get previous command executed, but on Linux I get ^[[A simbols. If using db2 commands from shell up-key works normaly.

How to get previous command from DB2 Command Window on Linux?
Thanks
Reply With Quote
  #2 (permalink)  
Old 02-24-09, 05:30
thangaraju thangaraju is offline
Registered User
 
Join Date: Feb 2009
Posts: 5
Instead, you can use command history, it will list the previous ran commands.
Reply With Quote
  #3 (permalink)  
Old 02-24-09, 07:20
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
db2 cmd in linux doesn't store your history..... you need to run it from the sheel for the history to be maintained or else use the command editor to execute your queries.....
__________________
IBM Certified Database Associate, DB2 9 for LUW
Reply With Quote
  #4 (permalink)  
Old 02-24-09, 07:40
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
i can use it on linux 9.5.3
HISTORY
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #5 (permalink)  
Old 02-24-09, 08:06
thangaraju thangaraju is offline
Registered User
 
Join Date: Feb 2009
Posts: 5
Yes Rahul, We can use history in linux for sure.
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