1.1

Table Of Contents
For example, if you start a SQLFire server from the command line with sqlf, use the server-groups
property to specify the names of one or more server groups that the server should join:
sqlf server start
-server-groups=OrdersDB,OrdersReplicationGrp,DBProcessInstance1
In this example, the SQLFire server participates in three server groups: OrdersDB, OrdersReplicationGrp and
DBProcessInstance1. If this is the rst SQLFire member to dene a named server group, then SQLFire creates
the group and adds the new member after startup. If other SQLFire members in the cluster were booted using
the same server group, then SQLFire adds this new member to the existing group. If you specify no
-server-groups property, then SQLFire automatically adds the data store member to the default server
group.
If you start a SQLFire peer client from within a Java application, specify the server-groups property as
part of the JDBC peer client connection string. For example, use the connection URL:
jdbc:sqlfire:;mcast-port=33666;host-data=true;server-groups=OrdersDB,OrdersReplicationGrp,DBProcessInstance1
Starting and Conguring SQLFire Servers on page 223 and Starting SQLFire Servers with the FabricServer
Interface on page 109 provide more information about specifying boot properties.
Assigning Tables to Server Groups
When you create a new table, the CREATE TABLE statement can specify the server group to which the table
belongs.
A partitioned table is spread across all of the members of the specied server group. A replicated table is replicated
to all members of the server group. See Replicating Tables on page 69.
For example, the following command creates a replicated table on two server groups:
CREATE TABLE COUNTRIES
(
COUNTRY VARCHAR(26) NOT NULL,
COUNTRY_ISO_CODE CHAR(2) NOT PRIMARY KEY,
REGION VARCHAR(26),
) SERVER GROUPS (OrdersDB, OrdersReplicationGrp)
Tables in SQLFire are replicated by default if you do not specify partitioning.
If you do not specify one or more server group names, tables are partitioned or replicated across all members of
the default server group for that schema. This behavior may not be desirable in all situations. For example, if
the data in a replicated table changes frequently, the cost of maintaining a copy on each server in the default
group may be prohibitive. In this case, the application developer or system administrator can have several
members participate in a new, smaller server group to limit the number of replicas.
When two tables are partitioned and colocated, it forces partitions that have the same values for those columns
in the two tables to be located on the same member. Colocated tables must belong to at least one common server
group. As a best practice, you deploy colocated tables on exactly the same server groups. See Partitioning Tables
on page 59.
vFabric SQLFire User's Guide58
Managing Your Data in vFabric SQLFire