Re: triggers / referencing clause
I will try the stored procedure version you suggest next... Rick Hillegas-2 wrote: FNG wrote: --This trigger compiles and works fine CREATE TRIGGER seq_table_x_trg AFTER INSERT ON TABLE_X REFERENCING NEW ROW AS new FOR EACH ROW MODE DB2SQL UPDATE sequences SET currval = currval + 1 WHERE sequence_name = 'table_x'; --If I add this additional clause on the end then it seems to complain about new SET new.PK = 'abc-' || SELECT currval FROM sequences WHERE sequence_name = 'table_x’; If anyone can comment would be appreciated. Hello, From this description I'm not sure what the problem trigger looks like. Could you share the full trigger declaration? Off the top of my head, it sounds like you are trying to use the trigger to update a row in sequences and a row in table_x. Remember that a trigger can only fire one sql statement as its action. The trigger can't fire two update statements, one against sequences and the other against table_x. If you need to update two tables then you should put the updates in a database procedure and have the trigger fire the procedure. Hope this helps, -Rick -- View this message in context: http://old.nabble.com/triggers---referencing-clause-tp27026717p27056948.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Derby memory consumption with many databases
Did I understand correctly that derby.storage.pageCacheSize is configured per database? Is there a way to set the page cache size for derby across all databases in the JVM when running Derby in embedded mode? Background: We are running Derby in an application where there is one database per client. Eventually we would want to update the database model to allow all clients to be inside a single database, but that is a big undertaking. Derby offers a great solution for us. We use it in embedded mode and have one database per client. However, memory consumption is getting out of hand now that we're reaching hundreds of databases. After taking a heap snapshot and examining memory usage, it looks like it is the page cache that is causing the problem. At any one time there are only a few databases active, so if Derby had a concept of configuring maximum cache usage for the entire JVM, there would not be a problem with the available memory. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer
Re: Derby 10.6 release date
Hello, Thanks for your interest in 10.6. Some responses inline... Deepblue1000 wrote: Hello, I was wondering what the current status of derby 10.6 is - when will an official release be available? No-one has volunteered to manage this release yet. But if we keep to the release cadence of the past several years, I expect that someone will volunteer to produce a release candidate around March. I would expect to see an official release posted later this spring. I require storing Java objects in columns and I noticed that this feature is in 10.6. We are eager for community feedback on this and other 10.6 features. Also, I noticed there are several alpha versions of it available at: http://dbtg.foundry.sun.com/derby/bits/trunk/ The latest version availabe is in 10.6.0.0alpha_2010-01-06T19-30-15_SVN896535.zip - is this stable to use? If I use it can I later upgrade it to the official 10.6 release when it comes out? These are snapshots of the trunk. They are alpha code for development/testing purposes only. A database created by one of these snapshots won't be upgradeable to an official Derby release. Hope this helps, -Rick Would really appreciate some information about this, as this affects the release of my application. Thanks you!!!
Re: Derby memory consumption with many databases
However, memory consumption is getting out of hand now that we're reaching hundreds of databases. ... At any one time there are only a few databases active Is it possible that you aren't fully shutting each database down when you are through with it? thanks, bryan
Re: Derby memory consumption with many databases
Øyvind Harboe oyvind.har...@zylin.com writes: Did I understand correctly that derby.storage.pageCacheSize is configured per database? Is there a way to set the page cache size for derby across all databases in the JVM when running Derby in embedded mode? Background: We are running Derby in an application where there is one database per client. Eventually we would want to update the database model to allow all clients to be inside a single database, but that is a big undertaking. In case you go that route, I just thought I'd mention here that Derby supports standard SQL schemas and SQL authorization (so users would be protected from accessing each others schemas) in contrast to e.g. MySQL, for which database and schema is more or less the same thing. Dag
Re: Derby memory consumption with many databases
In case you go that route, I just thought I'd mention here that Derby supports standard SQL schemas and SQL authorization (so users would be protected from accessing each others schemas) in contrast to e.g. MySQL, for which database and schema is more or less the same thing. The problem I have with schemas is that it isn't really portable between databases... We would like to leave the database choice to the users. Our app is talking to Cayenne which provides the db abstraction. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer
Re: Derby memory consumption with many databases
On Thu, Jan 7, 2010 at 4:03 PM, Bryan Pendleton bpendle...@amberpoint.com wrote: However, memory consumption is getting out of hand now that we're reaching hundreds of databases. ... At any one time there are only a few databases active Is it possible that you aren't fully shutting each database down when you are through with it? I'm never shutting down the databases for as long as the JVM(tomcat server) lives. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer
Derby as an in-memory JEE datasource
Hi, is it possible to use Derby as an in-memory datasource on Glassfish v3 application server? I tried but with no luck. Regards -- Marcin Kwapisz
AW: Derby memory consumption with many databases
Hi to all who know more about Derby In this particular situation mentioned below, is it possible to work with views that are able to use the certain table of the particular schema of the user that is loged in. It is just a thought that may be then the db abstraction layer Cayenne provides still is able to work(?) -Ursprüngliche Nachricht- Von: Øyvind Harboe [mailto:oyvind.har...@zylin.com] Gesendet: Donnerstag, 7. Januar 2010 17:37 An: Derby Discussion Betreff: Re: Derby memory consumption with many databases In case you go that route, I just thought I'd mention here that Derby supports standard SQL schemas and SQL authorization (so users would be protected from accessing each others schemas) in contrast to e.g. MySQL, for which database and schema is more or less the same thing. The problem I have with schemas is that it isn't really portable between databases... We would like to leave the database choice to the users. Our app is talking to Cayenne which provides the db abstraction. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer
derby embedded for small sites viable?
Could Apache Derby 10.5.x in the embedded form be an interesting viable alternative to, for example MySQL / PostgreSQL and similar? The requirements are about 100 concurrent users, content being text, images, a *smaller amount* of audio files and later possibly video files, 4 areas with 1-10 articles in each and an administrative interface requiring login. Surely Derby 10.5.x or later could perform such a small site well in Tomcat 5.5.x or similar? All this probably running in a virtual unix server somewhere. What are your experiences with embedded derby after publication? Can Derby sustain Blobs well or would I better off just using the file system? I need to personalize some of the given URL's to files in blob- form per user, but I guess that could be done no matter what is used. /MB
Re: derby embedded for small sites viable?
Hello, This sounds like an application which is well within Derby's capabilities. Hopefully you'll get more concrete advice from someone who has written a similar application. Regards, -Rick MB wrote: Could Apache Derby 10.5.x in the embedded form be an interesting viable alternative to, for example MySQL / PostgreSQL and similar? The requirements are about 100 concurrent users, content being text, images, a *smaller amount* of audio files and later possibly video files, 4 areas with 1-10 articles in each and an administrative interface requiring login. Surely Derby 10.5.x or later could perform such a small site well in Tomcat 5.5.x or similar? All this probably running in a virtual unix server somewhere. What are your experiences with embedded derby after publication? Can Derby sustain Blobs well or would I better off just using the file system? I need to personalize some of the given URL's to files in blob- form per user, but I guess that could be done no matter what is used. /MB
Re: Derby as an in-memory JEE datasource
Any errors? On Thu, Jan 7, 2010 at 5:59 PM, Marcin Kwapisz mkwap...@zsk.p.lodz.pl wrote: Hi, is it possible to use Derby as an in-memory datasource on Glassfish v3 application server? I tried but with no luck. Regards -- Marcin Kwapisz