Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 55811 invoked from network); 23 Feb 2007 17:51:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2007 17:51:33 -0000 Received: (qmail 52977 invoked by uid 500); 23 Feb 2007 17:51:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 52949 invoked by uid 500); 23 Feb 2007 17:51:41 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 52940 invoked by uid 99); 23 Feb 2007 17:51:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 09:51:41 -0800 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of msatoor@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 09:51:30 -0800 Received: by ug-out-1314.google.com with SMTP id l31so430827ugc for ; Fri, 23 Feb 2007 09:51:07 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CP/ArO5NB5jCo0MvW0/ogy++eEMYIeapgsDzvzfRUUGBeHLmwNQPyEVRw2h+QMNS5RAx7p3c8mVWUXdZNfw3sT9yBaSteMnn3kGswxMPfT9XjYYNwmlW++ar1NYCqjCoYMwqI5KffWW58UNVeW/FsYlx703PCs3VYbd1Ito+nT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=E1A7bXzMLu59HipoMt2tDBu343+OkmRoBD75uCt20fjjuB93iGMr/rmjcM7TU6H/UZP6sfNlZdyzTQbZbVsE61FK6Qla374IlhcpzD4yzM0AXxKLN4xLdaQaB41uDzXzX+2pwqgkMcF3+BUMYezHdLA6SHiCwbLkWGgDWrno4Cw= Received: by 10.78.170.17 with SMTP id s17mr202214hue.1172253066755; Fri, 23 Feb 2007 09:51:06 -0800 (PST) Received: by 10.78.175.4 with HTTP; Fri, 23 Feb 2007 09:51:06 -0800 (PST) Message-ID: Date: Fri, 23 Feb 2007 09:51:06 -0800 From: "Mamta Satoor" To: derby-dev@db.apache.org Subject: Re: Global Temp tables In-Reply-To: <45DF0B36.8080103@sun.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21283_20080942.1172253066725" References: <45DF0B36.8080103@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_21283_20080942.1172253066725 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Lance, I am sure you have already checked following but wanted to throw them out anyways 1)Is the temporary table getting referenced by the same connection that created it? 2)Does your particular scenario work under embedded Derby? Also, once the connection that created the global table closes, the global table cease to exist. I think it will be worth checking the script under embedded Derby to rule out Network Server as the culprit. Mamta On 2/23/07, Lance J. Andersen wrote: > > Does anyone have an idea as to why the gobal table cannot be found. > > Here is the trace output. > > Regards > lance > > [TopLink Fine]: > > ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DECLARE > GLOBAL TEMPORARY TABLE session.TL_CMP3_EMPLOYEE (EMP_ID INTEGER NOT > NULL, PAY_SCALE VARCHAR(255), ROOM_NUM INTEGER, F_NAME VARCHAR(255), > STATUS INTEGER, L_NAME VARCHAR(255), VERSION INTEGER, ADDR_ID INTEGER, > MANAGER_EMP_ID INTEGER, START_DATE DATE, END_DATE DATE, DEPT_ID INTEGER, > PRIMARY KEY (EMP_ID)) ON COMMIT DELETE ROWS NOT LOGGED > [TopLink Fine]: > > ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DECLARE > GLOBAL TEMPORARY TABLE session.TL_CMP3_SALARY (EMP_ID INTEGER NOT NULL, > SALARY INTEGER, PRIMARY KEY (EMP_ID)) ON COMMIT DELETE ROWS NOT LOGGED > [TopLink Fine]: > > ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--INSERT > INTO session.TL_CMP3_EMPLOYEE (EMP_ID, ROOM_NUM, VERSION) SELECT > t0.EMP_ID, t1.SALARY, (t0.VERSION + 1) FROM CMP3_EMPLOYEE t0, > CMP3_SALARY t1 WHERE ((t0.F_NAME = 'testUpdateUsingTempStorage') AND > (t1.EMP_ID = t0.EMP_ID)) > [TopLink Fine]: > > ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DELETE > FROM session.TL_CMP3_EMPLOYEE > [TopLink Fine]: > > ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DELETE > FROM session.TL_CMP3_SALARY > [TopLink Warning]: > UnitOfWork(31852201)--Thread(Thread[AWT-EventQueue-0,6,main])--Local > Exception Stack: > Exception [TOPLINK-4002] (Oracle ${_EssentialsProductName} - > ${_EssentialsProductVersion} (Build 070220Dev)): > oracle.toplink.essentials.exceptions.DatabaseException > Internal Exception: org.apache.derby.client.am.SqlException: Table > 'SESSION.TL_CMP3_EMPLOYEE' does not exist.Error Code: -1 > Call:INSERT INTO session.TL_CMP3_EMPLOYEE (EMP_ID, ROOM_NUM, VERSION) > SELECT t0.EMP_ID, t1.SALARY, (t0.VERSION + 1) FROM CMP3_EMPLOYEE t0, > CMP3_SALARY t1 WHERE ((t0.F_NAME = 'testUpdateUsingTempStorage') AND > (t1.EMP_ID = t0.EMP_ID)) > Query:UpdateAllQuery() > ------=_Part_21283_20080942.1172253066725 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Lance, I am sure you have already checked following but wanted to throw them out anyways
1)Is the temporary table getting referenced by the same connection that created it?
2)Does your particular scenario work under embedded Derby?
 
