# stopSlave=true attribute

#### Function

Stops database replication on the slave system.

You can specify this connection URL attribute only if the network connection between the master and slave systems is down. If the network connection is working, the slave system accepts commands only from the master, so you must specify the stopMaster=true attribute on the master system to stop replication on both the master and slave systems.

When this attribute is specified, or when a stop-slave message is sent as part of the execution of the stopMaster=true attribute, all transaction log chunks that have been received from the master are written to disk. Both the slave replication functionality and the database are then shut down.

The Derby instance where this attribute is specified must be serving the specified database in replication slave mode.

For more information, see the topics under "Replicating databases" in the Derby Server and Administration Guide.

#### Combining with other attributes

You must specify a database name in the connection URL, either in the subprotocol or by using the databaseName=nameofDatabase attribute.

If authentication is turned on, you must also specify this attribute in conjunction with the user=userName and password=userPassword attributes. Authorization for the master database cannot be checked when the network connection is down, so the requirement that the user must be the database owner is not enforced.

You may not specify this attribute in conjunction with any attributes not mentioned in this section.

#### Examples

    -- stop slave from master using database name in subprotocol,
    --   authorization
    jdbc:derby:myDB;stopSlave=true;user=mary;password=little88lamb

    -- stop slave using databaseName attribute, no security
    jdbc:derby:;databaseName=myDB;stopSlave=true;

Parent topic: Setting attributes for the database connection URL