problem with multi-threaded proc program

From: <eapen_at_hotmail.com>
Date: Mon, 07 Sep 1998 06:12:53 GMT
Message-ID: <6svth5$sd1$1_at_nnrp1.dejanews.com>



hi,

  Could anyone give some suggestions to the following problem:

  Environnment: Oracle 7.3.4
  OS : Solaris 2.5.1
  Pro*C ver :2.2.4

  I have written a multi-threaded Pro*C program having 2   threads and I have used the following options as specified   in the Pro*C manual

  1. pre compiled with threads=Y option
  2. In the program specified that the thread option should be used by giving EXEC SQL ENABLE THREADS;
  3. allocated the contexts using EXEC SQL CONTEXT ALLOCATE :ctx1; EXEC SQL CONTEXT ALLOCATE :ctx2;
  4. In each of the thread specified th context using EXEC SQL CONTEXT USE :ctx1; In each of threads I am opening a cursor and fetching data from a table.

  The program works fine sometimes. But once in a while (say   once in 10 execution) it gives the following error:

        12699 "TNS:native service internal error"

  Note:- I have observed that if a mutex lock is introduced to serialize   the threads then it is working fine. But our requirement is to   parallely execute the threads.
  Thanks a lot for your help
  Bye

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Mon Sep 07 1998 - 08:12:53 CEST

Original text of this message