Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Posts
    21

    Unanswered: SQL crashes Database

    Can anyone give me an idea why a statement like this would crash a database? Thanks


    With
    Stage1 As(Select acc_no, sum(col1) As s1,
    sum(col2) As s2,
    sum(col3) As s3,
    sum(col4) As s4,
    sum(col5) As s5,
    sum(col6 + col7 + col8 + col9 + col10
    + col12 + col13 + col14 + col15
    + col16 + col17 + col18) As Aged_More_120
    From tdw.aging
    Where msr_prd_id = 200401
    Group By acc_no),

    Stage2 As(Select * From Stage1
    Where s1 > 0 Or s2 > 0 Or s3 > 0 Or s4 > 0 Or s5 > 0 Or
    Aged_More_120 > 0)


    Select count(*) from Stage2;

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    no SQL can crash database! I think it is somekind of bug. Can you post your operating system version, db2 version and fixpack level. Read Must Read before posting to get info how to get this data.

    Do you have the latest fixpack? If you do, then report the problem to IBM.

    Hope this helps,
    Grofaty
    Last edited by grofaty; 03-02-05 at 02:15.

  3. #3
    Join Date
    Feb 2005
    Posts
    21
    Thanks a bunch. I really appreciate the help.

    I'm running the SQL from Winxp on the Command Line Processor.

    C:\PROGRA~1\SQLLIB\BIN\report>db2level
    DB21085I Instance "DB2" uses DB2 code release "SQL07027" with level identifier
    "03080105" and informational tokens "DB2 v7.1.0.77", "n030303" and "WR21320".

    C:\PROGRA~1\SQLLIB\BIN\report>db2licm -l
    Product Name = "DB2 Enterprise Edition"
    Product Password = "DB2UDBEE"
    Version Information = "7.2"
    Expiry Date = "Permanent"
    Concurrent Connect User Policy = "Disabled"
    Registered Connect User Policy = "Disabled"
    Enforcement Policy = "Soft Stop"
    Number of processors = "1"
    Number of licensed processors = "1"
    Annotation = ""
    Other information = ""

  4. #4
    Join Date
    Mar 2004
    Posts
    448
    Agree with grofaty

    Check the db2diag.log file


    mujeeb

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    WR21320 is fixpak 9. I would install fixpak 13 before proceding any further.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Feb 2005
    Posts
    21
    Thanks a lot guys, you've been really helpful. I don't what i'd do without this forum. I'll just have to give your suggesstion to my superiors since they wanted me to restructure my query.

Posting Permissions

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