Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4020D10BCB for ; Wed, 14 Aug 2013 18:16:37 +0000 (UTC) Received: (qmail 53302 invoked by uid 500); 14 Aug 2013 18:16:36 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 52929 invoked by uid 500); 14 Aug 2013 18:16:33 -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 52922 invoked by uid 99); 14 Aug 2013 18:16:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 18:16:31 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FORGED_YAHOO_RCVD,HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.139.213.141] (HELO nm23-vm1.bullet.mail.bf1.yahoo.com) (98.139.213.141) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 18:16:23 +0000 Received: from [66.196.81.173] by nm23.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2013 18:16:01 -0000 Received: from [98.139.211.207] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 14 Aug 2013 18:16:01 -0000 Received: from [127.0.0.1] by smtp216.mail.bf1.yahoo.com with NNFMP; 14 Aug 2013 18:16:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376504161; bh=sIkealeJXz/jcD50EyEa1XYb/G9AVo2Gsc3zhWUbMm4=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:References:Mime-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=k8Dqiu7fZ379mLbY4KD/kMfxwpiFtN2mqT2Ns9QnwnB+0KhFRQJDNRT8tel3oMFw18eq+kgSy0l6DvGJbcHiwCQjZyL6X67IICcAWy+8ovsJp3FlkuPeY8+cwra0LvVyIqkTi31LU69LVqKXBxmT30pUEcvGKWy6JVuef1hvUrw= X-Yahoo-Newman-Id: 271113.31895.bm@smtp216.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yUFn2WsVM1ke7gMuLAQUgXszq9EaZsm7Aphr640sgyKnd0q MmulZgtxDuaFv3VnurmXFHcHAHEupvP0.JdtAHOeXXW44BCbEhgRt6uJpkTI 8kdoEeexTf84iIgaQ12msSu5vWSrfPAS.abN_Hk9QypOp.B1KPIeb7BWTj8w HQbj2W_h8wJ8vgQ0YRGZorLlUCqIizslAuGX81GkVTp11_37QnU2071kxEOp DPCHXOtMSGosegTHf3UAkT3gMlq2ZwvFTTKgn5vLL46lsjhWkDC6ymFNpKbD 2ZpZEsYn.r.iufRRGSNNCHMKBoH1UI7Rni.ELpSg1ZARe9uSyin6b1ROc7.j eeSkZk31FKv.V9mntcxa9YTTFqTqUWHX8jA.2ml.2HUGV.ij3k6CUUW6aaWc Ko0qbMi2yfJipT8HknLq.wVrYYSsXd5JSijJP5bF5VlVs.nByAA4x5Y5ivi7 w3Ndi4QjQCgFrvVJPpVSBPP4qT91YkvxBn3eO38vJC0FHs5Grv_wUwnaa5LP d6opsbFxhhgxNmGjhvlqiQCnvZTN5iI1ozTvU9NlPf.oa0vbY21IY5rUj59h YXedIXp8Ap6dOqXU3EU1swYGJhSd0PThLpLVUxXLcIOFAJH2JgityK1NYCxz os1QoJV_dTTrUgavBy7z0SE5o3hDLj2WoBhreJnnhDnaU7T25aHf99Euk_07 0pbGW_J8UaSzI0uD5xtuLXsHfQEv5vg-- X-Yahoo-SMTP: x9jC7Z6swBAdXGXn.Vnx4DNhmQ-- X-Rocket-Received: from [10.10.12.10] (peter.ondruska@90.180.4.71 with ) by smtp216.mail.bf1.yahoo.com with SMTP; 14 Aug 2013 11:16:01 -0700 PDT References: <520A6D0F.1040307@sbcglobal.net> <520B7BD7.7030106@sbcglobal.net> Mime-Version: 1.0 (1.0) In-Reply-To: <520B7BD7.7030106@sbcglobal.net> Content-Type: multipart/alternative; boundary=Apple-Mail-0C587C36-109F-4D10-9CBE-6F83CCE5D63D Content-Transfer-Encoding: 7bit Message-Id: <157721C6-8001-4E01-9633-E49F63ECF002@yahoo.com> Cc: Derby Discussion X-Mailer: iPad Mail (10B329) From: =?utf-8?Q?Peter_Ondru=C5=A1ka?= Subject: Re: Strange situation Date: Wed, 14 Aug 2013 20:15:59 +0200 To: Derby Discussion X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-0C587C36-109F-4D10-9CBE-6F83CCE5D63D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Well, in "ij" I do: ... DISCONNECT; CONNECT 'jdbc:derby:;shutdown=3Dtrue'; Peter On 14. 8. 2013, at 14:45, Katherine Marsden wr= ote: > On 8/13/2013 4:42 PM, Carlos de Luna Saenz wrote: >> since i'm using spring i guess the shutdown=3Dtrue inside the connection s= tring will be enough to shut the DB properly=E2=80=A6 is that all right? >> Greetings > I am not familiar with Spring. As long as you boot the database and then c= onnect with shutdown=3Dtrue as the last operation, you should be ok. You can= also accomplish this by connecting with ij, connecting with shutdown, and t= yping exit while still on the read/write media. > /test $java org.apache.derby.tools.ij > ij version 10.10 > ij> connect 'jdbc:derby:mydb'; > ij> connect 'jdbc:derby:mydb;shutdown=3Dtrue'; > ERROR 08006: Database 'mydb' shutdown. > ij> exit; >=20 >=20 >> =20 >> De: Katherine Marsden [mailto:kmarsdenderby@sbcglobal.net]=20 >> Enviado el: martes, 13 de agosto de 2013 12:30 >> Para: Derby Discussion >> Asunto: Re: Strange situation >> =20 >> On 8/13/2013 7:37 AM, Carlos de Luna Saenz wrote: >> We have a stange behavour in a database that is "imported" from a SQL Ser= ver DB. >> On Windows Derby shows all records fine, but when used as "read only" (ro= ot admin owned with 755) on Mac there is a table that shows as empty (0 reco= rds) when the same DB in Windows has 1310 records. >> for accessing the DB we are using the Emmbeded driver=E2=80=A6 >> We found that the first time the DB is used on Mac or windows there are s= ome files changes (if 777 is set as permissions) and then the records are sh= own, but the installation program is not seting (and we don't want) those pr= iviledges to the derby files=E2=80=A6 >> Any idea on WHY this is happenning? we are looking how to get files that w= orks with the install but we would like to know what do we have to be aware t= o prevent this "data lose" when copying the DB. >> Greetings >> =20 >> My guess is that you did not shutdown the database before deploying read o= nly. See this information for preparing a database for read-only use: >> http://db.apache.org/derby/docs/10.10/devguide/tdevdeploy26887.html >>=20 >>=20 >> =20 >> Ing. Carlos de Luna S=C3=A1enz | Direcci=C3=B3n de Sistematizaci=C3=B3n d= e Tesis - Director de =C3=81rea | >> Direcci=C3=B3n General de Tecnolog=C3=ADas de la Informaci=C3=B3n | Supre= ma Corte de Justicia de la Naci=C3=B3n >> T. +52.55. 4113-1000 ext. 1174 | C: cluna@scjn.gob.mx >=20 --Apple-Mail-0C587C36-109F-4D10-9CBE-6F83CCE5D63D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Well, in "ij" I do:

