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 > Issue after instance upgradation from 32-bit to 64-bit

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-07, 03:42
jesuisantony jesuisantony is offline
Registered User
 
Join Date: Oct 2007
Posts: 4
Issue after instance upgradation from 32-bit to 64-bit

Hi All,

We recently upgraded a DB2 instance from 32-bit to 64-bit. After that I am not able to query the tables from the OS(i.e..directly wihtout getting into the db2 prompt).

$ db2 select * from ab
SQL0104N An unexpected token "sqllib" was found following "inst1
prev_check_run". Expected tokens may include: "<space>". SQLSTATE=42601


The same is fine when accessed from the DB2 prompt.



Pls help.
Reply With Quote
  #2 (permalink)  
Old 11-22-07, 04:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
try this:
db2 "select * from ab"
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 11-22-07, 04:58
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Background: This is not a DB2 problem but relates to your shell. Whenever you type '*' or '?', the shell will expand this based on the content of the local directory. So if you have three files 'abc', 'def', and 'xyz' in the current directory, your command will become:
Code:
select abc def xyz from ab
If you look at this statement, you will agree that it is syntactically incorrect and DB2 must complain about it. (This happens way before the DB2 CLP is invoked.)

Putting quotes around it - as Marcus suggested - prevents the globbing of the shell and DB2 will get the "*". Another (but IMHO more cumbersome) alternative is to escape any special characters that the shell interprets (*, ?, $, etc.):
Code:
select \* from ab
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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