Also, once the connection that created the global table closes, the global table cease to exist.
 
I think it will be worth checking the script under embedded Derby to rule out Network Server as the culprit.
 
Mamta

 
On 2/23/07, Lance J. Andersen <Lance.Andersen@sun.com> wrote:
Does anyone have an idea as to why the gobal table cannot be found.

Here is the trace output.

Regards
lance

[TopLink Fine]:
ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DECLARE
GLOBAL TEMPORARY TABLE session.TL_CMP3_EMPLOYEE (EMP_ID INTEGER NOT
NULL, PAY_SCALE VARCHAR(255), ROOM_NUM INTEGER, F_NAME VARCHAR(255),
STATUS INTEGER, L_NAME VARCHAR(255), VERSION INTEGER, ADDR_ID INTEGER,
MANAGER_EMP_ID INTEGER, START_DATE DATE, END_DATE DATE, DEPT_ID INTEGER,
PRIMARY KEY (EMP_ID)) ON COMMIT DELETE ROWS NOT LOGGED
[TopLink Fine]:
ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DECLARE
GLOBAL TEMPORARY TABLE session.TL_CMP3_SALARY (EMP_ID INTEGER NOT NULL,
SALARY INTEGER, PRIMARY KEY (EMP_ID)) ON COMMIT DELETE ROWS NOT LOGGED
[TopLink Fine]:
ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--INSERT
INTO session.TL_CMP3_EMPLOYEE (EMP_ID, ROOM_NUM, VERSION) SELECT
t0.EMP_ID, t1.SALARY, (t0.VERSION + 1) FROM CMP3_EMPLOYEE t0,
CMP3_SALARY t1 WHERE ((t0.F_NAME = 'testUpdateUsingTempStorage') AND
(t1.EMP_ID = t0.EMP_ID))
[TopLink Fine]:
ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DELETE
FROM session.TL_CMP3_EMPLOYEE
[TopLink Fine]:
ClientSession(12549034)--Connection(16309502)--Thread(Thread[AWT-EventQueue-0,6,main])--DELETE
FROM session.TL_CMP3_SALARY
[TopLink Warning]:
UnitOfWork(31852201)--Thread(Thread[AWT-EventQueue-0,6,main])--Local
Exception Stack:
Exception [TOPLINK-4002] (Oracle ${_EssentialsProductName} -
${_EssentialsProductVersion} (Build 070220Dev)):
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.apache.derby.client.am.SqlException : Table
'SESSION.TL_CMP3_EMPLOYEE' does not exist.Error Code: -1
Call:INSERT INTO session.TL_CMP3_EMPLOYEE (EMP_ID, ROOM_NUM, VERSION)
SELECT t0.EMP_ID, t1.SALARY, (t0.VERSION + 1) FROM CMP3_EMPLOYEE t0,
CMP3_SALARY t1 WHERE ((t0.F_NAME = 'testUpdateUsingTempStorage') AND
(t1.EMP_ID = t0.EMP_ID))
Query:UpdateAllQuery()

------=_Part_21283_20080942.1172253066725--