MS SQL Server blocked.

Joe Boyle joeboyle_adt@hotmail.com
Wed, 21 Apr 2004 11:40:32 +0100


<html><div style='background-color:'><DIV class=RTE>
<P>I looked up my notes on this topic and found that the problem is due to the fact that the lookup is done in the process phase which uses the update TX as Peter mentions below. </P>
<P>There are three other mainstream solutions, you can either,</P>
<P>1.&nbsp;try syntax ' transaction model optimistic' on the screen statement, </P>
<P>2. add syntax&nbsp;'transaction query for query process' to the file statement</P>
<P>3. create a read only designer TX ( myrotx ) and associate this with the file 'transaction&nbsp;myrotx for query process'.&nbsp; I think that the update phase will default to using the update&nbsp;TX&nbsp;when you&nbsp;write to the file using the last option.</P>
<P>In case anyone is wondering where I got alll of this great info,&nbsp; I found it in the notes I made from the two Relational Interface manuals which accompany the Cognos courses on this subject - I made notes of anything interesting.&nbsp; The problem is that I managed to throw the manuals away ( I kept them in a bin liner in the boot of my car&nbsp;for easy access&nbsp;- doh!).&nbsp; If anyone could supply me with copies, I would be more than happy to pay for them.<BR><BR>regards Joe</P></DIV>
<DIV></DIV>&gt;From: "Peter Bateman" &lt;shediac92@hotmail.com&gt; 
<DIV></DIV>&gt;To: powerh-l@sowder.com 
<DIV></DIV>&gt;Subject: MS SQL Server blocked. 
<DIV></DIV>&gt;Date: Tue, 20 Apr 2004 16:07:34 -0300 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Brian: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;&nbsp;&nbsp;An autocommit on the lookup statement should work. I think the 
<DIV></DIV>&gt;lookup is done 
<DIV></DIV>&gt;&nbsp;&nbsp;in the UPDATE transaction but I am not sure. DBAUDIT=FULL on the 
<DIV></DIV>&gt;run of QUICK 
<DIV></DIV>&gt;&nbsp;&nbsp;should tell you. You must have a unique key if your want to update 
<DIV></DIV>&gt;an MS SQL Server row. 
<DIV></DIV>&gt;&nbsp;&nbsp;This key can defined in MS SQL Server and I also believe it can be 
<DIV></DIV>&gt;stated on the FILE or 
<DIV></DIV>&gt;&nbsp;&nbsp;CURSOR associated with the table. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Regards, 
<DIV></DIV>&gt;Peter Bateman 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;&gt;From: "chuck.reinke" &lt;chuck.reinke@sbcglobal.net&gt; 
<DIV></DIV>&gt;&gt;To: "brian_matthewsbrian matthews" 
<DIV></DIV>&gt;&gt;&lt;brian_matthews_bmw@hotmail.com&gt;,&nbsp;&nbsp; &lt;powerh-l@lists.sowder.com&gt; 
<DIV></DIV>&gt;&gt;Subject: Re: problem with 'lookup on' and writing to a SQLserver 
<DIV></DIV>&gt;&gt;table 
<DIV></DIV>&gt;&gt;Date: Mon, 19 Apr 2004 21:07:02 -0700 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt;I'm a little surprised to hear about this problem, but I haven't 
<DIV></DIV>&gt;&gt;ever worked 
<DIV></DIV>&gt;&gt;with SQLserver. 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt;However, Lookups are done be default with a read/write transaction 
<DIV></DIV>&gt;&gt;just 
<DIV></DIV>&gt;&gt;after Input procedure time, and therefore I would think the 
<DIV></DIV>&gt;&gt;transaction 
<DIV></DIV>&gt;&gt;should be committed by Process procedure time. You may have some 
<DIV></DIV>&gt;&gt;non-default 
<DIV></DIV>&gt;&gt;stuff on your File statements. Or the File statement for the lookup 
<DIV></DIV>&gt;&gt;is the 
<DIV></DIV>&gt;&gt;same as the one you are trying to update in the Process procedure. 
<DIV></DIV>&gt;&gt;Reference 
<DIV></DIV>&gt;&gt;files are by default opened for read only, which could cause a 
<DIV></DIV>&gt;&gt;problem. I 
<DIV></DIV>&gt;&gt;the files are the same, try using an alias and some other file type 
<DIV></DIV>&gt;&gt;for your 
<DIV></DIV>&gt;&gt;update. 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt;Finally, if you think there may be some bug, try doing a commit at 
<DIV></DIV>&gt;&gt;the start 
<DIV></DIV>&gt;&gt;of your Process procedure. 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt;Chuck 
<DIV></DIV>&gt;&gt;----- Original Message ----- 
<DIV></DIV>&gt;&gt;From: "brian_matthewsbrian matthews" 
<DIV></DIV>&gt;&gt;&lt;brian_matthews_bmw@hotmail.com&gt; 
<DIV></DIV>&gt;&gt;To: &lt;powerh-l@lists.sowder.com&gt; 
<DIV></DIV>&gt;&gt;Sent: Tuesday, April 20, 2004 8:06 AM 
<DIV></DIV>&gt;&gt;Subject: problem with 'lookup on' and writing to a SQLserver table 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt; &gt; I have never used this list before so am not completely sure 
<DIV></DIV>&gt;&gt;what to 
<DIV></DIV>&gt;&gt;expect 
<DIV></DIV>&gt;&gt; &gt; so here goes : I am trying to write to a SQLserver table from a 
<DIV></DIV>&gt;&gt;field 
<DIV></DIV>&gt;&gt; &gt; process procedure but the row is blocked if a 'lookup on' is 
<DIV></DIV>&gt;&gt;also present 
<DIV></DIV>&gt;&gt;on 
<DIV></DIV>&gt;&gt; &gt; the field, can anyone explain this, or offer a wokaround ? 
<DIV></DIV>&gt;&gt; &gt; 
<DIV></DIV>&gt;&gt; &gt; P.S we are from RMS and trying out SQLserver 
<DIV></DIV>&gt;&gt; &gt; 
<DIV></DIV>&gt;&gt; &gt; 
<DIV></DIV>&gt;&gt;_________________________________________________________________ 
<DIV></DIV>&gt;&gt; &gt; Express yourself with cool new emoticons 
<DIV></DIV>&gt;&gt;http://www.msn.co.uk/specials/myemo 
<DIV></DIV>&gt;&gt; &gt; 
<DIV></DIV>&gt;&gt; &gt; = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
<DIV></DIV>&gt;&gt; &gt; Mailing list: powerh-l@lists.sowder.com 
<DIV></DIV>&gt;&gt; &gt; Subscribe: "subscribe" in message body to 
<DIV></DIV>&gt;&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;&gt; &gt; Unsubscribe: "unsubscribe &lt;password&gt;" in message body to 
<DIV></DIV>&gt;&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;&gt; &gt; http://lists.sowder.com/mailman/listinfo/powerh-l 
<DIV></DIV>&gt;&gt; &gt; This list is closed, thus to post to the list you must be a 
<DIV></DIV>&gt;&gt;subscriber. 
<DIV></DIV>&gt;&gt; 
<DIV></DIV>&gt;&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = = 
<DIV></DIV>&gt;&gt;Mailing list: powerh-l@lists.sowder.com 
<DIV></DIV>&gt;&gt;Subscribe: "subscribe" in message body to 
<DIV></DIV>&gt;&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;&gt;Unsubscribe: "unsubscribe &lt;password&gt;" in message body to 
<DIV></DIV>&gt;&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;&gt;http://lists.sowder.com/mailman/listinfo/powerh-l 
<DIV></DIV>&gt;&gt;This list is closed, thus to post to the list you must be a 
<DIV></DIV>&gt;&gt;subscriber. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_________________________________________________________________ 
<DIV></DIV>&gt;Add photos to your messages with MSN Premium. Get 2 months FREE*&nbsp;&nbsp; 
<DIV></DIV>&gt;http://join.msn.com/?pgmarket=en-ca&amp;page=byoa/prem&amp;xAPID=1994&amp;DI=1034&amp;SU=http://hotmail.com/enca&amp;HL=Market_MSNIS_Taglines 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = = 
<DIV></DIV>&gt;Mailing list: powerh-l@lists.sowder.com 
<DIV></DIV>&gt;Subscribe: "subscribe" in message body to 
<DIV></DIV>&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;Unsubscribe: "unsubscribe &lt;password&gt;" in message body to 
<DIV></DIV>&gt;powerh-l-request@lists.sowder.com 
<DIV></DIV>&gt;http://lists.sowder.com/mailman/listinfo/powerh-l 
<DIV></DIV>&gt;This list is closed, thus to post to the list you must be a 
<DIV></DIV>&gt;subscriber. 
<DIV></DIV></div><br clear=all><hr>Stay in touch better and keep protected online with MSN’s NEW all-in-one Premium Services. <a href="http://g.msn.com/8HMAENUK/2740??PS=">Find out more here.</a> </html>