Paul Linehan | 21 Jan 15:09 2014
Picon
Picon

Creating tables - migrating from MySQL.

Hi all,

I'm trying to migrate a system (72 tables) from MySQL to Apache.

I've looked at the docco here
http://db.apache.org/derby/docs/10.0/manuals/reference/sqlj27.html#CREATE+TABLE+statement,
but it isn't readily apparent to me how to create INDEXES within the
CREATE TABLE statement.

I'd rather not have to manually perform this procedure - a sample might help.

CREATE TABLE analysis (
  analysis_id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  created datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  logic_name varchar(128) NOT NULL,
  db varchar(120) DEFAULT NULL,
  PRIMARY KEY (analysis_id),
  UNIQUE KEY logic_name_idx (logic_name),
  KEY db_idx (db)
);

Tried this through ij and it failed.

What do I have to substitute for "PRIMARY KEY", "UNIQUE KEY" and "KEY"
in the CREATE TABLE
statement (I'll either use sed/awk/vi/ or Java eventually) - or do I
have to create the PRIMARY KEY
and other KEYs outside of the main CREATE TABLE statement?

I did try doing this automatically using SQuirrel SQL, but there are
(Continue reading)

Paolo Forte | 17 Jan 17:26 2014
Picon

read from a Derby db with only "SEQ0" forlder and "service.properties" file

Hi,

 

I’m Paolo Forte,sorry for my bad English;

 

I’m not a developer but there is an application software in my farm that use Derby Db;

 

The pc is crashed but I have a copy of “seq0” folder and "service.properties" file;

 

The db under application software is ok but for some settings it doesn’t work sometime;

 

Is there any method to read from the db like sql, I tried with Razorsql but there is not driver to work with it, it display a message that the verion NULL cannot upgrade to version 10.5;

 

Please, I cannot loose this db because there’s 5 months of my collegue works on this db;

 

Very Thanks

 

By

 

Paolo Forte

 

PRODUCTION GROUP SRL

( Office  +39 0823 821641

7 Fax     +39 0823 821325

* E-mail: pforte <at> productionspa.it

 

“Le informazioni e i contenuti di questa email hanno carattere riservato e sono indirizzate esclusivamente al destinatario. Nel caso di erronea trasmissione Vi invitiamo, ai  sensi del Dlg. 196/2003 (Legge sulla Privacy), a dare comunicazione dell'errato ricevimento all'indirizzo e-mail del mittente, nonchè a provvedere alla distruzione del documento erroneamente ricevuto.

Il mittente non è responsabile per i dati comunicati e conosciuti contravvenendo a questo invito”

"The information and content of this email are confidential and addressed only to the recipient. In case of erroneous transmission we invite you, pursuant to Dlg. 196/2003 (Privacy Act), to give notice of the incorrect receipt to the email address of the sender, as well as to ensure the destruction of the document received erroneously. The sender is not responsible for information communicated and known in contravention to this request.."

 

 

AirDT | 17 Jan 16:41 2014
Picon

Multiple Derby Network Server instances on a same computer

Hi

1 - Is it possible to run multiple Derby Network Server instances on a same
computer? (each one with a different port and a different system derby
directory) ? 
2 - Can I do it in a single thread or should I use separate threads ? 
3 - Is there a maximum number of databases on witch  users can connect with
a given Derby Network Server ? 
4 - When there are no more connected users to a database is it possible to
automatically shutdown the database ?

Thanks in advance

AirDT

--
View this message in context: http://apache-database.10148.n7.nabble.com/Multiple-Derby-Network-Server-instances-on-a-same-computer-tp136584.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

John I. Moore, Jr. | 17 Jan 16:23 2014
Picon
Picon

Network Server Access Permissions and Java 1.7.0_51

Java version 1.7.0_51 (latest version) causes the following error when trying to start the network server.  I can see from the issue tracker that there is a fix to be added that should correct this problem in the next release, but is there an easy workaround that exists now?  Details would be appreciated.

 

_________________________________________

 

John I. Moore, Jr.

 

C:\Java\db-derby-10.10.1.1-bin\bin>startNetworkServer.bat

Thu Jan 16 16:34:04 EST 2014 : Security manager installed using the Basic server security policy.

Thu Jan 16 16:34:04 EST 2014 : access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")

java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")

        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)

        at java.security.AccessController.checkPermission(AccessController.java:559)

        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)

        at java.lang.SecurityManager.checkListen(SecurityManager.java:1134)

        at java.net.ServerSocket.bind(ServerSocket.java:375)

        at java.net.ServerSocket.<init>(ServerSocket.java:237)

        at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)

        at org.apache.derby.impl.drda.NetworkServerControlImpl.createServerSocket(Unknown Source)

        at org.apache.derby.impl.drda.NetworkServerControlImpl.access$000(Unknown Source)

        at org.apache.derby.impl.drda.NetworkServerControlImpl$1.run(Unknown Source)

        at org.apache.derby.impl.drda.NetworkServerControlImpl$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unknown Source)

        at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unknown Source)

        at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)

 

AirDT | 16 Jan 15:41 2014
Picon

Derby in production environment

Hello, 

I want to use Derby in a production environment and I read the following
sentence: 
"The Derby database Has No Associated security controls, and no
optimizations-have-been performed. Reasons For thesis, do not use Derby in a
Production environment." 
in doc 
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fah35004_.htm

Is Derby currently being used successfully in production environments?

Any information would be appreciated. Thanks in advance.

AirDT

--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-in-production-environment-tp136557.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Bob M | 11 Jan 20:20 2014
Picon

