HDTenEightyP/NetNews huggingface dataset:
From: ricky@citr.uq.oz.au (Ricky Leung)
Subject: Re: SQL Errorcodes
Organization: Prentice Centre, University of Queensland
Date: Tue, 13 Oct 1992 04:36:01 GMT

lindsay@giaeb.cc.monash.edu.au (lindsay smith) writes:


>My organisation has recently switched over to using INGRES as a teaching
>platform for our DataBase units. Recently a student while running an ESQL
>program written in C received an SQLCODE error of -40204. The inquire_sql call
>apparently returned a blank message. I have two questions which someone might
>be able to help me with

>a. what is this particular error triggered by?, and

>b. is there anywhere in the INGRES documentation where these codes are listed?
>I have already done a fairly extensive search - but to no avail.

There are two places that you can look at:

(1) with Ingres 6.4, file ~ingres/files/generr.h.  Here are the 
relevant lines:

#define GE_DATA_EXCEPTION  40200   /* Data Exception, with subcode.
                                       The subcode is identified by
                                       SQLCODE - GE_DATA_EXCEPTION */

/* The following codes are a combination of the above error with the        */
/* subcodes added in (see generic error subcodes later in this file)        */
#define E_GE9D08_DATAEX_NOSUB           40200
#define E_GE9D09_DATAEX_TRUNC           40201
#define E_GE9D0A_DATAEX_NEED_IND        40202
#define E_GE9D0B_DATAEX_NUMOVR          40203
#define E_GE9D0C_DATAEX_ASSGN           40204   <------
#define E_GE9D0D_DATAEX_FETCH0          40205

...

/* Generic error subcodes */

#define GESC_NO_SC     00     /* No subcode */
#define GESC_TRUNC     01     /* Character data, right truncation */
#define GESC_NEED_IND  02     /* Null value, no indicator parameter */
#define GESC_NUMOVR    03     /* Exact numeric data, loss of significance
                              **  (decimal overflow) */
#define GESC_ASSGN     04     /* Error in assignment */   <-----


(2) Appendix F of Ingres/SQL Reference Manual (page F-5).

In addition, Ingres also produces an Ingres Error Message Dictionary.  
(I have Release 6 published in Feb. 1989).

--
Ricky Leung				    
Centre for Information Technology Research   Phone: +61 7 365-4321
The University of Queensland		     Fax:   +61 7 365-4399
Queensland  4072, Australia		     Email: ricky@citr.uq.oz.au
Newsgroups: comp.databases.ingres
From: sethg@dcatlas.dot.gov (Seth Grimes)
Subject: Re: selecting a few rows from huge table
Organization: U.S Dept. of Transportation
Date: Mon, 12 Oct 1992 14:46:23 GMT


I assume you didn't want to just create a regular index on your 900k row
table because 1) your index would still be 18k pages (assuming a 100% fill-
factor and 40 bytes in your index records) and 2) it sounds like your data
are modified fairly often with additions and deletions, causing extra work
to maintain and rebuild the index.  Hence, your subsample index, which 
sounds like a reasonable approach.

Have you considered horizontally partitioning your table?  You could break
it up, say, into 26 tables, one for each letter of the alphabet.  (Note
that this is just a "for instance"; I realize the names wouldn't be 
uniformly distributed.)  Build the choice of table into your application --
it wouldn't be a big deal.  You could increase performance this way with 
only slightly more complexity.

Seth Grimes, dcatlas!sethg@uunet.uu.net
Newsgroups: comp.databases.ingres
From: cathys@Ingres.COM (Cathy Savino)
Subject: Re: Access to iidbdb
Reply-To: cathys@ingres.com (Cathy Savino)
Organization: Ingres, An ASK Company
Date: 7 Oct 92 16:09:21 GMT

A 'help' will not show you the tables, but a help table tablename will show you the
structure of the table, and a select * from tablename will select the contents. 
You have to know the tablenames to look at these tables through the Terminal 
Monitor. The tool you should use to access this information is accessdb.
All of the system catalogs that appear in any database are in this database 
also (they are documented in an appendix of the SQL Reference Manual). There
are some other tables that are not documented, beacuse modifying them
through the TM would be VERY DANGEROUS. Accessdb should give you most of the 
information you need. The iidbdb also contains information about groups,
roles and extended privileges (Mostly Knowledge Management Extension stuff).




