paone@aramis.rutgers.edu (Phil Paone) (02/06/90)
Here is a breif description of the problem. We are using the embedded SQL with ingres 6.2. THe problem is thatthe table is being locked while a query is open. Is there anyway o keep the query open while preventing the table from being locked? Thanks, help is greatly appreciated. Phil -- Phil Paone attmail!ppaone !rutgers.edu!aramis.edu!ppaone paone@aramis.rutgers.edu "Dinna ya know a jailbreak when ya see it?"
jaffe@elbereth.rutgers.edu (Saul) (02/07/90)
In article <Feb.6.00.09.10.1990.14956@aramis.rutgers.edu> paone@aramis.rutgers.edu (Phil Paone) writes: > Here is a breif description of the problem. We are using the embedded > SQL with ingres 6.2. THe problem is thatthe table is being locked > while a query is open. Is there anyway o keep the query open while > preventing the table from being locked? > > Thanks, help is greatly appreciated. First, there are some known problems with the ingres locking 6.2. However, you have several choices. The first is to get the person who installed ingres on your system to change the locking mechanism in the startup parameters. I believe the relevant thing to do is to run iistartup -i and increase the number of locks in the system, the number of locks per database and the number of locks per transaction. This will essentially have the desired effect of giving you "record level locking" instead of "table level locking". Locking at the record level is the default, however, certain things can cause the locking to escalate to the table level. Running out of locks in the system is one of those things. The other possibility is to use the "set" commands to prevent the locking from escalating. You can check your embedded SQL manual for details of the exact command but the interactive SQL is: set lockmode session on {table} where level = page, maxlocks = {n} where n should be some number >10. 10 is the default. If the system reaches that many locks for that session, it will automatically escalate locking to the table level. The limit however is whatever is set by the system when ingres is started. If the site administrator set the limit per session to 10, you can't make it higher and you have to go back to the first solution (i.e. get things changed at the system level). Hope this helps! -- Saul Jaffe Rutgers University ARPA: Jaffe@elbereth.rutgers.edu UUCP: ...!rutgers!elbereth.rutgers.edu!jaffe