View previous topic :: View next topic
|
Author |
Message |
rakesh17684
New User
Joined: 08 Oct 2006 Posts: 61 Location: San Diego
|
|
|
|
hi,
hi am getting sql code -904 when i run query like
Code: |
select distinct (creator_tbl) from DB00.date_tb fetch first 10 rows only with ur
SQL0904N Unsuccessful execution caused by an unavailable resource. Reason
code: "00C90084", type of resource: "00000230", and resource name: "4K".
SQLSTATE=57011
SQL0904N Unsuccessful execution caused by an unavailable resource. Reason code: "00C90084", type of resource: "00000230", and resource name: "4K".
Explanation:
The SQL statement could not be executed because resource
"<resource-name>" of type "<resource-type>" was not
available at the time for the reason indicated by
"<reason-code>". Refer to the Problem Determination
documentation of DB2 for MVS for an explanation of resource type
codes.
User Response:
Verify the identity of the resource that was not available. To
determine why the resource was unavailable, refer to the
specified "<reason-code>".
sqlcode : -904
sqlstate : 57011
SQLCODE: -904
|
but the query on the same table works when distinct is on the index key(date) ...
Code: |
select distinct (date) from DB00.date_tbl fetch first 10 rows only with ur;
|
|
|
Back to top |
|
|
CHANDAN KAPOOR
New User
Joined: 12 Apr 2008 Posts: 36 Location: NOIDA
|
|
|
|
Are the table are in the same region as the name of the table is different ie date_tb and date_tb1. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Quote: |
select distinct (creator_tbl) from DB00.date_tb fetch first 10 rows only with ur |
Quote: |
select distinct (date) from DB00.date_tbl fetch first 10 rows only with ur; |
Are you referring the same table? |
|
Back to top |
|
|
rakesh17684
New User
Joined: 08 Oct 2006 Posts: 61 Location: San Diego
|
|
|
|
yes they are in the same region ...sorry for the typo
it should be
Code: |
select distinct (creator_tbl) from DB00.date_tb fetch first 10 rows only with ur
|
|
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Resource type 230 is temporary file .... this file is not available in your region ...it could have been archived ... this file is required to sort and remove duplicates .... if you index is unique this file is not required and hence you are getting data for query on date .... |
|
Back to top |
|
|
senthilssg
New User
Joined: 09 Dec 2005 Posts: 64 Location: USA
|
|
|
|
Hi ,
Error is due to workfile tablespaces ( DSNDB07.DSN4kxx ) are not suuficient to sort the non-indexed column for DISTINCT function .
You may have to ask your DBA to increase the number of DSN4K tabelspace for the DB2 subsystem .
Generally , performing DISTINCT function on non-indexed column would not recommended because it would take more cost in sorting .
Thanks
Senthil |
|
Back to top |
|
|
rakesh17684
New User
Joined: 08 Oct 2006 Posts: 61 Location: San Diego
|
|
|
|
Involved the DBA and sorted out the issue, the workfile was reallocated and now we are up again.
Thanks for the information it was a good learning experience |
|
Back to top |
|
|
|