Description: If user authentication is disabled, a Derby database will shut down normally when the Network Server is shut down. If user authentication is enabled, you must explicitly shut down the database before shutting down the Network Server by specifying a valid Derby user name and password.
Keywords: Shutting down Network Server, from scripts, Network Server, shutting down

# Shutting down the Network Server

If user authentication is disabled, a Derby database will shut down normally when the Network Server is shut down. If user authentication is enabled, you must explicitly shut down the database before shutting down the Network Server by specifying a valid Derby user name and password.

The database can be shut down either directly, or by the Derby server.

- To shut down the Network Server by using the scripts that are provided for Windows systems, use:

      stopNetworkServer.bat [-h hostname] [-p portnumber]

- To shut down the Network Server by using the scripts that are provided for UNIX systems, use:

      stopNetworkServer [-h hostname] [-p portnumber]

  These scripts are located in the `$DERBY_HOME/bin` directory.

- Shutting down by using the command line
- Shutting down by using the API

Parent topic: Using the Network Server with preexisting Derby applications
Related concepts
The Network Server and JVMs
Accessing the Network Server by using the network client driver
Accessing the Network Server by using a DataSource
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
Starting the Network Server
Obtaining system information
Setting port numbers