Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sqlcode -901 sqlstate 58004

4,215 views
Skip to first unread message

Troy Paulson

unread,
May 30, 2000, 3:00:00 AM5/30/00
to
I'm getting the following error when I do my fetch:

sqlcode -901 sqlstate 58004
Explanation: SQL system error

Any ideas what could be causing this extremely vague error message?

--
Troy Paulson
tpau...@nsc-inc.com


do...@ca.ibm.com

unread,
May 30, 2000, 3:00:00 AM5/30/00
to
SQLCODE -901 is in internal error and should never occur.. You'll want
to contact DB2 Service with as much information about what you were
doing when the error occurred as possible.
--
___________________________________________________________________________
Doug Doole
DB2 Universal Database Development
IBM Toronto Labs

truu...@ca.ibm.com

unread,
May 30, 2000, 3:00:00 AM5/30/00
to
That's the "something happened that's so severe that you should call db2
service" error. Contact db2 service armed with the db2diag.log and all
other files in that same directory along with a detailed description of
your configuration and the scenario that resulted in this error.

--

Kaarel Truuvert
DB2 UDB Development

Troy Paulson

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Where do I find the db2diag.log or equivalent on the AS/400?
How do I get in touch with db2 service or should I contact IBM?

<truu...@ca.ibm.com> wrote in message news:3934247B...@ca.ibm.com...

truu...@ca.ibm.com

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Whoops! My mistake - I automatically assumed you were using DB2 UDB. The
db2diag.log is specific to UDB. Contact IBM as you would with other
problems - whoever you contact should be able to route your problem
appropriately. (I'm afraid I don't know the specifics about what
diagnostic info to collect on the AS/4000).

Sorry about the confusion...

Karl Hanson

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Troy Paulson wrote:
>
> Where do I find the db2diag.log or equivalent on the AS/400?
> How do I get in touch with db2 service or should I contact IBM?
>

Troy,
As advised by others, contacting your IBM service provider is likely
your best option. On AS/400 more detailed messages describing the
problem are normally found in the job log. If you know which job
incurred the error, view the detailed messages in the job log. For
example if it occurs in a program you can call interactively, or via SQL
statements you can enter interactively from within STRSQL, you could do
this to view the messages in your current (interactive) job:
===> WRKJOB OPTION(*JOBLOG)
... then use F10 to display detailed messages. When you see a message
that may be related - eg prior to the SQL0901 "SQL system error" message
- position the cursor over it and use F1 for more info.

Otherwise if the error occurs in a batch or "server" job, find the job
while still active using (for example) the WRKACTJOB command, then
option 5, then option 10 (Display job log). Or if the batch/server job
ends, find the QPJOBLOG spooled file for the job, if one was produced.
Depending on environment, finding the QPJOBLOG file may require
different commands... try WRKSPLF or WRKOUTQ QEZJOBLOG for starters.

Another tip if you can recreate interactively - turn on program debug
first using this command: STRDBG UPDPROD(*YES). This will cause DB2 to
insert additional info messages in the job log that can sometimes aid in
problem determination.

--

Karl Hanson

Troy Paulson

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
This is a batch job, but doesn't stay active long enough to get the job
info. The pgm does create a spool file, but the job info, relates to my
session. All attempts to view a job log for this job haven't worked. I
don't think it even creates a job log. The program itself doesn't end with
the sql error, it finishes to completion. The way I found the sql error was
through the interactive debugger, then doing a watch on SQLCOD variable
(Using RPG/LE).

Karl Hanson <kcha...@us.ibm.com> wrote in message
news:393522EC...@us.ibm.com...

Karl Hanson

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Troy Paulson wrote:
>
> This is a batch job, but doesn't stay active long enough to get the job
> info. The pgm does create a spool file, but the job info, relates to my
> session. All attempts to view a job log for this job haven't worked. I
> don't think it even creates a job log. The program itself doesn't end with
> the sql error, it finishes to completion. The way I found the sql error was
> through the interactive debugger, then doing a watch on SQLCOD variable
> (Using RPG/LE).
>
> Karl Hanson <kcha...@us.ibm.com> wrote in message
> news:393522EC...@us.ibm.com...
> > Troy Paulson wrote:
> > >
> > > Where do I find the db2diag.log or equivalent on the AS/400?
> > > How do I get in touch with db2 service or should I contact IBM?
> > >
> >
> > Troy,
> > As advised by others, contacting your IBM service provider is likely
> > your best option. On AS/400 more detailed messages describing the
<snip>
> >
> > --
> >
> > Karl Hanson

If you can stop using the debugger at the point of failure, see if you
can view the job log there. You can sign on to another session and use
WRKACTJOB, or use SysReq option 3 (Display current job).

It's possible your program is operating in "SQL Server Mode". In that
case info at this FAQ web page may help:
http://www.as400.ibm.com/db2/clifaq.htm
If this is the case, SQL requests are processed in separate server
(prestart) jobs, and the message SQL7908 can be used to find that job.

Good luck!

--

Karl Hanson

Troy Paulson

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Thanks for your help. I got a job log.

Message ID . . . . . . : MCH5003 Severity . . . . . . . : 40
Message type . . . . . : Escape
Date sent . . . . . . : 05/31/00 Time sent . . . . . . : 13:44:57

Message . . . . : Scalar operand contains a value that is not valid.
Cause . . . . . : The length of the invalid scalar operand is 7. The bit
offset to the invalid field is X'0001'. The operand number is 2. The
invalid data is X'03080000000000'.

I'll probably have to contact IBM to get this resolved.

Karl Hanson <kcha...@us.ibm.com> wrote in message

news:3935409D...@us.ibm.com...

0 new messages