Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2005
    Posts
    8

    Unanswered: error on renaming table. db21017e -2097151987.

    Howdy folks. I'm not a db2 admin but need to know why my script fails.

    1) tried running "db2licm -l" from a prompt (db2 =>) but it didn't like it
    2) tried running "db2level" but similarly it didn't like it.

    So I hope this is whatever info the above command were searching for: Linux390 8.1.5



    Every day we run a shell script (#!/bin/sh) that loads new data into various tables and creates new views & indices. Sometimes it errors out like it did two days ago.

    This is the error I got:
    DB21017E The Command Line Processor encountered a system error with the front-end process output queue. Reason code = -2097151987.

    It failed on trying to rename a certain table (eg. xxxx) to _save (we rename good but older tables to xxxx _save in case we have to revert back to them).

    Why did it fail? Should we update our system with the latest patches? (we're aware that there is one but are waiting to see what happens to everyone else). Any other advice? thx.


  2. #2
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    db2licm does not run in db2 prompt.
    it's run in command line from OS level.
    same as db2level

  3. #3
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    -2097151987=0x8300000D
    0x83 means this is OS error.
    0x0D from OS means 0x0000000D (13) = Permission denied

  4. #4
    Join Date
    Nov 2005
    Posts
    8
    Hey, neato.

    C:\Program Files\IBM\SQLLIB\BIN>db2evel
    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL08010" with level identifier "01010106".
    Informational tokens are "DB2 v8.1.0.36", "s021023", "", and FixPak "0".
    Product is installed at "C:\PROGRA~1\IBM\SQLLIB".

    I did a "dir" in that directory but have no "db2licm" command.


    So then, if the OS denied renaming the table from xxxx to xxxx_save could it simply be that the table was being accessed right then? Seems if it was accessed (and probably locked) for that split second that the OS wouldn't have rights to override the lock. I'm wondering if we have to rethink how we update these tables every day. This method just drops tables, creates new tables and inserts new data. The other option is to compare the difference and inlclude the changes. The former run in about 6 minutes. The latter in about 45.

    Any more advice?
    Last edited by beeblequix; 11-14-05 at 12:43.

  5. #5
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    ./sqllib/adm/db2licm

    please try to run the rename table in CLP and post the error message/exact command you used and let me see if i can find something here

  6. #6
    Join Date
    Oct 2005
    Posts
    109
    Check on this:
    http://www.dbforums.com/showthread.php?t=1097630

    -> Too many files open.

    Is that possible ?
    Juliane

  7. #7
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    Quote Originally Posted by juliane26
    Check on this:
    http://www.dbforums.com/showthread.php?t=1097630

    -> Too many files open.

    Is that possible ?
    RC is different:
    in the link you gave it's -2097151976
    in this case it is -2097151987

  8. #8
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    it's easy to convert from RC to something meaningful like:
    -2097151976
    convert from negative dec to hex:
    -2097151976 -> 2097151976-1=2097151975 -> 7CFFFFE7 -> FFFFFFFF-7CFFFFE7=0x83000018.

    as we know, 0x83 means operating system error, and check OS error code for 0x18 = 0x00000018 (24) = Too many open files

  9. #9
    Join Date
    Nov 2005
    Posts
    8
    If I just ran the command again via CLP it would work. And it did work the next time we ran it (only 10 minutes later). I apologize -- I meant to state that 99% of the time this same script works. It's that buggerly 1% that it doesn't, and from what it looks like it's going to happen from time to time, at least how we have it set up.


    The command (taken from the shell script) is:
    ...
    # ================================================== ===========
    # Rename table xx_velocity to xx_velocity_save
    # ================================================== ===========
    db2 rename table xx_velocity to xx_velocity_save
    if [ "$?" = "0" ]
    then echo "Renamed xx_velocity to _save"
    else
    echo "Could not rename xx_velocity to _save."
    echo "RENAME xx_CARD_SAVE TO xx_CARD"
    echo "RENAME xx_ACCOUNT_SAVE TO xx_ACCOUNT"
    echo "RENAME xx_ACCT_XREF_SAVE TO xx_ACCT_XREF"
    echo "YOU NEED TO RECREATE ALL VIEWS."
    echo "Contact your systems administrator."
    echo "Renewal Critical Section Failure, run recovery script rename_save_card_acct_xref, then run rollback script creat
    e_all_views, then retry the script." | mail -s "Renewal Critical Section Failure. Contact the systems administrator." me@mycompany.com -c abunchofpeople@mycompany.com -c bossman@mycompany.com
    exit "$?"
    fi
    db2 connect reset
    echo --Renamed xx_... tables to xx_..._save

    There are other tables that in this part get renamed but they're basicly the same.

    This is the exact error that was written to the log:
    ================================================== ========
    ENTERING CRITICAL SECTION 7 OF RENAMING TABLES TO _save
    ================================================== ========
    ==Renaming xx_... tables to xx_..._save

    Database Connection Information

    Database server = xxx Linux 390 8.1.5
    SQL authorization ID = xxx
    Local database alias = xxxxxx

    Connected to eba database
    DB20000I The SQL command completed successfully.
    Renamed xx_card to _save
    DB20000I The SQL command completed successfully.
    Renamed xx_account to _save
    DB20000I The SQL command completed successfully.
    Renamed xx_acct_xref to _save
    DB21017E The Command Line Processor encountered a system error with the
    front-end process output queue. Reason code = -2097151987.
    Could not rename xx_velocity to _save.
    RENAME xx_CARD_SAVE TO xx_CARD
    RENAME xx_ACCOUNT_SAVE TO xx_ACCOUNT
    RENAME xx_ACCT_XREF_SAVE TO xx_ACCT_XREF
    YOU NEED TO RECREATE ALL VIEWS.
    Contact your systems administrator.


    Most other companies that do this type of daily update run a comparison between the new and old data and assimilate the new data without dropping the tables. I'm now under the impression that we're doing the "fast but furious" method (fast because 6 minutes is way less than 45, furious because it makes my VP really mad with any downtime). I'm going to pursue the other method. Bottom line is that I need a stable system, and I'm sure my employers will agree.

    BTW, you guys are so AWESOME! Quick, intelligent replies. I'm glad I stopped by. thx.

    Last edited by beeblequix; 11-14-05 at 13:43. Reason: added error message

  10. #10
    Join Date
    Oct 2005
    Posts
    109
    wangzhonnew,

    how and where can I check the OS error code ?

    In this special case it would be D=13, but I am a little OS ignorant and can't find the reference ...
    Juliane

  11. #11
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    basicly you can use db2diag -rc <RC code> to get ZRC code meanings.
    If you want to check OS error, you need to open .h files from OS and read the code definition...

  12. #12
    Join Date
    Sep 2003
    Posts
    237
    That's very useful db2diag -rc <RC code> to get ZRC code meanings. It even interpreted the OS error. The ZRC list was not even collated the last time I saw it. It was frustrating.
    On AIX,
    vi /usr/include/sys/errno.h gives you OS errors.
    mota

  13. #13
    Join Date
    Oct 2005
    Posts
    109
    Interesting, thank you.
    Learned something today.
    Juliane

  14. #14
    Join Date
    Nov 2005
    Posts
    8
    http://www.forumsforyou.com/p/comp.d...1987_3429.html

    I got this error again and did a google search. This guy is coming up with a different error from the same exact numbers. He thinks his system is "out of memory". Is there a layman's way of converting this negative error and converting it into something useful? I tried using this tool:
    http://www.parkenet.com/apl/HexDecConverter.html but when I put the negative number in I get this: -7CFFFFF3, which isn't what you got (wangzhonnew got 7CFFFFE7).....who's right?


  15. #15
    Join Date
    Nov 2005
    Location
    Toronto
    Posts
    65
    -2097151976 -> 2097151976-1=2097151975 -> 7CFFFFE7 -> FFFFFFFF-7CFFFFE7=0x83000018.

    -2097151987=-7CFFFFF3

    they are different number....
    IBM Certified DBA for DB2 UDB
    IBM Certified Database Developer for DB2 UDB
    DB2 Tech Support, IBM Toronto Software Lab

Posting Permissions

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