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 > SQL crashes Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-05, 16:53
rhayabusa rhayabusa is offline
Registered User
 
Join Date: Feb 2005
Posts: 21
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;
Reply With Quote
  #2 (permalink)  
Old 03-02-05, 01:10
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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 01:15.
Reply With Quote
  #3 (permalink)  
Old 03-02-05, 09:34
rhayabusa rhayabusa is offline
Registered User
 
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 = ""
Reply With Quote
  #4 (permalink)  
Old 03-02-05, 11:00
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
Agree with grofaty

Check the db2diag.log file


mujeeb
Reply With Quote
  #5 (permalink)  
Old 03-02-05, 12:05
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #6 (permalink)  
Old 03-02-05, 12:33
rhayabusa rhayabusa is offline
Registered User
 
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.
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