In article <9210062149.AA04493@bear.cis.ohio-state.edu>, doug@news.cis.ohio-state.edu (Doug Kerr) writes:
|> We have just started using Ingres on DECstations.  The documentation
|> says that all information about the databases is stored in the iidbdb
|> database, which is owned by the user $ingres.  However I am unable to
|> access any of those tables even with ingres user privileges.  I can
|> access the database, but am told it contains no tables.
|> 
|>  Douglas S. Kerr, Department of Computer and Information Science
|>  The Ohio State University; 2036 Neil Ave. Columbus OH USA 43210-1277
|>  doug@cis.ohio-state.edu    

Opinions: Mine, Mine, Mine!!!                614/292-1519

--
Cathy Savino 
   ___     _____   __  __       Ingres, An ASK Company
  / _ \   / ____\  | |/ /       1080 Marina Village Parkway
 / /_\ \  \____ \  | |\ \       Alameda, Ca 94501
/_/   \_\ \_____/  |_| \_\      (510) 748-3524
                                cathys@ingres.com
From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
Newsgroups: comp.databases.ingres
Subject: Re: Time limit for SQL statement
Date: 12 Oct 92 22:38:01 GMT

In article <1992Oct12.080033.3302@visionware.co.uk>, chris@visionware.co.uk 
(Chris Davies) writes:
> I'm looking for a way to specify an upper limit on the time taken for
> an SQL statement to execute (using embedded C/SQL on various Unix
> systems, Ingres 6.4).
> 
> Perhaps I've missed a little option somewhere in Ingres, but here's my
> suggestion.  Does anyone know the implications of using an alarm signal
> in this way to interrupt an SQL statement?
> ...
> Would this break the application's back-end link or something else
> equally nasty?  Any suggestions and comments would be appreciated, please!

I think you're on the right trail, using an alarm signal in the front
end.  No, I don't think it would break the front-end/back-end link, but
there's a chance that it might.  The problem is that the server would go
on doing what you asked it to, even though the front end got interrupted
by the signal.  You didn't interrupt the back end, too.  My guess is
that the back end wouldn't listen to any new queries until it finished
the previous one.

What you need is for the alarm handler to execute the same code that
Ingres put in the SQL terminal monitors: if you interrupt a query (with
^C in VMS), then the front end gets interrupted and somehow sends a
message to the back end to stop doing what it's doing (for your
session).  You could try asking Ingres how they do this.

INGRES works by passing messages back and forth between the front end
and back end over the communication channels that get established at the
time you connect to a database.  If you do this in VMS:

	$ define ii_embed_set "printgca"

then you get a file called "iiprtgca.log" that shows this communication. 
This should work in INGRES release 6.3 and above (maybe earlier too). 
Each message has a GCA message type.  Here are a bunch of examples,
extracted from such a log file:

	GCA_ACCEPT
	GCA_ATTENTION
	GCA_COMMIT
	GCA_DONE
	GCA_IACK
	GCA_MD_ASSOC
	GCA_QUERY
	GCA_RELEASE
	GCA_RESPONSE
	GCA_TDESCR
	GCA_TUPLES

The GCA_ATTENTION message is what the front end sent to the back end
when I hit ^C.  All you have to do is figure out how to get a front end
to send it.

--Mark Jaeger				internet: cs_mj@gsbvax.uchicago.edu
Graduate School of Business		yellnet:  (312) 702-0328
University of Chicago			faxnet:   (312) 702-0233
Disclaimer: My opinions are my own and not those of my employer.
Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
Newsgroups: comp.databases.ingres
From: lung@venice.sedd.trw.com (Diane Lung)
Subject: Windows4GL v2.0
Organization: TRW Systems Engineering & Development Division, Carson, CA
Date: Mon, 12 Oct 1992 23:19:45 GMT


Thanks to those who posted notices on availability of Windows4GL 2.0. Just
upgraded our Sun and have only one word...AWESOME! The debugger was well
worth the wait! Good job Ingres!

In the Release Notes Ingres was also nice enough to include a
list of known bugs which have/haven't been resolved - now I can stop
banging my head against the wall when IsReverse doesn't work properly on
tablefield cells when scrolling my tablefield!



**********************************************************
Internet:    howie%ranger@venice.sedd.trw.com
Prodigy :    DBKX34A

