Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    4

    Unanswered: 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.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

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