db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John I. Moore, Jr." <softmo...@att.net>
Subject RE: Starting Derby with Database
Date Mon, 06 Aug 2012 19:40:36 GMT
Jordon,

For the database URL, try

   jdbc:derby://localhost:1527/c:\\temp\\mydatabase

(i.e., add two backslashes to the part that involves the Windows path).
Depending on the application you are using to connect, one backslash could be interpreted
as the Java string escape character.

_________________________________________

John I. Moore, Jr.
SoftMoore Consulting

email:  jmoore@softmoore.com
web:    www.softmoore.com
cell:   843-906-7887

> -----Original Message-----
> From: Jordan-61 [mailto:mahstah@gmail.com]
> Sent: Monday, August 06, 2012 3:20 PM
> To: derby-user@db.apache.org
> Subject: Re: Starting Derby with Database
> 
> 
> Greetings José, thank you for your input. I tried the command switch you
> suggested and it generated an error that it was an invalid command.
> 
> [smartplant@SmartPlantWeb WEB-INF]$ startNetworkServer
> DERBY_OPTS=-Dderby.system.home=/greenWorldDB
> Mon Aug 06 14:08:11 EDT 2012 : Security manager installed using the Basic
> server security policy.
> Mon Aug 06 14:08:11 EDT 2012 : Invalid number of arguments for command
> start.
> Usage: NetworkServerControl <commands>
> Commands:
> start [-h <host>] [-p <portnumber>] [-noSecurityManager] [-ssl <sslmode>]
> shutdown [-h <host>][-p <portnumber>] [-ssl <sslmode>] [-user <username>]
> [-password <password>]
> ping [-h <host>][-p <portnumber>] [-ssl <sslmode>]
> sysinfo [-h <host>][-p <portnumber>] [-ssl <sslmode>]
> runtimeinfo [-h <host>][-p <portnumber>] [-ssl <sslmode>]
> logconnections {on|off} [-h <host>][-p <portnumber>] [-ssl <sslmode>]
> maxthreads <max>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
> timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
> trace {on|off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl
> <sslmode>]
> tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
> 
> I was searching for other suggestions and ran across this:
> http://www.vogella.com/articles/ApacheDerby/article.html
> 
> It recommends starting the derby server using the startNetworkServer command
> and then attaching to the database using the  command
> jdbc:derby://localhost:1527/c:\temp\mydatabase.
> 
> However, attempting to connect to the database using that command generates
> an invalid path error despite the path existing.
> 
> [root@SmartPlantWeb WEB-INF]# jdbc:derby://localhost:1527/greenWorldDB
> bash: jdbc:derby://localhost:1527/greenWorldDB: No such file or directory
> [root@SmartPlantWeb WEB-INF]# jdbc:derby://localhost:1527//greenWorldDB
> bash: jdbc:derby://localhost:1527//greenWorldDB: No such file or directory
> [root@SmartPlantWeb WEB-INF]# cd /greenWorldDB
> [root@SmartPlantWeb greenWorldDB]#
> 
> Do you have suggestions for either method of connecting to the database?
> Thanks in advance,
> 
> Jordan
> 
> 
> 
> 
> José Ventura-3 wrote:
> >
> > I believe that the startNetworkServer command uses an environment variable
> > DERBY_OPTS to hold additional properties. Try setting DERBY_OPTS=*-D*
> > derby.system.home=/greenWorldDB and running the command again (without the
> > -derby.system.home part).
> >
> > Also, note the -D in front of the property name, as that is a Java system
> > property.
> >
> > Hope that helps...
> >
> > On Wed, Aug 1, 2012 at 2:50 PM, Jordan <mahstah@gmail.com> wrote:
> >
> >> Greetings all-
> >>
> >> I'm a new Derby user and am trying to recover a derby database from a
> >> server that died that was set up by a co-worker who passed away as well.
> >> I
> >> have the entire database set up on a new Fedora 17 server which contains
> >> the service.properties file and the log, tmp, and seg0 directories and
> >> Derby is installed and configured properly with DERBY_HOME and JAVA_HOME.
> >>
> >> I have read through some of the documentation on getting started but seem
> >> to be missing something basic. How do I start Derby from the terminal and
> >> point it to my database folder? I tried the below method but it didn't
> >> work. How is the derby.system.home parameter entered while starting the
> >> database?
> >>
> >> [smartplant@SmartPlantWeb WEB-INF]$ startNetworkServer
> >> -derby.system.home=/greenWorldDB
> >> Wed Aug 01 13:38:03 EDT 2012 : Argument -derby.system.home=/greenWorldDB
> >> is unknown.
> >>
> >> Any tips would be appreciated. Thank you,
> >>
> >> Jordan
> >>
> >
> >
> --
> View this message in context: http://old.nabble.com/Starting-Derby-with-Database-
> tp34242141p34262881.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message