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 > Error: SQLCODE=-1585, SQLSTATE=54048, SQLERRMC=null, DRIVER=3.57.82

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-09, 08:18
K.Sundaresan K.Sundaresan is offline
Registered User
 
Join Date: Jul 2009
Posts: 7
Error: SQLCODE=-1585, SQLSTATE=54048, SQLERRMC=null, DRIVER=3.57.82

I am using DB2 9.7
while selecting the view it shows me the error
Error: SQLCODE=-1585, SQLSTATE=54048, SQLERRMC=null, DRIVER=3.57.82

Qry

SELECT * FROM view_tfw T
where MST_ID='279' AND (COL_STATUS IS NULL OR COL_STATUS=1) AND COL_ADD_HIDE!='1'
AND (SERVICE_USER_ID='1' OR SERVICE_USER_ID IS NULL)
ORDER BY TABORDER,GROUP_ID,COL_USERORDER,COL_INDEX

the view has 121 column, if i remove the order by in this qry running it's smooth

Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 9216
Useable pages = 9212
Used pages = 8640
Free pages = 572
High water mark (pages) = 8640
Page size (bytes) = 32768
Extent size (pages) = 4
Prefetch size (pages) = 64
Number of containers = 1

any idea to run this view with order by
Reply With Quote
  #2 (permalink)  
Old 08-10-09, 08:24
unsosenty unsosenty is offline
Registered User
 
Join Date: Aug 2009
Posts: 1
Miley Cyrus

miley cyrus <a href=http://www.kaboodle.com/bertas>miley cyrus</a> MILEY CYRUS <a href=http://www.smosh.com/forums/index.php?showuser=585621>MILEY CYRUS</a>
Reply With Quote
  #3 (permalink)  
Old 08-10-09, 10:05
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Code:
$ db2 "? sql1585"


SQL1585N A system temporary table space with sufficient page
          size does not exist.

Explanation:

 One of the following conditions could have occurred:

1.    The row length of the system temporary table exceeded the
    limit that can be accommodated in the largest system
    temporary table space in the database.

2.    The number of columns required in a system temporary table
    exceeded the limit that can be accommodated in the largest
    system temporary table space in the database.



 The system temporary table space limits depend on its page size.
These values are:


  Max          Max   Page size of
  Record       Cols  temporary
  Length             table space
  -----------  ----  ------------
  1957  bytes  244   2K
  4005  bytes  500   4K
  8101  bytes  1012  8K
  16293 bytes  1012  16K
  32677 bytes  1012  32K


User Response:

 Create a system temporary table space of a larger page size
supported, if one does not already exist.  If such a table space
already exists, eliminate one or more columns from the system
temporary table.  Create separate tables or views, as required,
to hold additional information beyond the limit.
Reply With Quote
  #4 (permalink)  
Old 08-10-09, 11:44
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Looks like a tempspace of 32K already exists
Reply With Quote
  #5 (permalink)  
Old 08-10-09, 11:53
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2girl
Looks like a tempspace of 32K already exists
You must know something that I don't ...
Reply With Quote
  #6 (permalink)  
Old 08-10-09, 11:59
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
My apology... I don't know what I was thinking... 32K bufferpool exists, but we don't know about 32K tempspace.
Reply With Quote
  #7 (permalink)  
Old 08-10-09, 17:23
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Try to use:

Fetch first N rows only,

Or instead of Select * use Select <only needs columns> ....

Good Luck !
Reply With Quote
  #8 (permalink)  
Old 08-10-09, 19:03
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by Lenny77
Try to use:

Fetch first N rows only,

Or instead of Select * use Select <only needs columns> ....
Selecting only the required columns is always a good idea, that is true, and it may help here indeed. However, FETCH FIRST won't make any difference by itself, since it is applied after the sort, and the problem is in the width of the sort key.
Reply With Quote
  #9 (permalink)  
Old 08-10-09, 23:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I always create a 32K tempspace on every database because I never know what crazy SQL a programmer or end-user may submit. Since my temp tablespaces are SMS (all temp tablespaces should be created as SMS) they take up no space if not needed. Of course, I have to also create a 32K bufferpool.
__________________
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
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