How to use MyEclipse Derby database server

Source: Internet
Author: User

The embedded MyEclipse Derby database allows you to instantly understand the persistence characteristics of your database in MyEclipse without having to spend time downloading, installing, and populating your own database. In this tutorial, you will learn how to:

    • Start and stop the MyEclipse Derby server
    • Connecting the MyEclipse Derby server
    • Custom Server

Duration: 10 minutes

No myeclipse? Download Now

1. Start the MyEclipse Derby server

To start the embedded Derby server, click the drop-down arrow and select MyEclipse derby> to start.

Start Derby

The message in console view confirms that the Derby server is started.

Derby-initiated status messages

To stop Derby, click the drop-down arrow and select MyEclipse derby> stop.

Stop Derby

As with startup, the closed confirmation message is also displayed in the console view.

Status information for Derby stop

Derby can also be controlled from the server view.

Controlling Derby from the server view2. Connect to Derby using the DB browser
    1. Switch to MyEclipse's Database Explorer perspective by selecting the Window>show perspective>myeclipse DB Explorer.
    2. Start the Derby server.
    3. In the DB browser, right-click the MyEclipse Derby Driver and select Open Connection.

Note : If you do not see the MyEclipse Derby driver, see the Recovery MyEclipse Derby driver later in this article.

You can use any of the other databases of MyEclipse as you would with an embedded derby database. For more information, see the tutorials listed on the database Development page.

MyEclipse Derby comes with a sample database named MyEclipse. The database contains two sample patterns, Classiccars and MyBlog. Other modes are visible in Derby's system architecture.

Connect to Derby using the MyEclipse Derby driver3. Configuring the embedded Derby server

To open the Derby configuration page, double-click the MyEclipse Derby Server in the server view.

Configure Derby

Home Directory : This is the location where the database is stored in Derby, and the folder is created in the specified location with your database name. By default, the home folder is set to /.myeclipse/derby.

Port : This is the connection port on which the Derby network server listens for input. By default, the Derby default port is set to 1527.

Recover MyEclipse Derby driver : Click this button if you change the port or undo other modifications to the MyEclipse Derby driver. If the MyEclipse Derby driver does not exist, create one.

Restore the sample database : This will create/restore the sample MyEclipse database in the Derby home folder. This action destroys the modifications made in any mode of the default MyEclipse database. Make sure that derby is turned off before you try this operation.

startup : By default, the MyEclipse Derby server starts when you open the JDBC connection. If you need to start the server before you establish a connection, you can disable the server auto-start option by other means. You can also set a millisecond wait for the server to start after the JDBC connection.

4. FAQs

Will any of my changes in the eclipse session be saved to the database?

Yes, as described above, the modifications are saved to the disk on which the Derby home directory resides.

Can I connect to the same database from other myeclipse facilities or workspaces?

Yes, all myeclipse facilities are started and connected to the same database, unless otherwise configured. If an embedded Derby server is started in an instance of MyEclipse, then another running instance of MyEclipse can connect to it, but the derby server for that instance does not start, and any other application can connect to the database. Note that the Derby server will also shut down if the MyEclipse instance starts a derby server shutdown.

Note : pointing to the same database may cause database corruption and should avoid starting multiple derby servers.

What is the meaning of the user name of the MyEclipse derby driver?

The user name is considered the default mode, and any unqualified table references are directed to the default mode. The default user name is Classiccars, and the default mode provides Classiccars mode.

What password can I use?

Any non-empty string can be used as a password.

5. Resources
    • Derby Documentation

MyEclipse official Chinese online line, welcome to download Communication!

How to use MyEclipse Derby database server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.