Skip to content

steinarb/derby-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run derby server from maven

This maven project is a convenient way for running derby without having to download and install it.

The maven project uses the maven plugin derby-maven-plugin to start the derby network server.

Usage example:

mkdir -p ~/git
cd ~/git/
git clone https://github.com/steinarb/derby-runner.git
cd derby-runner
mvn install
mvn derby:run

At this point derby server will be running and listening on port 1527 until Ctrl-C is pressed.

It is possible to connect to the server with a client such as e.g. Squirrel SQL using the url jdbc:derby://localhost/dbname (replace “localhost” with the hostname of the machine running the derby network server if connecting from a different computer, and replace “dbname” with the name of your database).

Note! Squirrel SQL requires a non-empty username and password on derby network connections, even if the server doesn’t require them. Use APP/APP for username/password (“APP” as the username will select the “APP” schema as the default schema, which is what you usually want, and the password can be any non-empty string).

It is also possible to start the derby ”ij” client from a sub-project of this project.

To get an “ij” client running and connected:

  1. open a new command line window, and type:
    cd ~/git/derby-runner/run-derby-ij/
    mvn exec:java
        
  2. Then connect to a an existing database named “dbname” on the local server:
    connect 'jdbc:derby://localhost:1527/dbname';
        

    If “dbname” doesn’t exist on the server, a new empty database can be created with the URL:

    connect 'jdbc:derby://localhost:1527/dbname;create=true;'
        
  3. Type commands at the “ij>” prompt, e.g.
    show tables;
        
  4. To end the “ij” session, give the command:
    exit;
        

License

The license for this git repository is Apache Public License v2.

See the LICENSE file for details.

About

Maven project that starts and runs a derby database network server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors