473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Getting SQL0901N error with SQL State: 58004 on running explain plans


Not having earned my DBA badge from the scouts just yet I'm a little
lost with an error I'm getting.

We've just upgraded our development database from 7.2 to 8.2 as the
first step in upgrading our wider environment. Of course, development
doesn't stop so I'm running some explain plans over some new views. The
problem is, when the view is accessed as part of the explain plan
script, the following error is returned.

[Error Code: -901, SQL State: 58004] [IBM][CLI Driver][DB2/6000]
SQL0901N The SQL statement failed because of a non-severe system
error. Subsequent SQL statements can be processed. (Reason "Error in
getting coldist_data from stats profile".) SQLSTATE=58004
The explain tables are in the MYSCHEMA schema and the target view is in
the "MAINSCH" schema. Of course, all this used to work before the
upgrade.

Can anyone shed any light on what could be the cause of the problem?
Running select over the view in isolation returns the data I expect.

The script I'm using (running over the standard explain plan tables):

DELETE FROM MYSCHEMA.EXPLAIN_INSTANCE;

EXPLAIN PLAN FOR
SELECT * FROM MAINSCH.VW_ACCOUNTTYPE_B;

SELECT O.operator_id, S2.target_id, O.operator_type, S.object_name,
CAST(O.total_cost AS INTEGER) cost
FROM MYSCHEMA.EXPLAIN_OPERATOR O
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S2
ON O.operator_id = S2.source_id
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S
ON O.operator_id = S.target_id
AND O.explain_time = S.explain_time
AND S.object_name IS NOT NULL
ORDER BY O.explain_time ASC, operator_id ASC;

ROLLBACK;

Nov 28 '05 #1
4 12680
marklawford wrote:
Not having earned my DBA badge from the scouts just yet I'm a little
lost with an error I'm getting.

We've just upgraded our development database from 7.2 to 8.2 as the
first step in upgrading our wider environment. Of course, development
doesn't stop so I'm running some explain plans over some new views. The
problem is, when the view is accessed as part of the explain plan
script, the following error is returned.

[Error Code: -901, SQL State: 58004] [IBM][CLI Driver][DB2/6000]
SQL0901N The SQL statement failed because of a non-severe system
error. Subsequent SQL statements can be processed. (Reason "Error in
getting coldist_data from stats profile".) SQLSTATE=58004
The explain tables are in the MYSCHEMA schema and the target view is in
the "MAINSCH" schema. Of course, all this used to work before the
upgrade.

Can anyone shed any light on what could be the cause of the problem?
Running select over the view in isolation returns the data I expect.

The script I'm using (running over the standard explain plan tables):

DELETE FROM MYSCHEMA.EXPLAIN_INSTANCE;

EXPLAIN PLAN FOR
SELECT * FROM MAINSCH.VW_ACCOUNTTYPE_B;

SELECT O.operator_id, S2.target_id, O.operator_type, S.object_name,
CAST(O.total_cost AS INTEGER) cost
FROM MYSCHEMA.EXPLAIN_OPERATOR O
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S2
ON O.operator_id = S2.source_id
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S
ON O.operator_id = S.target_id
AND O.explain_time = S.explain_time
AND S.object_name IS NOT NULL
ORDER BY O.explain_time ASC, operator_id ASC;

ROLLBACK;

Try dropping and recreating the tables in misc\EXPLAIN.DDL. Maybe they
didn't migrate properly.
I recall some issue with db2exfmt in that area which I belive to be
fixed in FP10.
If that fails... support.
I see at least one PMR on the same topic (unfortunately without resolution)

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 28 '05 #2

Serge Rielau wrote:
Try dropping and recreating the tables in misc\EXPLAIN.DDL. Maybe they
didn't migrate properly.
I recall some issue with db2exfmt in that area which I belive to be
fixed in FP10.
If that fails... support.
I see at least one PMR on the same topic (unfortunately without resolution)

Cheers
Serge


Thanks for the reply, Serge. The explain tables were rebuilt after the
upgrade but thanks for the suggestion.

I'm a little puzzled by the message "Error in getting coldist_data from
stats profile". I've located the SYSSTAT and SYSCAT.COLDIST views but I
don't understand the implication from the message.

I've yet to establish whether we have applied FP10 to be honest so I
might be chasing my own tail a little but I'm interested to learn why
this error comes up, what it means and what the resolution (ultimately)
is.

Cheers,

Mark

Nov 30 '05 #3
marklawford wrote:
I'm a little puzzled by the message "Error in getting coldist_data from
stats profile". I've located the SYSSTAT and SYSCAT.COLDIST views but I
don't understand the implication from the message.


A SQL0901 is something like an assertion in the DB2 code. Ideally, I'd
never hit one of those. And the result is that you usually have to contact
IBM support to get such issues resolved.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 30 '05 #4

Our instance of this problem has been solved.

It seems that the runstats were not computed after the upgrade and
restore that was performed. After computing these stats the explain
plans completed as expected.

Thanks to those that responded.

Mark

marklawford wrote:
Not having earned my DBA badge from the scouts just yet I'm a little
lost with an error I'm getting.

We've just upgraded our development database from 7.2 to 8.2 as the
first step in upgrading our wider environment. Of course, development
doesn't stop so I'm running some explain plans over some new views. The
problem is, when the view is accessed as part of the explain plan
script, the following error is returned.

[Error Code: -901, SQL State: 58004] [IBM][CLI Driver][DB2/6000]
SQL0901N The SQL statement failed because of a non-severe system
error. Subsequent SQL statements can be processed. (Reason "Error in
getting coldist_data from stats profile".) SQLSTATE=58004
The explain tables are in the MYSCHEMA schema and the target view is in
the "MAINSCH" schema. Of course, all this used to work before the
upgrade.

Can anyone shed any light on what could be the cause of the problem?
Running select over the view in isolation returns the data I expect.

The script I'm using (running over the standard explain plan tables):

DELETE FROM MYSCHEMA.EXPLAIN_INSTANCE;

EXPLAIN PLAN FOR
SELECT * FROM MAINSCH.VW_ACCOUNTTYPE_B;

SELECT O.operator_id, S2.target_id, O.operator_type, S.object_name,
CAST(O.total_cost AS INTEGER) cost
FROM MYSCHEMA.EXPLAIN_OPERATOR O
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S2
ON O.operator_id = S2.source_id
LEFT OUTER JOIN MYSCHEMA.EXPLAIN_STREAM S
ON O.operator_id = S.target_id
AND O.explain_time = S.explain_time
AND S.object_name IS NOT NULL
ORDER BY O.explain_time ASC, operator_id ASC;

ROLLBACK;


Dec 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: EmmanuelE | last post by:
Just installed VS2003 and tried a hello world app. Getting 404 error even when I explictly specify the start page in the url. In IIS Mgr (v 5.1), App has .aspx mapped to...
2
by: William Gower | last post by:
I am trying to display a page that has a data grid on it. I get this message Description: An error occurred during the processing of a configuration file required to service this request....
2
by: David Hearn | last post by:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current...
6
by: friend.05 | last post by:
I am able to compile the program, but while building it I am getting following error,can any explain when does this error mean. Command Lines Creating temporary file...
4
by: Ignacio Machin \( .NET/ C# MVP \) | last post by:
I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363): 'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected" on the following code: private void...
2
by: sesling | last post by:
Our Database stores event messages in a table called eventnotifications. The table has a message type column. There are two types of messages (alert or info). I have created a form that includes a...
1
by: bhavanirayala | last post by:
Hi, I am sending the values from one method to another method to get the values from xml file based on the inputs. I am getting the error like:: Variable "$collType" will not stay shared...
3
by: kbcompany | last post by:
Hi I have just started learning oracle. i have created a table with name imp_master and columns item_code with constraint not null, item_name with constraint n1 not null(n1 is user...
1
by: Omendra | last post by:
I am getting an error When i am going to convert my SP as dynamic Error : Msg 403, Level 16, State 1, Line 21 Invalid operator for data type. Operator equals add, type equals text. Code : ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.