Starts replication of a database in slave mode. Before you specify this attribute, you must boot the database on the master system, freeze it, and then perform a file system copy of the database to the slave system.
The startSlave=true attribute does the following:
If replication is started successfully, an exception with the error code XRE08 is thrown. Hence, the startSlave=true attribute does not return a valid connection.
For more information, see the topics under "Replicating databases" in the Derby Server and Administration Guide.
You must specify a database name in the connection URL, either in the subprotocol or by using the databaseName=nameofDatabase attribute.
You may specify this attribute in conjunction with the slaveHost=hostname attribute. If you do not specify the slaveHost=hostname attribute, the default value is localhost.
You may also specify this attribute in conjunction with the slavePort=portValue attribute. If you do not specify the slavePort=portValue attribute, the default port value is 4851.
If authentication or authorization is turned on, you must also specify this attribute in conjunction with the user=userName and password=userPassword attributes. If authorization is turned on, the user must be the database owner.
You may not specify this attribute in conjunction with any attributes not mentioned in this section.
-- start slave using database name in subprotocol, default slave host -- and port, authorization jdbc:derby:myDB;startslave=true;user=mary;password=little88lamb
-- start slave using databaseName attribute, non-default slave host -- and port, no security jdbc:derby:;databaseName=myDB;startSlave=true;slaveHost=localhost; slavePort=4852