Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 22297 invoked from network); 12 Oct 2006 10:33:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 10:33:29 -0000 Received: (qmail 7031 invoked by uid 500); 12 Oct 2006 10:33:28 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 6985 invoked by uid 500); 12 Oct 2006 10:33:27 -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 6974 invoked by uid 99); 12 Oct 2006 10:33:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 03:33:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.1.36] (HELO gmp-ea-fw-1.sun.com) (192.18.1.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 03:33:26 -0700 Received: from d1-emea-09.sun.com ([192.18.2.119]) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k9CAX5QK023749 for ; Thu, 12 Oct 2006 11:33:05 +0100 (BST) Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0J7000B01QKB8F00@d1-emea-09.sun.com> (original mail from John.Embretsen@Sun.COM) for derby-user@db.apache.org; Thu, 12 Oct 2006 11:33:05 +0100 (BST) Received: from [129.159.112.236] by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0J7000D48QN3E98Q@d1-emea-09.sun.com> for derby-user@db.apache.org; Thu, 12 Oct 2006 11:33:05 +0100 (BST) Date: Thu, 12 Oct 2006 12:27:34 +0200 From: John Embretsen Subject: Re: where we shoul use derby.drda.* and where the file should be placed In-reply-to: <452CEB7F.30808@gmail.com> Sender: John.Embretsen@Sun.COM To: Derby Discussion Message-id: <452E1896.2090306@Sun.COM> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: 7BIT References: <452CCCAA.8010102@gmail.com> <452CE2CA.6020201@Sun.COM> <452CEB7F.30808@gmail.com> User-Agent: Thunderbird 1.5.0.5 (X11/20060730) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N legolas wood wrote: > Thank you for reply. it helps > so i should put the properties file inside the > *frameworks\NetworkServer\bin *folder If that is where you start the server (for example if you use the startNetworkServer.bat script), yes. (By the way, I think that from version 10.2.1.6, the frameworks\... scripts are deprecated, and that new ones under bin\ should be used instead.) > how we can apply database wide properties ? should we create a > properties file and put it in some place ? According to the Derby manuals (http://db.apache.org/derby/manuals/index.html), database-wide properties can only be set by using system procedures within SQL statements. The "Tuning Derby" manual explains how to set database-wide properties: http://db.apache.org/derby/docs/dev/tuning/ctunsetprop12821.html It may be helpful to walk through the "Properties case study" example (in the same section of the Tuning manual) to understand the difference between database-wide and system-wide properties, precedence and persistence. It also shows how to set a database-wide property using JDBC: http://db.apache.org/derby/docs/dev/tuning/ctunsetprop32443.html There is a page in the reference manual showing how to set database-wide properties using either SQL (for example in IJ) or JDBC (Java code). The system procedure is called SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY: http://db.apache.org/derby/docs/dev/ref/rrefsetdbpropproc.html If, for example, you want to set the property derby.locks.deadlockTimeout=10, do (after connecting to the database): SQL: CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY ('derby.locks.deadlockTimeout', '10'); JDBC: CallableStatement cs = conn.prepareCall ("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(?, ?)"); cs.setString(1, "derby.locks.deadlockTimeout"); cs.setString(2, "10"); cs.execute(); cs.close(); There is also a system function for fetching an existing database-wide property, and that function is called SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY. You can look it up in the reference manual if you need more information. -- John