Adding Data Instances
A data instance contains an element for every single database defined in the grid. An element stores a portion of the data of a single database. The data may be distributed among a number of elements equal to the number of data instances defined in the grid.
Perform the following tasks to create data instances in a grid:
Note:
Remember that the operations described in the following topics only modify the latest version of the model and do not become part of the operational grid until those changes are applied. See Applying the Changes Made to the Model.
Create a Host for a Data Instance
As with a host associated with a management instance, for every system you intend to use to store a portion of the data of a database, you must manually add the system as a host model object. Likewise, you must provide the communication parameters (fully qualified domain or IP address) of the system. Although, each host can have more than one data instance, it is recommended that you only configure one data instance per host.
To create a data instance, you need to associate the host with a data space group. All data space groups must be associated with the same number of data instances. If you follow the recommendation of one data instance per host, all data space groups must be associated with the same number of hosts.
As mentioned in Adding the Standby Management Instance, the ttGridAdmin hostCreate command creates a host in the grid. You can associate the host with a data space group at host creation or later.
Create a host for a data instance and associate it with data space group 1. Ensure that you identify the fully qualified domain name or IP address of the host.
% ttGridAdmin hostCreate -internalAddress int-host3 -externalAddress ext-host3.example.com -dataSpaceGroup 1
Host host3 created in ModelNote:
If you do not specify a name for the host, TimesTen Scaleout sets the OS host name of the remote system as the name of the new host.
Figure 4-5 shows a graphical representation of the model of the grid1 grid after creating the host3 host.
Figure 4-5 The Model After Adding a Host for a Data Instance

Description of "Figure 4-5 The Model After Adding a Host for a Data Instance"
For more information on the ttGridAdmin hostCreate command, see
Create a
Host (hostCreate) in Oracle TimesTen In-Memory Database
Reference.
Create the Installation for the Data Instance
Every host must have an installation associated with it. A host can either have its own copy of the installation files or share an installation with one or more hosts through network-attached storage. For shared installations, an installation model object with the location of the shared installation files must be associated with the host. See Copying an Installation on Linux/UNIX in Oracle TimesTen In-Memory Database Installation, Migration, and Upgrade Guide.
The ttGridAdmin installationCreate command creates an
installation in the grid and associates it with a host.
Create an installation in a directory of your choice in the
host3 host, for example, the /grid
directory.
% ttGridAdmin installationCreate host3 -location /grid
Installation installation1 on Host host3 created in Model
Note:
-
If you do not specify a name for the installation, TimesTen Scaleout sets
installation1as the name of the installation. Any subsequent installation associated with the same host requires that you provide a name for it. -
If the management instance running the command has only one installation associated with it and the source for the installation files is not specified in the
-sourceoption of thettGridAdmin installationCreatecommand, TimesTen Scaleout copies the installation files from the installation associated with the management instance running the command.
Figure 4-6 shows a graphical representation of the
model of the grid1 grid after creating the
installation1 installation in the host3
host.
Figure 4-6 The Model After Adding an Installation for the Data Instance

Description of "Figure 4-6 The Model After Adding an Installation for the Data Instance"
For more information on the ttGridAdmin
installationCreate command, see Create an Installation
(installationCreate) in Oracle TimesTen In-Memory Database
Reference.
Create the Data Instance
The ttGridAdmin instanceCreate command creates an instance in the grid and associates it with a host and installation.
Create a data instance in the location of your choice in the host3 host, for example, the /grid directory.
% ttGridAdmin instanceCreate host3 -location /grid
Instance instance1 on Host host3 created in ModelNote:
-
If you do not specify a name for the instance, TimesTen Scaleout sets
instance1as the name of the instance. Any subsequent instances associated with the same host requires that you provide a name for it. -
Because the
host3host only has theinstallation1installation associated with it, theinstallation1installation is associated with theinstance1data instance by default and there is no need to specify the-installationoption. -
TimesTen Scaleout defines an instance as a data instance by default. Use the
-typemanagement option of thettGridAdmin instanceCreatecommand to create a management instance. -
TimesTen Scaleout creates a subdirectory with the instance name in the specified location. TimesTen Scaleout allocates all instance files in this subdirectory. For example, the instance files of the
instance1data instance are allocated in the/grid/instance1directory of thehost3host. -
TimesTen Scaleout sets the default values for the TCP/IP port numbers of the instance daemon and server (
6624and6625, respectively) if you do not specify a value for the port numbers. Use the-daemonPortor-csPortoptions of thettGridAdmin instanceCreateutility to set different values for the port numbers.
Figure 4-7 shows a graphical representation of the model of the grid1 grid after creating a data instance.
Figure 4-7 The Model After Adding a Data Instance

