Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 33023 invoked from network); 6 Jun 2008 14:31:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2008 14:31:54 -0000 Received: (qmail 63369 invoked by uid 500); 6 Jun 2008 14:31:55 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 63324 invoked by uid 500); 6 Jun 2008 14:31:55 -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 63305 invoked by uid 99); 6 Jun 2008 14:31:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 07:31:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andreask1@vivodinet.gr designates 83.171.203.1 as permitted sender) Received: from [83.171.203.1] (HELO smtp01.vivodinet.gr) (83.171.203.1) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 14:30:58 +0000 Received: from [192.168.1.64] (dsl-88-218-160-157.customers.vivodi.gr [88.218.166.157] (may be forged)) by smtp01.vivodinet.gr (8.12.11.20060308/8.12.10) with ESMTP id m56EYcgd008506 for ; Fri, 6 Jun 2008 17:34:38 +0300 Message-ID: <48494A34.50103@vivodinet.gr> Date: Fri, 06 Jun 2008 17:31:16 +0300 From: Andreas Kyrmegalos User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Database connection not bound to default database schema when authenticating through LDAP? References: <484887F2.1020402@vivodinet.gr> <4848DD6A.7000200@sun.com> <4848E214.9010903@vivodinet.gr> <48493980.8070709@sun.com> In-Reply-To: <48493980.8070709@sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on smtp01.vivodinet.gr X-Virus-Scanned: ClamAV 0.93/7321/Mon Jun 2 10:26:30 2008 on smtp01.vivodinet.gr X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Thanks for taking the time to consider my question and posting such a lengthy reply Rick. Luckily, I have found a way to force a default schema for my project's hibernate mappings and get things going just like I want them to be. For now anyway. Thanks again. Andreas Rick Hillegas wrote: > Hi Andreas, > > I can see that for many applications it would be useful to have a > concept of a database-wide default schema, that is, a schema that all > users start out in when they get a fresh connection. That is not the > way Derby works. For Derby, the default schema is user-specific, not > database-wide. This is true even in the degenerate case of an embedded > application which does not run with authentication turned on: in that > case the username defaults to APP and the default schema is APP's schema. > > The 2003 SQL standard does not offer any guidance on this topic. > According to part 2, section 4.37.2 (SQL-session identification), the > default schema of a session is vendor-defined. > > I don't remember any deep reason about why Derby has this default > behavior. It may be nothing more complicated than the fact that the > original programmers were familiar with this default from previous > databases which they had worked on. > > Some databases let you bind a default schema to a username. See for > instance http://msdn.microsoft.com/en-us/library/ms190387.aspx. I > think it would be straightforward to build such a mechanism for > Derby--although this would take you into session startup logic and the > devil could be in the details. I think there are plenty of people > around who understand that logic and who could coach a newcomer > through this project. > > In the meantime, the only workaround I see is for your application to > force the schema to a default value when your application hands out > connections. > > Please pardon me if I have talked past your real concern. > > Hope this helps, > -Rick