...
DISCONNECT;
CONNECT 'jdbc:derby:;shutdown=3Dt= rue';

Peter

On 14. 8. 2013, at 14:45, Kather= ine Marsden <kmarsdenderby= @sbcglobal.net> wrote:

=20 =20 =20
On 8/13/2013 4:42 PM, Carlos de Luna Saenz wrote:

since i'm using= spring i guess the shutdown=3Dtrue inside the connection string will be enough to shut the DB properly=E2=80=A6 is that a= ll right?

Greetings<= /o:p>

 

I am not familiar with Spring. As long as you boot the database and then  connect with shutdown=3Dtrue as the last operation, you shoul= d be ok. You can also accomplish this by connecting with ij, connecting with shutdown,  and typing exit while still on the read/write media.
/test $java org.apache.derby.tools.ij
ij version 10.10
ij> connect 'jdbc:derby:mydb';
ij> connect 'jdbc:derby:mydb;shutdown=3Dtrue';
ERROR 08006: Database 'mydb' shutdown.
ij> exit;


 

De: Katherine Marsden [mailto:kmarsdenderby@sbcglobal.net]=
Enviado el: martes, 13 de agosto de 2013 12:30
Para: Derby Discussion
Asunto: Re: Strange situation

 

On 8/13/2013 7:37 AM, Carlos de Luna Saenz wrote:

We have a stange behavour in a database that is "imported" from a SQL Server DB.

On Windows Derby shows all records fine, but when used as "read only" (root admin owned with 755) on Mac there is a table that shows as empty (0 records) when the same DB in Windows has 1310 records.

for accessing the DB we are using the Emmbeded driver=E2=80=A6

We found that the first time the DB is used on Mac or windows there are some files changes (if 777 is set as permissions) and then the records are shown, but the installation program is not seting (and we don't want) those priviledges to the derby files=E2=80=A6

Any idea on WHY this is happenning? we are looking how to get files that works with the install but we would like to know what do we have to be aware to prevent this "data lose" when copying the DB.

Greetings

 

My guess is that you did not shutdown the database before deploying read only.  See this information for preparing a database for read-only use:
http://db.apache.org/derby/docs/10.= 10/devguide/tdevdeploy26887.html


 = ;

Ing. Carlos de Luna S=C3=A1enz | Direcci=C3=B3n de Sistematizaci=C3=B3n de Tesis - Director de =C3=81rea |

Direcci=C3=B3n General de Tecnolog=C3=ADas de la Informaci=C3=B3n | Suprema C= orte de Justicia de la Naci=C3=B3n

T. +52.55. 4113-1000 ext. 1174 | C: cluna@scjn.gob.mx

 

 

&nbs= p;


=20
= --Apple-Mail-0C587C36-109F-4D10-9CBE-6F83CCE5D63D--