Re: ipv6 and Network Server hostname
In a round about fashion, we found out to use "::" (2 colons) in v6 for 0.0.0.0 (v4). Now it is working fine. NetworkServerControl serverControl = new NetworkServerControl(InetAddress.getByName("::"),1527); thanks much, Dave Been Enterprise Search Development [EMAIL PROTECTED] Phone 510-222-3926, Cell 928-699-0488 "Manjula Kutty" <[EMAIL PROTECTED]> 09/06/2007 12:38 PM Please respond to "Derby Discussion" To "Derby Discussion" cc Subject Re: ipv6 and Network Server hostname Hi Dave, While doing some testing on the Ipv6 machines, I started the server as java org.apache.derby.drda.NetworkServerControl start -h 2002:92a:8f7a:13:9:42:74:19 So instead of giving 0.0.0.0 I gave the full IP address. Did the same for the localhost also. Hope I answered your question. If you need any more information regarding derby on IPv6 please let me know. Thanks, Manjula. On 9/6/07, Dave Been <[EMAIL PROTECTED]> wrote: for IPv4 we listen on host 0.0.0.0 in case a machine has multiple NIC cards, so we accept connections from all NICs. (I believe this was for windows only. is that correct?) Is there an equivelent ip for IPv6? thanks Dave Been -- Thanks, Manjula.
ipv6 and Network Server hostname
for IPv4 we listen on host 0.0.0.0 in case a machine has multiple NIC cards, so we accept connections from all NICs. (I believe this was for windows only. is that correct?) Is there an equivelent ip for IPv6? thanks Dave Been
userName legal characters specification?
I cannot find anywhere in the Derby documentation what are legal characters in a userName. >From the web i find thing alluding to alphnumeric + _, someone offering a patch to change this. Maybe this should be documented somewhere? thanks > If I try to connect, the error thrown is > ij> connect > 'jdbc:derby:testdb;create=true;[EMAIL PROTECTED];password=a'; > ERROR 28502: The user name '[EMAIL PROTECTED]' is not valid. > > The first error is being thrown from this method in > org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext#getAuthorizationId(String > username) This method calls the IdUtil.parseId() which will for an > unqualified id, check if the string has only characters from a-z, A-Z > and _ and digits. > I want to remove this restriction for the username case. Dave Been
Derby Procedure performance
I hear this question was recently discussed (last week?) but was embedded in another subject, maybe someone can point me to the subject so i can find it in the archives. I have not found it so far. Using the Embedded driver (not network server), I have an application with 3 PreparedStatements which do a select/update qualified on 1 row via indexed column, and an insert over a single table. Would there be any performance gain putting the 3 PreparedStatements into a Java Procedure so all are executed locally within the database? The parameters are 3 input ints, one String/varchar 1 - 256 bytes in length, one OUT int value. If there is any hope i can try it and time it, but if there is no hope it would save me the effort. thanks much, Dave Been
How Derby uses file descriptors
Can anyone point me to any documentation on how Derby uses file descriptors? Searches show problems in merges when creating indexes over large tables, but thats not my issue. We have a large application which is already file descriptor intensive, which is having problems embedding Derby due to its large file descriptor use. I am proposing adding yet another Derby database (or using the existing one) and would like to know: Is there anything the application can do to minimize the use of file descriptors? would long running transactions vs "autocommit on" have any effect on the # of file descs used (e.g. length of transaction)? Number of tables open size of tables use of PreparedStatements Dave Been
FW: Importing data from MySQL
Title: FW: Importing data from MySQL This program is in pretty rough shape, it evolved many times over, but i used it to migrate from a 2.5 Gig Cloudscape 4 database to Derby. Worked fine last time I used it. YMMV You run it once to export from some database using JDBC to the file system, e.g. without the -imp arg and pass in a file with the names of tables. java ImpExpCloudSync -writeDerbyFormat -driver ...mysql.driver... -jdbcUrl jdbc:mysql: tablesInAFile exp.log under the expdata/ dir will be files of the name .dat You then load these files into Derby using the ultrafast bulkImport (I once measured a 800% gain in performance, over row at a time Prepared inserts, a few years back, NOTE requires empty tables at the start): http://incubator.apache.org/derby/manuals/tools/tools90.html#HDRSII-IMPORT-57005 java ImpExpCloudSync -imp tablesInAFile imp.log You probably need to change/comment out patchDateType() as it was fixing illegal years from the old database, etc into the legal range for Derby. The schema I had had columns of email pasted into them, and had every control character, quote, that you could imagine, embedded into the large columns, and I didn't have any problems loading with this tool. you can pass a file containing the schema and it will IJ the commands to create your tables, first. java ImpExpCloudSync -imp -schema mySqlSchema.sql tablesInAFile imp.log check out parseArgs() as my usage() method doesn't print out all the options. HTH. I had some out of memory errors on some huge tables, but using -Xm1024m, etc was able to get around them. java ImpExpCloudSync -Z Bad flag -Z java ImpExpCloudSync [ -imp ] [ -driver jdbcdriver ] [ -jdbcUrl url ] \ [ -user u ] [ -password p ] [ -group grp ] \ [ -schema sqlfile ] \ [ -writeDerbyFormat ] \ table_names outfile defaults to export driver defaults to org.apache.derby.jdbc.EmbeddedDriver jdbcurl defaults to jdbc:derby:c:/work/dbs/derbysource;create=true user defaults to user password defaults to password writeDerbyFormat defaults to false Christian Rodriguez <[EMAIL PROTECTED]> 03/22/2005 06:43 PM Please respond to "Derby Discussion" To Derby Discussion cc Subject Importing data from MySQL Hello everyone, I am trying to import data from a MySQL database. So far I havent been able to do it. What I have tried: 1. Ive used the mysql dump utility to generate a file with inserts and then try to run that file from ij. One of my tables contain a large "text" object and the inserts fail, probably because of quote or double quote characters. 2. Ive written a basic java program that uses jdbc to connect to MySQL and the Derby database and tries to import the data. The program fails with an out of error message when trying to import that problematic table that contains large character objects. 3. Ive tried to use db2db migration tool. It fails with the same error: out of memory. So, has anyone been able to do this kind of thing? What do you recommend? Any hints, help, suggestions? Thanks, Christian import java.util.zip.*; import java.io.*; import java.util.Date; import java.util.Vector; import java.util.Hashtable; import java.util.Enumeration; import java.util.StringTokenizer; import java.text.SimpleDateFormat; import java.sql.DriverManager; import java.sql.DatabaseMetaData; import java.sql.Connection; import java.sql.Statement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Types; import java.lang.reflect.Array; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; /** */ public class ImpExpCloudSync { private static final boolean Debug=false; private Connection conn; private String datadir = "expdata"; private String driver = "org.apache.derby.jdbc.EmbeddedDriver"; private String jdbcUrl = "jdbc:derby:c:/work/dbs/derbysource;create=true"; //private String driver = "com.ibm.db2.jcc.DB2Driver"; //private String jdbcUrl = "jdbc:db2j:net://localhost:1527//work/dbs/msio.51"; private String schemaId = "APP"; private String user = "user"; private String password = "password"; private String outFile = "impexp.log"; private String tablesFile = "table_names"; private boolean readingPublicationDef = false; private SimpleDateFormat formatter = null; private boolean imp = false; private boolean zip = false; private boolean unzip = false; private String schemaFile = null; private String controlFile = null; private String zipFileName = null; private boolean writeDerbyFormat = false; private static final String IJ = "com.ibm.db2j.tools.ijImpl.Main"; public static void main (String[] args) { ImpExpCloudSync example = new ImpExpCloudSync();
Re: Data Synchronization between DB2and Derby!
Please forgive me, but I cannot pass up this opportunity hope no one minds. IBM DB2 Everyplace has supported Cloudscape as a synchronization client on Cloudscape version 4, version 5, and Derby Version 10 for some time (well, Derby only recently :) Source databases may be DB2 UDB, Sybase, Oracle, Cloudscape, ... http://www-306.ibm.com/software/data/db2/everyplace/ Cloudscape client features include: Cloudscape client is 100% pure java, utilizing JDBC. Supports concurrent users during SYNC operation. Intial Refresh uses the SYSCS_UTIL.SYSCS_BULK_INSERT VTI command to boost performance by 800% (over row at a time inserts). Source database may also be Cloudscape HTTPS for over the wire encryption Cloudscape's built in database encryption for on "device" database security (Cloudscape feature). Supports a large number of languages DB2 Everyplace Sync Server may be run in Tomcat or Websphere (which provides support for clustering, load balancing and high availability). Dave Been, DB2 Everyplace Gaurav Anand <[EMAIL PROTECTED]> 01/22/2005 04:36 AM Please respond to "Derby Discussion" To derby-user@db.apache.org cc Subject Data Synchronization between DB2and Derby! If you have ever abandoned Derby to be used as a remote client database only because you find difficult to synchronize data with DB2, may be this one can help. Open source data replication tool for data synchronization between DB2 and Derby, is certainly interesting that I have discovered. Check: https://sourceforge.net/projects/daffodilreplica/ Is there any other that you know? regards, Gaurav
Re: Build Errors (building Derby under Eclipse)
Sorry, I did not read the original post, however two things come to mind: 1) Some plug-ins (Clover) require a JDK and not a JRE, which can be set as your default via the menu Windows -> Preferences then in the left Pane, Java -> Installed JRE's Browse to add a JDK and then select it as your default. 2) I have not extensively used Ant in Eclipse, but thought of the Windows -> Preferences Ant -> Runtime settings, and h, tools.jar is set in Global Entries for me (Eclipse 3.0.1). If it is not in yours, you could also try adding it to Ant's classpath there. Dave Been Andrew McIntyre <[EMAIL PROTECTED]> 01/16/2005 08:32 PM Please respond to "Derby Discussion" To "Derby Discussion" cc Subject Re: Build Errors (building Derby under Eclipse) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jan 16, 2005, at 9:42 AM, Irum Godil wrote: > It seems to me that the Eclipse classpath file has no effect on > build.xml or the ant building. It is picking up its files from > somewhere else completely. I think I know what is going on here. I think the java executable that runs Ant from Eclipse is from a JRE installation instead of a JDK installation. For tools.jar for the taglet build, Ant tries to pick it up from the JDK relative to the setting of the Java system property java.home, to avoid having to make a copy of the JDK's tools.jar to another location. On most systems, java.home is set to the *jre* directory of the JDK installation. So, relative to this directory, tools.jar is in ${java.home}/../lib/tools.jar. However, if Ant is running from a JRE installation instead of a JDK installation, this directory will not exist. If you add the -verbose property to the Ant command line (inside Eclipse) and capture the output, the 4th line of the output will give you the location of the java.home. Once you know the location of java.home, you can copy tools.jar to where the build expects it to be (${java.home}/../lib). You could also find the location of java.home in a similar method as ant.java.version, with the following tag: > I also tried copying the tools.jar file inside: > $derbysource\tools\java file where the other jar files exist, but no > luck there too. If you are still unable to progress, another workaround would be to change java/build/org/apache/derbyBuild/build.xml, line 35, to point to a known copy of tools.jar andrew -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFB6zHkDfB0XauCH7wRAqmFAKCdKC1iRT4mKbsThu+O7KDdOF0QiACeLifE lAq1waDajOpG1FpYlRGZ1Zw= =5JKB -END PGP SIGNATURE-
Re: Derby/Cloudscape GUI??
i think someone mentioned it before but dbedit is a good plug in for eclipse. i used it with Sybase, saw Michael Rosset hook it up to UDB pretty quick. i'm using dbedit.ui_0.9.9. Dave Been, DB2 Everyplace Dave Been/Oakland/[EMAIL PROTECTED], [EMAIL PROTECTED] Phone 510-222-3926, Cell 928-699-0488 Daniel John Debrunner <[EMAIL PROTECTED]> 08/27/2004 11:11 AM Please respond to "Derby Discussion" To: Derby Discussion cc: Subject: Re: Derby/Cloudscape GUI?? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I just found this link of open source JDBC SQL browsing tools. http://java-source.net/open-source/sql-clients They might be interesting possibilities to use with Derby. If anyone tries one, it would be great if they could post their experiences to this list. Dan. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBL3lfIv0S4qsbfuQRAkwfAJ9ZexRrprd2QtSiExDgGhCO7O9KuACgzUN/ 3+5Cue37gLd+y1bgBaSFSmQ= =Zn6Z -END PGP SIGNATURE-