CREATE GATEWAYRECEIVER

Creates a gateway receiver to replicate data from a remote SQLFire cluster.

Syntax

CREATE GATEWAYRECEIVER receiver-name
(
  [ BINDADDRESS 'address' ]
  [ STARTPORT integer-constant ]
  [ ENDPORT integer-constant ]
  [ SOCKETBUFFERSIZE integer-constant ]
  [ MAXTIMEBETWEENPINGS integer_constant ]
) [ SERVER GROUPS ( server_group_name [, server_group_name ]*)]
receiver-name
A unique identifier for this receiver. You can use this identifier with the DROP GATEWAYRECEIVER statement to remove the receiver configuration if necessary.
BINDADDRESS
The network address to use for connections from gateway senders in other sites. Specify the address as a literal string value.
STARTPORT
The starting port number to use when specifying the range of possible port numbers this gateway receiver will use to for connections from gateway senders in other sites. SQLFire chooses an unused port number in the specified port number range to start the receiver. If no port numbers in the range are available, an exception is thrown.
The STARTPORT value is inclusive while the ENDPORT value is exclusive. For example, if you specify STARTPORT=50510 and ENDPOINT=50520, SQLFire chooses a port value from 50510 to 50519.
If you do not specify STARTPORT, the default value is 5000.
ENDPORT
Defines the upper bound port number to use when specifying the range of possible port numbers this gateway receiver will use to for connections from gateway senders in other sites. SQLFire chooses an unused port number in the specified port number range to start the receiver. If no port numbers in the range are available, an exception is thrown.
The ENDPORT value is exclusive while the STARTPORT value is inclusive. For example, if you specify STARTPORT=50510 and ENDPOINT=50520, SQLFire chooses a port value from 50510 to 50519.
If you do not specify STARTPORT, the default value is 5500.
SOCKETBUFFERSIZE
An integer value that sets the buffer size in bytes of the socket connection for this gateway receiver. If you supply a null value, SQLFire uses the default of 32768 bytes.
MAXTIMEBETWEENPINGS
An integer value that specifies the time interval to use between pings to connected WAN sites. This value determines the maximum amount of time that can elapse before a remote WAN site is considered offline. The default value is 60000 milliseconds.
SERVER GROUPS
A comma-separated list of server groups on which to deploy the gateway receiver.
Note: The server group names that you specify are converted to all-uppercase characters, even if you specify the names as quoted identifiers.

Example

Create a gateway receiver on any available port between 1530 and 1540, on data stores that are members of testreceivers:
create gatewayreceiver testreceiver (startport 1530 endport 1541) server groups (testreceivers);
0 rows inserted/updated/deleted
Create a second gateway receiver on in the server group productionreceivers:
create productionreceiver (startport 1540 endport 1551) server groups (productionreceivers);
0 rows inserted/updated/deleted
Query the GATEWAYRECEIVERS to determine the port number that SQLFire selected:
sqlf> select id, running_port, server_groups from sys.gatewayreceivers;
ID                  |RUNNING_PORT      |SERVER_GROUPS                                                                                                            |SERVER_GROUP                                                                                                                    
------------------------------------------------------------
TESTRECEIVER        |1538              |TESTRECEIVERS    
PRODUCTIONRECEIVER  |1544              |PRODUCTIONRECEIVERS                                                                                                             

2 rows selected