Set up your environment to access a Derby database.
Derby refers to the DB2® database product that is based on the Apache Derby open source project from the Apache Software Foundation. Derby database support is embedded in the broker component on Windows® only.
This topic describes the processes, services, IP ports, and database files that are required to support Derby on Windows.
The Derby database has no associated security controls, and no optimizations have been performed. For these reasons, do not use Derby in a production environment.
A broker uses ODBC to connect to databases. Derby is a native Java™ database engine without ODBC support. The DB2 Run-Time Client provides the drivers that allow ODBC to access Derby databases. The DB2 Run-Time Client is used only for providing and managing the ODBC connection between a broker and the Derby database. It does not provide a DB2 database and therefore does not consume the resources that a full DB2 installation typically requires.
You must create and start a network server to enable access to Derby databases through ODBC from external programs. When you create the first Derby database using the mqsicreatedb command, a Windows service is also created. The service is called IBM MQSeries® Broker DatabaseInstanceMgr6. It starts automatically when Windows starts, and starts the network server. The service runs under the user name that you supplied with the mqsicreatedb command.
All Derby databases that you create using the mqsicreatedb command are served by one instance of the Database Instance Manager and network server. Before the network server can function, it requires a TCP/IP port number. The default port number for Derby is 1527 (use this port when you create a Derby database). You can specify a different port number when you issue the mqsicreatedb command to create a Derby database for the first time. However, you cannot subsequently change the port number after a network server has been set up, without first using mqsideletedb to remove all Derby databases.
Run the command mqsilist DatabaseInstanceMgr to produce a list all of the databases that have been created by the mqsicreatedb command. You can remove the Database Instance Manager and the network server after the last Derby database has been deleted, using the mqsideletedb command.
If you change the password for the user name under which the Windows service runs is changed, use the mqsichangedbimgr command to update the service with the new password. You can also use the mqsichangedbimgr command to change the user name of the service. Use the mqsistart and mqsistop commands to start and stop the Database Instance Manager component.
The number of databases that you can create with the mqsicreatedb command is limited only by availability of system resources. A maximum of one Database Instance Manager is created irrespective of how many databases have been created. If you have installed multiple instances of WebSphere® Event Broker on a single computer, all installations use a single instance of the Database Instance Manager component.
Use the mqsideletedb command to clear all resources created by the mqsicreatedb command. When the last Derby database is deleted, the Database Instance Manager and network server are also stopped and removed. If the database files cannot be deleted using the mqsideletedb command, you can delete them manually.