Exporting table records

Hi

I have a derby database with one table which I access using Netbeans

What is an easist way for me to export the contents of the table ?

Bob M

--
View this message in context: http://apache-database.10148.n7.nabble.com/Exporting-table-records-tp136465.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Han Xin | 10 Jan 19:59 2014
Picon

Can I run derby for a long time?

Can I run derby for a long time with many inserts, deletes and updates? Are the memories, disk spaces recovered after deletion/updating?

Any information would be appreciated. Thanks in advance.
Melissa Mifsud | 10 Jan 05:40 2014
Picon

Setting derby.storage.pageSize

Version: 10.10.1.1 (Embedded)

I have been trying to set the derby.storage.pageSize on an index according to http://db.apache.org/derby/docs/10.10/ref/rrefproper40688.html in the hope that increasing the pageSize will help with a large insert/update.

It seems the value doesn't seem to be changing. The relevant part of my script is:

call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','16384'); 
-- CREATE TABLE DataSource...
CREATE INDEX dataSource_path_idx ON DataSource(connectorId, path);
select p, syscs_util.syscs_get_database_property(p) from (values 'derby.storage.pageCacheSize', 'derby.storage.pageSize') props(p); 
call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');
select p, syscs_util.syscs_get_database_property(p) from (values 'derby.storage.pageCacheSize', 'derby.storage.pageSize') props(p); 


Both selects give the same output:
P                                         |2                                                                                                                               
-----------------------------------------------------------------------------------
derby.storage.pageCacheSize               |4000                                                                                               
derby.storage.pageSize                    |NULL    


So I have (earlier in the script) changed the pageCacheSize property using SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY but the pageSize does not change.
Running select pagesize from table (syscs_diag.space_table('APP', 'DataSource')) s; returns no rows.
  1. Is there a way to check what the pageSize of an index is?
  2. Is there some other way I should be setting the pageSize property?

Thanks,
Melissa



Paul Linehan | 9 Jan 07:33 2014
Picon
Picon

Biggest Apache Derby database(s).

Hi all,

I would like to know (with references/URLs preferably) what are the
kinds of sizes that large Derby installs stretch to? Would it go to 1TB?
More? Less?

Thanks in advance for any info, pointers and esp. references and URLs.

Rgs,

Paul...

--

-- 

linehanp@...

Mob: 00 353 86 864 5772

Tim Dudgeon | 6 Jan 13:47 2014

varargs functions: primitive or Object type?

I'm trying to write a function that performs aggregation and I'm not 
clear on how to handle the varargs part.
Lets assume I was wanting to write a function that does averaging, and 
handles null values correctly.
I'm defining my function like this:

CREATE FUNCTION MYAVG
( VALS DOUBLE ... )
RETURNS DOUBLE
PARAMETER STYLE DERBY
NO SQL LANGUAGE JAVA
EXTERNAL NAME 'myorg.misc.derby.functions.MyFunctions.myAverage;

What does the signature of the Java method need to be?
I've tried:

static Double myAverage(Double[] vals) { }
static Double myAverage(Double... vals) { }

Both of these fail with:
java.sql.SQLSyntaxErrorException: No method was found that matched the 
method call myorg.misc.derby.functions.MyFunctions.myAverage(double...), 
tried all combinations of object and primitive types and any possible 
type conversion for any  parameters the method call may have

Seems like its wanting
static Double myAverage(double... vals) { }
but if that's the case how are nulls handled?

Thanks
Tim

Lou DeGenaro | 5 Jan 16:12 2014
Picon

slow query? (from a practical newbie)

My table: Job

(
 primaryKey int primary key generated always as identity,
 id int not null,
 startDate bigint not null,
 endDate bigint not null,
 duration int not null,
 userId varchar( 64 ) not null,
 submitter varchar( 64 ) not null,
 schedulingClass varchar( 64 ) not null,
 debugPortDriver int not null,
 debugPortProcess int not null,
 state varchar( 64 ) not null,
 stateIndex int not null,
 completionType varchar( 64 ) not null,
 completionRationale varchar( 1024 ) not null,
 services int not null,
 processes int not null,
 initFails int not null,
 runFails int not null,
 pgin int not null,
 swapGbMax double not null,
 memorySizeGb int not null,
 workItemsTotal int not null,
 workItemsDone int not null,
 workItemsError int not null,
 workItemsRetry int not null,
 workItemsPreempt int not null,
 workItemsStatMax int not null,
 workItemsStatMin int not null,
 workItemsStatMean int not null,
 workItemsStatStdDev int not null,
 description varchar( 4096 ) not null,
 schedulingSharesMax int not null,
 logDirectory varchar( 4096 ) not null,
 jsonServiceDependencies clob not null,
 jsonJobDeployment clob not null,
 projection bigint not null,
 swapGbCurrent double not null,
 workItemsDispatch int not null,
 constraint uniqueColumns unique ( id )
)

=====

My indexes:

CREATE INDEX id_desc ON Job (id desc)
CREATE INDEX stateIndex_asc_id_desc ON Job (stateIndex asc, id desc)

=====

Query #1 - fast! meaning sub-second using prepared statement

     select * from Job order by stateIndex asc, id desc offset ? rows fetch next ? rows only

=====

Query #2 - slow :-( meaning on the order of 30 seconds on a table with 55,000 records

     select * from Job where id < ? order by stateIndex asc, id desc offset ? rows fetch next ? rows only

=====

Ostensibly the where clause really slow does the query.  How come and how do I remedy?

Thanx!

Lou.


Gmane