Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 57091 invoked from network); 30 Oct 2009 13:38:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 13:38:10 -0000 Received: (qmail 80099 invoked by uid 500); 30 Oct 2009 13:38:09 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 80041 invoked by uid 500); 30 Oct 2009 13:38:09 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 80032 invoked by uid 99); 30 Oct 2009 13:38:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 13:38:09 +0000 X-ASF-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of francois.rappaz@unifr.ch designates 134.21.14.71 as permitted sender) Received: from [134.21.14.71] (HELO siufsrv105.unifr.ch) (134.21.14.71) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 13:38:06 +0000 Received: from sr-blw-201.unifr.ch ([134.21.40.64]) by siufsrv105.unifr.ch stage1 with esmtp with id 1N3rfl-0006Xr-Mq for from ; Fri, 30 Oct 2009 14:37:45 +0100 Received: from exchange2.unifr.ch ([134.21.40.42]) by sr-blw-201.unifr.ch ([134.21.40.64]) with mapi; Fri, 30 Oct 2009 14:37:45 +0100 From: RAPPAZ Francois To: 'Derby Discussion' Date: Fri, 30 Oct 2009 14:37:44 +0100 Subject: RE: data lost with ij Thread-Topic: data lost with ij Thread-Index: AcpZZTcF2IK7gtEuSsqemZmIiL3+KwAALDow Message-ID: References: <4AEAE5A2.8030007@sun.com> <4AEAEA60.5000806@sun.com> In-Reply-To: <4AEAEA60.5000806@sun.com> Accept-Language: fr-FR, fr-CH Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: fr-FR, fr-CH x-tm-as-product-ver: SMEX-8.0.0.4125-5.600.1016-16978.006 x-tm-as-result: No--44.466700-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 That was it: putting autocommit on; at the end of my first script correct t= he problem I copy the script from one of the example... My mistake, sorry. Fran=E7ois > -----Original Message----- > From: Richard.Hillegas@Sun.COM [mailto:Richard.Hillegas@Sun.COM] > Sent: vendredi, 30. octobre 2009 14:30 > To: Derby Discussion > Subject: Re: data lost with ij >=20 > Hi Fran=E7ois, >=20 > Your data will disappear on exit if you don't commit after the insert > in > the second ij script. >=20 > Hope this helps, > -Rick >=20 > RAPPAZ Francois wrote: > > I use to file called with the run command in ij > > 1 file says: > > AUTOCOMMIT OFF; > > > > CREATE TABLE authors ( > > name1 varchar(20) NOT NULL, > > name2 varchar(20) NOT NULL, > > data varchar(50), > > auhtor_id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START > WITH 1, INCREMENT BY 1) > > ); > > > > CREATE INDEX name ON AUTHORS (name1, name2); > > > > ALTER TABLE authors > > ADD CONSTRAINT authors_pk Primary Key ( > > author_id); > > > > COMMIT; > > > > 2 file contains the insert statement and nothing else. > > Is this the problem ? > > > > Fran=E7ois > > > > > > > >> -----Original Message----- > >> From: Richard.Hillegas@Sun.COM [mailto:Richard.Hillegas@Sun.COM] > >> Sent: vendredi, 30. octobre 2009 14:10 > >> To: Derby Discussion > >> Subject: Re: data lost with ij > >> > >> RAPPAZ Francois wrote: > >> > >>> Using ij, I create a database, then I build a table and populate it > >>> > >> with a serie of insert statement. Without doing anything else I > >> disconnect (that take a long time) and I exit. > >> > >>> When I reconnect and run a select * from table; I got nothing in > the > >>> > >> table... > >> > >>> If run that select statement after the inserts, the bug does not > >>> > >> appear. > >> > >>> Is this a known problem ? > >>> > >>> Fran=E7ois > >>> > >>> > >> Hi Fran=E7ois, > >> > >> It sounds as though you are not committing your transaction before > >> exiting. As part of an orderly exit, make sure that you do the > >> following: > >> > >> 1) Commit your transaction > >> > >> 2) Shutdown the database > >> > >> 3) Then exit > >> > >> Hope this helps, > >> -Rick > >>