Oracle error (small) utility
From: <rcivan_at_urc.tue.nl>
Date: 13 Apr 93 23:01:33 MET
Message-ID: <1993Apr13.230133.1_at_urc.tue.nl>
Ivan Saez Scheihing , Eindhoven University of Technology Computing Centre 1.62, +31 40 474428
P.O.Box 513, 5600 MB Eindhoven, The Netherlands E-Mail: rcivan_at_urc.tue.nl
#include <stdlib.h>
Date: 13 Apr 93 23:01:33 MET
Message-ID: <1993Apr13.230133.1_at_urc.tue.nl>
Hello,
With this small utility you can ask the meaning an Oracle error. For example ERROR 57 will produce ORA-00057: maximum number of DDL locks execeeded.
How to make it :
for VMS : $ cc error $ lnproc error error $ error :== $your_disk:[your_dir]error for DOS : qcl /AL /c error (Microsoft Quick C) link error,,,sqllib ora6dos/st:12000 Greetings, Ivan
Ivan Saez Scheihing , Eindhoven University of Technology Computing Centre 1.62, +31 40 474428
P.O.Box 513, 5600 MB Eindhoven, The Netherlands E-Mail: rcivan_at_urc.tue.nl
------------------------------begin of error.c ---------------------------------#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
struct csrdef
{
short csrrc; /* return code */ short csrft; /* function type */ unsigned long csrrpc; /* rows processed count */ short csrpeo; /* parse error offset */ unsigned char csrfc; /* function code */ unsigned char csrfil; /* filler */ unsigned short csrarc; /* reserved, private */ unsigned char csrwrn; /* warning flags */ unsigned char csrflg; /* error flags */ /* *** Operating system dependent *** */ unsigned int csrcn; /* cursor number */ struct { /* rowid structure */ struct { unsigned long tidtrba; /* rba of first blockof table */ unsigned short tidpid; /* partition id of table */ unsigned char tidtbl; /* table id of table */ } ridtid; unsigned long ridbrba; /* rba of datablock */ unsigned short ridsqn; /* sequence number of row in block */ } csrrid; unsigned int csrose; /* os dependent error code */ unsigned char csrchk; /* check byte */ unsigned char crsfill[30]; /* private, reserved fill */};
int main(int argc,char *argv[])
{
struct csrdef lda; /* lda area */ struct csrdef curs[2]; /* and two cursors */
#define LDA &lda
if ( argc != 2 ) {
printf("Usage : error <int>\n"); exit(0);
}
*LDA.csrrc=(int)atoi(argv[1]);
errlda(LDA,"test");
}
errlda(lda,msg)
struct csrdef *lda; /* pointer to the LDA */ char msg[]; /* user specified message */{
char oertxt[80];
oermsg(lda->csrrc, oertxt);
printf("%s\n",oertxt);
}
----------------------------------- end of code --------------------------Received on Wed Apr 14 1993 - 00:01:33 CEST