All opinions are my own and not my employer's.
**********************************************************
-- 
lung@venice.SEDD.TRW.COM
Newsgroups: comp.databases.ingres
From: jaa@world.std.com (Jerry A Abramson)
Subject: Help with Locking and timeout's (Ingres 6.2 on SCO ODT 1.1)
Keywords: timeout lock lock_log sco
Organization: The World @ Software Tool & Die
Date: Thu, 15 Oct 1992 20:38:24 GMT


I am having some problems with a process live-locking, (i.e. hanging) when
trying to gain an IX then an Xlusive lock during DB reads.  I have used
the LOCKMODE command and set timeout = 10, but I only timeout after the
other concurrent session finished its current transaction.

Platform: Ingres 6.2/03p
O.S:	  Open Desktop 1.1 with Update G and ODT-DATA combined fixes 2



							Jerry Abramson
							jaa@world.std.com
							1 (508) 250-7957
Newsgroups: comp.databases.ingres
From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
Subject: Re: Time limit for SQL statement
Organization: 
Date: Mon, 12 Oct 1992 22:50:12 GMT

In article <1992Oct12.080033.3302@visionware.co.uk>, chris@visionware.co.uk 
(Chris Davies) writes:
> I'm looking for a way to specify an upper limit on the time taken for
> an SQL statement to execute (using embedded C/SQL on various Unix
> systems, Ingres 6.4).
> 
> Perhaps I've missed a little option somewhere in Ingres, but here's my
> suggestion.  Does anyone know the implications of using an alarm signal
> in this way to interrupt an SQL statement?
> ...
> Would this break the application's back-end link or something else
> equally nasty?  Any suggestions and comments would be appreciated, please!

There's another totally different approach which doesn't give you quite
the same thing as you've asked for, but it may help.

Buy the INGRES Knowledge Manager package and use extended grants or the
"set maxrow" and "set maxio" statements.  These give you the ability to
set limits for the max amount of work the server thinks it will have to
do on any one query.  After server finishes developing a QEP for a query
but before it begins execution, it compares the row and i/o estimates it
developed to the limits you set.  If an estimates exceeds a limit, then
the server aborts the query and returns an error to the front end.

INGRES does not as yet offer a way to set limits on the time the server
will take to execute a query, although there's clearly some relationship
there.

--Mark Jaeger				internet: cs_mj@gsbvax.uchicago.edu
Graduate School of Business		yellnet:  (312) 702-0328
University of Chicago			faxnet:   (312) 702-0233
Disclaimer: My opinions are my own and not those of my employer.
Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.

Newsgroups: comp.databases.ingres
From: matsinen@jyu.fi (Timo Matsinen)
Subject: UNLOADTABLE and cursor positioning
Organization: University of Jyvaskyla, Finland
Date: Thu, 15 Oct 1992 07:57:01 GMT

Hi, Ingres-experts!

Is there anybody who could help me to solve this OSL problem concerning
UNLOADTABLE and cursor positioning.

1. I'm using Ingres version 6.3 in SUN 4 workstation.

2. I've a form with a table field and numbers of simple fields;

3. A user should fill data into fields which means that the cursor normaly
   remains in a simple filed;

4. When a user is ready he/she presses a function key to start saving data into
   the database. When the OSL program starts unloading the table field the user
   gets message: 

       Cursor must be on a specified row of table field ...