Description of "Figure 4-7 The Model After Adding a Data Instance"
For more information on the ttGridAdmin instanceCreate command, see
Create
an Instance (instanceCreate) in Oracle TimesTen In-Memory Database
Reference.
Create Data Instances by Duplicating the Configuration of an Existing Host
As mentioned in Adding the Standby Management Instance, you can create an instance (management or data) by duplicating the configuration of an existing host, including its associated installations and instances with the -like and -cascade options of the ttGridAdmin hostCreate command.
-
The
-likeoption identifies the host to be duplicated and associates the new host with the same data space group. You can override the data space group associated with the new host by providing different parameters in the-dataSpaceGroupoption. -
The
-cascadeoption duplicates the configuration of the installations and data instances associated with the specified host.
Create five data instances based on the same attributes defined for the host3 host and its associated installation and data instance. Also, associate two hosts with data space group 2 and two hosts with data space 3, instead of data space group 1. Ensure that you identify the fully qualified domain name of the new hosts.
% ttGridAdmin hostCreate -internalAddress int-host4 -externalAddress ext-host4.example.com -like host3 -cascade -dataSpaceGroup 2
Host host4 created in Model
Installation installation1 created in Model
Instance instance1 created in Model
% ttGridAdmin hostCreate -internalAddress int-host5 -externalAddress ext-host5.example.com -like host3 -cascade -dataSpaceGroup 3
Host host5 created in Model
Installation installation1 created in Model
Instance instance1 created in Model
% ttGridAdmin hostCreate -internalAddress int-host6 -externalAddress ext-host6.example.com -like host3 -cascade
Host host6 created in Model
Installation installation1 created in Model
Instance instance1 created in Model
% ttGridAdmin hostCreate -internalAddress int-host7 -externalAddress ext-host7.example.com -like host4 -cascade
Host host7 created in Model
Installation installation1 created in Model
Instance instance1 created in Model
% ttGridAdmin hostCreate -internalAddress int-host8 -externalAddress ext-host8.example.com -like host5 -cascade
Host host8 created in Model
Installation installation1 created in Model
Instance instance1 created in ModelNote:
-
If you do not specify a name for the host, TimesTen Scaleout sets the OS hostname of the remote system as the name of the new host.
-
Any additional option you define in the
ttGridAdmin hostCreatecommand will overwrite the attributes inherited from the existing host in the new host, as shown with the addition of the-dataSpaceGroupparameter in the command that creates thehost4andhost5hosts. -
Notice that the
ttGridAdmin hostCreatecommands that create thehost7andhost8hosts use thehost4andhost5hosts, respectively, as reference in the-likeoption.
Figure 4-8 shows a graphical representation of the model of the grid1 grid after duplicating the host3 host as the host4, host5, host6, host7, and host8 hosts and their associated installations and instances.
Figure 4-8 The Model After Duplicating an Existing Host

Description of "Figure 4-8 The Model After Duplicating an Existing Host"
For more information on the ttGridAdmin hostCreate command, see
Create a
Host (hostCreate) in Oracle TimesTen In-Memory Database
Reference.