Starting the Network Server

To start the Network Server, you can invoke a script, a jar file, or a class.

Important: Always shut down the Network Server properly after use, because failure to do so might result in unpredictable side effects, such as blocked ports on the server.

You are strongly urged to enable user authentication and user authorization when you run a Network Server. For details on how to configure user authentication and authorization, see "Configuring user authentication" and "Configuring user authorization" in the Derby Security Guide.

You are also urged to install a Java security manager with a customized security policy. For details on how to do this, see "Configuring Java security," also in the Derby Security Guide. By default a security manager will be installed with a default security policy when a Network Server is started. This default policy file is called server.policy and is part of derbynet.jar. There is also a template.policy file in derbynet.jar which can be used as starting point for a customized server policy file. For more information about policy files, granting permissions, and property expansion, see "Default Policy Implementation and Policy File Syntax" at http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html and "Policy File Creation and Management" at http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html.

If you are running Java SE 7 or later, and if you start the Derby Network Server from the command line as described here, access to databases and to other Derby files is by default restricted to the operating system account that started the Network Server. It is possible to override this default behavior. For more information, see "Restricting file permissions" in the Derby Security Guide.

You can start the Network Server in any of the following ways:

The default system directory is the directory in which Derby was started. (See the Derby Developer's Guide for more information about the default system directory.)

You can specify a different host or port number when you start the Network Server by specifying an option to the command.

By default, the Network Server will listen to requests only on the loopback address, which means that it will only accept connections from the local host.

Related concepts
The Network Server and Java Virtual Machines (JVMs)
Accessing the Network Server by using the network client driver
Accessing the Network Server by using a DataSource object
XA and the Network Server
Using the Derby tools with the Network Server
Differences between running Derby in embedded mode and using the Network Server
Related tasks
Installing required jar files and adding them to the classpath
Shutting down the Network Server
Obtaining system information
Setting port numbers