5. Is there any way in run-time to move the cursor into the table field
   (resume-statement doesn't satisfy because it stops the program) or handle
   the table field without the cursor sitting in it?

I'll be very happy of any help!

Timo
----


-- 
Timo Matsinen    Computing Centre of Jyvaskyla University    Jyvaskyla, Finland

E-mail: matsinen@jyu.fi        phone: +358-41-603593        fax: +358-41-603611
===============================================================================
From: devine@olympus.CS.Berkeley.EDU (bob devine)
Newsgroups: comp.databases.ingres
Subject: Re: Ingres on VMS with disk defragmenter
Date: 7 Oct 1992 19:59:09 GMT
Organization: University of California, Berkeley
NNTP-Posting-Host: olympus.cs.berkeley.edu
X-Newsreader: Tin 1.1 PL3

acs_mn@rivers.acc.uwrf.edu writes:
:     I remember a long time ago there was a warning not to allow a disk
: defragmenter to touch Ingres databases since the files weren't opened using
: normal RMS means and the defragmenter might move an open file causing big
: problems.
: 
:     Has this ever been fixed or it is still recommended to exclude database
: from disk defragmentation?
: 
:     We are using INGRES VAX Version 6.4/01 (vax.vms/01) running on VAX/VMS
: 5.5-1. The disk defragmenter is Dec's File Optimizer.

Since the VMS defragger uses the new "move file" primitive, I suspect
that the DEC FO is safe for Ingres files.  Other defraggers had to
rely upon copying the files to new contiguous space, ignoring any
open or special files.  The "move file" knows more about files than
does an application level program.

Bob Devine
From: salnick@dejavu.spk.wa.us (There is no substitute for displacement...)
Newsgroups: comp.databases.ingres
Subject: Re: Ingres & network traffic
Date: 7 Oct 92 12:55:24 GMT
Organization: Not Organized

In article <01GPMSUA8XKYCXQJLY@MATH.AMS.ORG> ozminski%xerxes.decnet@clvax1.cl.msu.edu (XERXES: :OZMINSKI) writes:
>I am running Ingres 6.4 on a Sun Sparcstation with SunOS 4.1.1.
>
>I created an ESQL/C procedure that opens a local database once and
>then reads a single table, converts the data in chunks of 11 rows
>(average) to another display format and then writes (inserts) the new
>format to a second table.  A commit is done after each batch of 11.
>
>The first table has 3 million rows and the second table ends up with
>about 800,000.  
>
>While the program is running the network traffic increases
>dramatically, and when it stops the network traffic is reduced.
>
>I'm not all that familiar with Unix, but an increase in network
>traffic while accessing a local database seems odd to me.  Can someone
>explain why Ingres would produce this network traffic.
>
>Notes: The utility monitoring the network traffic was the standard
>console utility.  The disks being accessed by Ingres and the ESQL/C
>program were all local disks.

... and I assume the database was not only local, but NAMED locally (eg. 
dbname, not localnode:dbname) right?

bob

--
RW Salnick, Spokane,WA  |  Home: salnick@dejavu.spk.wa.us
  Amiga 1000, WB 1.3    |  Work: mfgsys!salnick@kaiser.spk.wa.us
      WA9BVE            |
Newsgroups: comp.databases.ingres
From: cathys@Ingres.COM (Cathy Savino)
Subject: Re: SQL Errorcodes
Reply-To: cathys@ingres.com (Cathy Savino)
Organization: Ingres, An ASK Company
Date: 14 Oct 92 19:00:25 GMT

In article <ricky.718950961@citr.uq.oz.au>, ricky@citr.uq.oz.au (Ricky Leung) writes:
|> lindsay@giaeb.cc.monash.edu.au (lindsay smith) writes:

  [ Stuff Deleted ...]


|> 
|> In addition, Ingres also produces an Ingres Error Message Dictionary.  
|> (I have Release 6 published in Feb. 1989).
|> 
|> --
|> Ricky Leung				    
|> Centre for Information Technology Research   Phone: +61 7 365-4321
|> The University of Queensland		     Fax:   +61 7 365-4399
|> Queensland  4072, Australia		     Email: ricky@citr.uq.oz.au

Ingred no longer produces this document, the last printing was in '89, and it is 
out of date. There is an online utility that is much easier to use. It is in
(Unix version) $II_SYSTEM/ingres/sig/errhelp. There is documentation in this 
directory to explain how to use it, also some information about how ingres
error messages are built.

Opinions: Mine, Mine, Mine!
--
Cathy Savino 
   ___     _____   __  __       Ingres, An ASK Company
  / _ \   / ____\  | |/ /       1080 Marina Village Parkway
 / /_\ \  \____ \  | |\ \       Alameda, Ca 94501
/_/   \_\ \_____/  |_| \_\      (510) 748-3524
                                cathys@ingres.com
From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
Newsgroups: comp.databases.ingres
Subject: Re: Help abf
Date: 14 Oct 92 22:47:02 GMT
Article-I.D.: gsbacd.1992Oct14.164702.1

In article <1992Oct14.104448.28191@dcs.qmw.ac.uk>, amandla@dcs.qmw.ac.uk 
(Jackie Saul) writes:
> 1. I have an abf application and have built an executable image. I only want 
> my users to be able to access the database through the application and not to 
> be able to change things in tables from other routes of access. Is there any 
> way that I can set the access to the database to be only through the 
> application?

If you are the system manager, then you could set the protections on the
INGRES programs (qbf, sql, isql, etc.) so that no one could execute
them.  However, you would have to identify a lot of files in the
ingres/bin and ingres/utility directories, and reset the protections
every time you install an upgrade, since the build script sets the file
protections.

The only way to do this within INGRES is to buy the Knowledge Manager
and use roles.  You create a role with a password that only you know;
you set all your tables in the target database so that only the role may
access them ("grant select on table my_table to role my_role"); and you
apply the role to the ABF image and enter the password at the time you
do an imageapp.  When you install the ABF program, make sure your users
have execute-only access.  Otherwise, they can run the "strings" program
over it ("dump" in VMS) and learn the password, which is stored in the
executable in unencrypted form.

> 2. I am using Ingres 6.3 on a Unix platform - is there a way of turning off 
> Control C (interrupt) within the abf application then resetting it once they 
> have exited? otherwise I can see problems with uncommitted transactions.
> Any help would be appreciated

I think ABF does its own ^C handling.  Don't sweat this, because this is
why you paid mucho dinero for INGRES.  If anyone interrupts the
application, the INGRES dbms server is supposed to recognize that the
front end has gone away, and roll back any uncommitted transactions.

--Mark Jaeger				internet: cs_mj@gsbvax.uchicago.edu
Graduate School of Business		yellnet:  (312) 702-0328
University of Chicago			faxnet:   (312) 702-0233
Disclaimer: My opinions are my own and not those of my employer.
Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
Newsgroups: comp.databases.ingres
From: mdchaney@fractal.ucs.indiana.edu (M Darrin Chaney)
Subject: Re: Ingres on VMS with disk defragmenter
Organization: Indiana University, Bloomington
Date: Thu, 8 Oct 1992 15:08:59 GMT

In article <1992Oct7.080029.81@rivers> acs_mn@rivers.acc.uwrf.edu writes:
>    I remember a long time ago there was a warning not to allow a disk
>defragmenter to touch Ingres databases since the files weren't opened using
>normal RMS means and the defragmenter might move an open file causing big
>problems.

RMS isn't a file system.  It's a record manager built on top of a file
system.  Why would Ingres need a record manager to slow things down?

So, why am I saying this?  You don't need RMS to open and work with files.
You don't ask RMS what files are open.  You ask the file system.  If a
file is open (other than physical access!) it will know.

>    Has this ever been fixed or it is still recommended to exclude database
>from disk defragmentation?

I wouldn't worry about it.  DFO uses the new "move file" primitive.  The
file system knows if the file is open, etc.  That's kind of basic, and I'd
bet most defragmenters (if not all) would have no problems.

>    We are using INGRES VAX Version 6.4/01 (vax.vms/01) running on VAX/VMS
>5.5-1. The disk defragmenter is Dec's File Optimizer.

	Darrin
-- 

mdchaney@iubacs mdchaney@bronze.ucs.indiana.edu mdchaney@rose.ucs.indiana.edu

"I want- I need- to live, to see it all..."
Newsgroups: comp.databases.ingres
From: brendle@ise.fhg.de (Axel Brendle)
Subject: Re: Windows4GL 2.0
Organization: FhG-ISE - Institute for Solar Energy Systems
Distribution: usa
Date: Thu, 8 Oct 92 10:22:18 GMT

dhubb@sierras.com (David Hubbell) writes:

>Ingres has announced Windows4GL Version 2.0.  Does anybody know what the
>expected _ship_ date is?

About two weeks ago we had here in germany a meeting of the ingres users,
where INGRES (ASK) presented and demonstrated  Windows4GL Version 2.0.
We were told Windows4GL Version 2.0 would be available and shipped now
(We could take it home if they would have the possiblity here to write 
the tapes). Since I am not using Windows4GL right now I have no possiblity 
to proof this.

I hope this helps.

P.s: Highlight of Windows4GL Version 2.0 seems to be the debugger.
Newsgroups: comp.databases.ingres
From: thomasl@mtl.mit.edu (Thomas J Lohman)
Subject: Adding Ingres users
Organization: MIT Microsystems Technology Laboratories
Date: Thu, 15 Oct 1992 02:47:40 GMT

I had a few replies to my posting about adding new Ingres users through
a C program.  I have written such a program, and it is fairly straightforward.
The only major hurdle is that it needs to be run as ingres, or if you do 
what I did, just have ingres own the executable and then setuid to owner.
This allows me to give group execute permissions, and have the group
(something like ingstaff) be able to add, delete, or modify user entries.
This was all done under 6.4/01 running on top of SunOS 4.1.1

If anyone is interested in the specifics then feel free to e-mail me.


--tom

Newsgroups: comp.databases.ingres