2 Working with TimesTen Scaleout
This chapter focuses on working with TimesTen Scaleout in SQL Developer. For more information about TimesTen Scaleout, see "Overview of TimesTen Scaleout" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
Topics include:
Displaying the TimesTen Scaleout view
You can create, manage, and explore a TimesTen Scaleout grid and its components.
From the main SQL Developer page, click View, then TimesTen Scaleout to bring up the TimesTen Scaleout view page.
Note:
If the TimesTen Scaleout view option is unavailable, ensure that you have set the environment variables that are described in Setting environment variables for TimesTen and SQL Developer.
The TimesTen Scaleout view node displays in the bottom-left corner of the SQL Developer page.
Testing passwordless SSH configuration
Passwordless SSH (secure shell) is required between all hosts included within a grid in TT Scaleout, regardless of the type of instance (management instance or data instance) on each host. Passwordless SSH is also required for any host that is used as a scp
repository. For more information on configuring passwordless SSH and repositories, see "Setting passwordless SSH" and "Working with repositories", respectively, in the Oracle TimesTen In-Memory Database Scaleout User's
Guide.
SQL developer provides a tool to test that each host in the grid can access one another through passwordless SSH. To test the passwordless SSH connectivity between the hosts on a grid, perform the following:
You have successfully tested the passwordless SSH configuration between all hosts for a grid in TimesTen Scaleout. You can now create a grid.
Working with the grid
You can create a new grid, manage an existing grid, remove a grid from SQL Developer, and perform various grid operations.
Create a grid
You can create a grid using SQL Developer with either the Simple Grid Wizard or the New Grid option. The New Grid option is recommended for advanced users.
Before you create a grid:
-
Ensure that you have configured passwordless SSH for all intended hosts for your grid. See Testing passwordless SSH configuration for more information.
-
Ensure that there is a common instance administrator user ID and numeric UID across all intended hosts for your grid. For more information, see "Understanding the TimesTen users group and the operating system user" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
Ensure that you have configured Apache ZooKeeper for TimesTen Scaleout membership services. For more information, see "Configuring Apache ZooKeeper as the membership service" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
Consider these details when deciding whether to use the Simple Grid Wizard or the New Grid option:
-
While both options enable you to apply all grid model changes, you can only verify the model changes with the New Grid option.
-
Both the Simple Grid Wizard and the New Grid option create a TimesTen installation on every specified host based in the installation location that you specify.
-
Both the Simple Grid Wizard and the New Grid option create data instance locations on every specified host that does not have a data instance.
-
Only the New Grid option creates a management instance. For production deployments, it is highly recommended to create a standby management instance. Once TimesTen creates the management instance(s) on a grid, you can add data instances.
There are several restrictions that you should consider when deciding on the object names for TimesTen Scaleout. See "Grid objects and object naming" in the Oracle TimesTen In-Memory Database Reference for restrictions for object names within TimesTen Scaleout.
You can create a grid with one of these procedures:
Create a grid with the Simple Grid Wizard
Start the Simple Grid Wizard from TimesTen Scaleout view node by right-clicking the TimesTen Scaleout folder and selecting Simple Grid Wizard.
If you are using the Simple Grid Wizard for the first time, a Passwordless SSH dialog displays. If you do not want to see the Passwordless SSH dialog when you use the Simple Grid Wizard, select the Skip This Message Next Time check box. Then, click the Yes button. See Testing passwordless SSH configuration for more information on passwordless SSH setup.
Now, you can configure the active management instance. To configure active management instance for your grid:
Note:
You can configure the active management instance using either the Simple Grid Wizard or the New Grid option. For production systems, you should also create a standby management instance. See Create a new management instance for more information.
-
In the Name text field, type a name for your grid. The default name is
grid1
. -
Select a K-safety level from the K-safety list. A K-safety level of 2 or greater is recommended. For more information, see "K-safety" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
In the Membership Configuration field, specify a ZooKeeper membership configuration file. You can specify the path of the file in the text field or use the Browse button to locate a file. For more information about the ZooKeeper membership configuration file, see "Configuring Apache ZooKeeper as the membership service" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
By default, the Use Default check box sets the host name for the management instance to the same name that the operating system assigned to the host. To designate a new name for the host containing your management instance, deselect the Use Default check box and type a name in the Host Name field.
-
Provide the internal and external addresses for the management instance in the Internal Address and External Address fields. For more information on internal and external addresses for management instances, see "Internal and external networks" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
In the Instance Name field, type a name for your management instance. All instance names default to
instance1
. If the host names are different, the instance names are unique because each object type has its own namespace. Instance namespaces are per host and are referenced to ashost_name.instance_name
. You can provide a unique name for the management instance in the Instance Name field. For more details, see "Grid objects and object naming" in the Oracle TimesTen In-Memory Database Reference. -
In the Instance Location field, specify the directory where you want TimesTen to create the instance. TimesTen creates a directory with the instance name inside of the directory you specify. For example, if you have an instance name of
instance1
and an instance location of/TimesTen/instance/
, TimesTen creates your instance in the/TimesTen/instance/instance1/
directory. -
In the Daemon Port field, specify the port number for the TimesTen daemon. The default value is
6624
. -
In the Client/Server Port field, specify the port number for the TimesTen client/server. The default value is
6625
. -
In the Management Port field, specify the management port number. The default value is
3754
.The management port is the value for the TCP/IP port number of the active management instance.
-
In the Software Location field, specify the location of the TimesTen distribution file. You can specify the path in the text field or you can use the Browse button to locate the file.
-
In the Installation Location field, specify the directory where you want TimesTen to copy the distribution file. TimesTen copies and extracts the distribution file to a directory that is named based on the release number of TimesTen Scaleout. For example, if you are installing TimesTen Scaleout 22.1, the files are extracted to a
tt22.1.1.6.0
directory inside of the installation location that you specified. -
By default, the primary user group of the instance administrator owns the TimesTen installation. You can specify another user group by deselecting the Use Default check box and providing the user group name in the TimesTen Group field. All installations and instances in the grid are then owned by this user group.
-
In the Instance Administrator field, type the instance administrator of the management instance. The instance administrator on all included hosts must have a common user ID and numeric UID.
-
By default, the Use Password option is selected. Provide the password for the instance administrator in the Use Password field.
Note:
If you want to avoid specifying the password of the instance administrator, you can provide an SSH key file by selecting the Use SSH Key file option and then browse to select an SSH key file. You can generate an SSH key file.
-
To avoid SQL Developer prompts for the instance administrator password during future operations, select the Save Password check box.
SQL Developer can now validate your configuration. Locate the Next button.
-
Click Next.
Figure 2-1 Simple Grid Wizard dialog - Step 1 of 4
Description of "Figure 2-1 Simple Grid Wizard dialog - Step 1 of 4"SQL Developer validates your input values and displays a progress dialog. The validation can take a few minutes. If SQL Developer displays an error message, troubleshoot the error and click the Next button again to revalidate your input values.
The progress dialog closes and the Simple Grid Wizard dialog refreshes. You can now add data instances.
To add data instances to your grid:
Note:
When you add a data instance, SQL Developer actually adds a host, an installation, and a data instance.
-
Right-click the Data Instances folder and select New to add the information for a new data instance.
-
Accept the default or specify a host name in the Host Name text field. The Use Default check box defaults the host name for the data instance.
-
Provide the internal and external addresses for the data instance in the Internal Address and External Address fields. For more information on internal and external addresses for data instances, see "Internal and external networks" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
In the Instance Name field, type a name for your data instance. All instance names default to
instance1
. If the host names are different, the instance names are unique because each object type has its own namespace. Instance namespaces are per host and are referenced to ashost_name.instance_name
. You can provide a unique name for the data instance in the Instance Name field. For more details, see "Grid objects and object naming" in the Oracle TimesTen In-Memory Database Reference. -
In the Instance Location field, specify the directory where you want TimesTen to create the data instance.
-
In the Daemon Port field, specify the port number for the TimesTen daemon. The default value is
6624
. -
In the Client/Server Port field, specify the port number for the TimesTen client/server. The default value is
6625
. -
In the Installation Location field, specify the directory where you want TimesTen to copy the distribution file. TimesTen copies and extracts the distribution file to a directory that is named based on the release number of TimesTen Scaleout. For example, if you are installing TimesTen Scaleout 22.1, the files are extracted to a
tt22.1.1.6.0
directory inside of the installation location that you specified.Locate the Save button.
-
Click Save to save the configuration of your data instance.
Figure 2-2 Simple Grid Wizard dialog - Step 2 of 4
Description of "Figure 2-2 Simple Grid Wizard dialog - Step 2 of 4"You have successfully added a data instance. When you add a data instance, SQL Developer actually adds a host, an installation, and then a data instance. You can now add additional data instances.
You can add additional hosts with installations and data instances:
-
Add a new data instance.
Right-click the Data Instances folder and select New. Then, follow steps 2 through 9.
-
Duplicate the configuration of another data instance.
Right-click the data instance that you want to duplicate and select Duplicate. SQL Developer adds a new data instance with the same configuration values as the original data instance except for the host name, internal address, and external address. Ensure that you enter the values for the host name, internal address, and external address text fields.
You can remove a data instance by right-clicking the data instance that you want to remove and select Delete.
-
-
Once you have added all of your intended data instances to your grid, click Next.
SQL Developer validates your input values and displays a progress dialog. The validation can take a few minutes. If SQL Developer displays an error message, troubleshoot the error and click the Next button again to revalidate your input values.
The progress dialog closes and the Simple Grid Wizard dialog refreshes. You can now assign your hosts to data space groups.
Organize the hosts that contain one full copy of the data into a single data space group. Since there are k
copies of the data, there are an equal number of data space groups, which are numbered from 1 to k
. Set the k
value for the K-safety configuration of your grid. The hosts in one data space group should be physically separate from the group of hosts in another data space group. Thus, hosts in one data space group are more likely to fail together; hosts in separate data space groups are less likely to fail simultaneously. For more information on data space groups, see "Assigning hosts to data space groups" in the Oracle TimesTen In-Memory Database Scaleout User's
Guide.
Note:
Once you have assigned a host to a data space group and you have applied that change to the grid model, you cannot change the data space group of that host.
To assign hosts to data space groups:
Create a grid with the New TimesTen Scaleout option
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view. To create a new grid with the New TimesTen Scaleout option:
You have successfully created an active management instance for your grid. You can now add a standby management instance or more data instances.
Start a grid
You can start the components of a grid (such as databases, management instances and data instances).
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
Note:
If you load a database, start a management instance, or start a data instance and the progress dialog does not progress, you can cancel out of the progress dialog. Then, click Next and SQL Developer displays a warning message that a database is not loaded or an instance is stopped. Click Yes to proceed to the next startup step.
You have successfully started your grid. Note that you must open any database before attempting to connect to the database. See Perform database operations for more information.
Shutdown a grid
You can shutdown the components of a grid (such as databases, management instances and data instances).
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
Note:
If you unload a database, stop a management instance, or stop a data instance and the progress dialog does not progress, you can cancel out of the progress dialog. Then, click Next and SQL Developer displays a warning message that a database is loaded or an instance is started. Click Yes to proceed to the next shutdown step.
You have successfully shutdown the components of a grid (such as databases, management instances and data instances).
Add an existing grid to SQL Developer
You can add an existing grid created by the ttGridAdmin
utility to the TimesTen Scaleout view within SQL Developer. After which, you can manage this grid using SQL Developer.
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
You have successfully added an existing Grid to SQL Developer. You can now manage your grid in SQL Developer.
Remove a grid entry from SQL Developer
You can remove a grid entry from SQL Developer. This does not delete a grid and its objects from the hosts on which you installed the grid, but only removes the grid entry from the TimesTen Scaleout view.
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
You have successfully removed a grid entry from the TimesTen Scaleout view.
Working with the grid model
TimesTen Scaleout maintains a single central configuration of the grid within a model that describes the desired structure of a grid, not its current structure. The model represents the desired logical topology of a grid with model objects that is a complete list of all components of a grid, such as installations, hosts, databases, and instances.
SQL Developer enables you to work with a grid model. You can perform the following procedures with the grid model:
Apply grid model changes to the grid
After you add or remove objects to or from a grid model, you must apply these changes to the grid model. Changes made to the model do not immediately impact a grid until explicitly applied. After you apply the changes, TimesTen Scaleout implements the changes made to the latest version of the model into the operational grid. For more information, see "Central configuration of the grid" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
For example, if you add a new installation and data instance to the latest version of the model, applying the changes to the model performs all of the necessary operations to create and initialize both the installation and the data instance in that host.
Applying grid model changes to the grid is a resource intensive operation. If you plan on making multiple changes to the grid model, make all the changes to your grid model before applying the changes to the grid.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded:
You have successfully applied the grid model changes to your grid.
Export the grid model
You can export the current model of your grid. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully exported a grid model file.
Change the grid model that the grid view displays
You can select which grid model shows in the grid view of SQL Developer. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Right-click your grid node, select Grid Model, select Synchronize with, then select one of these options:
-
Latest: Shows all of the latest object changes that have not been applied to the grid model.
-
Current: Shows only the objects that have been applied to your grid model.
SQL Developer changes the grid model that your grid view displays.
View the changes to the grid model
You can view the differences between your current and latest grid model. The changes in the latest grid model are not yet applied. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Right-click your grid node, select Grid Model, then select Show Changes.
The Comparing current and latest grid model progress dialog displays.
-
If there are no changes between your current and latest grid model, the "Latest model is up to date with current model" message displays. Click Close.
-
If there are changes between your current and latest grid model, the Comparing current and latest grid model progress dialog closes and the Changes in current grid model dialog displays. You can now review the changes to your grid model and click Close.
Planning your grid
Before configuring a grid and database in TimesTen Scaleout, you must gather the information described in "Planning your grid" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
Working with hosts
You can add and remove hosts that you can use for data and management instances. You can also assign hosts to a data space and execute commands on hosts. You can perform the following procedures with hosts:
Add a host
Before adding a data or management instance to a host, you must first add that host to the grid model. It is recommended that you only configure one instance on each host. You can either add a host by manually specifying all configuration parameters or by duplicating the configuration of an existing host. Since you can only duplicate an existing configuration, you must manually configure at least:
-
The active management instance (with its associated host and installation). Note that the active management instance is created when the grid is created.
-
A single data instance (with its associated host and installation).
Topics include:
Manually configure a new host
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Duplicate configuration of existing host
You can duplicate the configuration of an existing host when creating a new host for an instance (management or data), including its associated installations and instances.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully duplicated a host, including its installation and instance. You do not need to create an installation or instance for this host.
Edit a host
You can edit the data space group and physical group of a host.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully edited a host.
Assign hosts to data space groups
You can assign hosts to data space groups as long as the host is not already associated with a data space group. Once a host is assigned to a data space group, you cannot reassign that host.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully assigned hosts to data space groups.
Execute a command on a host
You can execute commands on hosts that are a part of your grid. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Note:
The Execute command dialog enables you to select one or more hosts on which to execute commands. You can execute a command on multiple hosts simultaneously.
Delete a host
You can delete a host from your grid model. Before you delete a host, ensure that you have migrated all the data from the database of this host to other hosts in your grid.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully deleted a host.
Working with installations
You can create or delete an installation from a host that is part of your grid. You can perform the following procedures with installations:
Create a new installation
You can create a new installation on a host that is a part of your grid. 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.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Use existing source
The Use Existing Source option enables you to copy an existing TimesTen installation from a host that is part of your grid. Before selecting the Use Existing Source option, ensure that you have completed the steps up to step 3 from Create a new installation.
You have successfully created a new TimesTen installation.
New source
The New Source option enables you to use new distribution file from a host that is part of your grid. Before selecting the New Source option, ensure that you have completed the steps up to step 3 from Create a new installation.
You have successfully created a new TimesTen installation.
Delete an installation
You can delete an existing TimesTen installation from a host that is part of your grid.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully deleted a TimesTen installation.
Working with management instances
TimesTen uses one or two management instances to manage TimesTen Scaleout: an active management instance and a standby management instance.
-
All operations that use and manipulate the configuration of the grid must be performed from the active management instance.
-
It is recommended that you add a standby management instance to guard against failure and provide high availability for the management of your grid. TimesTen Scaleout automatically configures the second management instance as the standby.
When you create a grid through the Simple Grid Wizard or the New Grid option in SQL Developer, TimesTen creates an active management instance. For more information, see "Management instances" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
You can perform these management instance procedures:
Create a new management instance
You would create a new management instance to either:
-
Create a standby management instance to guard against failure and provide high availability for the management of your grid.
-
Create a management instance to replace an existing active or standby management instance (for example, if the management instance failed or if you wanted to retire the host of a management instance).
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
You have successfully created a TimesTen management instance.
Replace a management instance
You can replace a management instance with a new management instance. This is useful if an existing management instance fails or if you want to retire the host of an existing management instance and replace it with a new host.
You can only replace a management instance when your grid has both active and standby management instances.
If you replace the active management instance, TimesTen Scaleout promotes the standby management instance to the active management instance. Then, TimesTen Scaleout deletes your original active management instance and adds your new management instance as the standby management instance.
If you replace the standby management instance, TimesTen Scaleout deletes your current standby management instance and adds your new management instance as the standby management instance.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully replaced a management instance.
Switch the active and standby management instances
You can switch your current standby management instance to the active management instance of your grid. Before you attempt to switch the active management instance, ensure that you have two management instances for your grid. For more information on why you may want to switch the active and standby management instances, see "Managing failover for the management instances" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully switched the active management instance with the standby management instance.
Control the management instance
You can start or stop the standby management instance.
-
Normally, you start a standby management instance in this scenario: the active management instance fails, you promote the standby to active, then start the standby, which makes the original active management instance become the standby management instance. See Switch the active and standby management instances for more information.
-
You can stop the standby management instance either if the standby management instance has failed or if you want to stop the standby management instance for any reason (such as to reboot it or perform maintenance).
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully started or stopped a standby management instance.
Execute commands on the active management instance
You can open a shell terminal to execute commands on the host of your active management instance. This is useful to execute certain ttGridAdmin
utility commands that might not be supported by SQL Developer. For more information on ttGridAdmin
commands, see "ttGridAdmin" in the Oracle TimesTen In-Memory Database
Reference.
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
-
Right-click the name of your grid, select Execute, then select Shell.
SQL Developer displays a tab with a shell terminal. You can execute commands on the host of your active management instance through this shell terminal.
Working with data instances
You can create or delete a data instance from a host that is part of your grid.
Create a new data instance
Data instances store one element per database in the grid. A grid distributes the data within each database across data instances. For more information, see "Data instances" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
You can create a new data instance with a data instance wizard or directly on a specific host. Before creating a new data instance ensure that the hosts on which you create data instances for database distribution are assigned to a data space group. If you attempt to create a data instance on a host that is not assigned to a data space group, TimesTen Scaleout will not create that data instance. See Assign hosts to data space groups for more information on assigning a host to a data space group.
Use one of these options to create a data instance:
-
New data instance wizard: You can specify the host on which the instance is created.
-
New data instance on a specific host: You can select the host on which the instance is created before opening the dialog.
New data instance wizard
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
Right-click the name of your grid, then select New Data Instance.
Then follow the steps, starting on step 2, as described in Create a new management instance. Do not specify a management port since this is creating a data instance.
New data instance on a specific host
You can create a new data instance on a host that is part of your grid.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully created a TimesTen data instance.
Edit a data instance
You can edit the installation of a data instance.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully edited a data instance.
Start or stop an instance and server
You can start or stop a TimesTen instance and TimesTen server.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Execute a command on the host of a data instance
You can execute commands on a particular data instance. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Delete a data instance
You can delete an existing data instance from a host that is part of your grid.
Note:
You can only delete a stopped data instance. See Start or stop an instance and server for more information on stopping a data instance.
Before you delete a data instance, ensure that you have distributed all data off of this data instance to the other data instances. Before you delete a data instance, you must remove, replace or evict the data instances as part of decreasing the number of elements over which your data is distributed. This also requires more than just removing data instances from the current version of the model; you must also remove the elements of the data instances from the distribution map of the database. See Define the distribution map of a database for more information.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully deleted a TimesTen data instance.
Working with configuration files
You can import and export multiple configuration files for your grid.
Note:
If you have not imported a file for a specific configuration, you cannot export a file for that configuration.
-
Membership Configuration: This file contains configuration parameters for the membership service configuration for your grid. For more information on membership services, see "Overview of the TimesTen Scaleout membership service" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
Instance Configuration: This file contains configuration parameters that are used by each instance in the grid. For more information on this file, see "Import instance configuration attributes (instanceConfigImport)" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
SQLNet: This
sqlnet.ora
file contains configuration parameters for the grid to interact with an Oracle database through thettLoadFromOracle
utility. -
TNS Names: This
tnsnames.ora
file contains configuration parameters for the grid to interact with an Oracle database through thettLoadFromOracle
utility.
You can perform these operations with configuration files:
Import a configuration file
You can import multiple types of configuration files.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully imported a configuration file in the grid model.
Working with databases
You can create or delete a database from your grid.
When you decide whether to use the database wizard or not, consider that the database wizard automatically applies the grid model changes at the end of the wizard. If you want to verify the model changes before applying the grid model, create a database definition and then create your database from that definition.
You can perform the following procedures for databases:
Create a database with the database wizard
You can create a database in your grid either with the database wizard or from a database definition. See Work with database definitions for more information.
Before you create a database:
-
Ensure that you have a functional grid. See Create a grid and Add an existing grid to SQL Developer for more information.
-
Ensure that your grid has at least an equal number of data instances to the K-safety level of your grid. For example, if you have a K-safety level of
2
, you need to have at least two data instances. See Working with data instances for more information on adding data instances. -
Ensure that each of your data space groups are associated with an equal number of data instances. Hosts, not data instances, are assigned to data space groups. It is recommended that you have a single data instance on each host. See Assign hosts to data space groups for more information on assigning a host to a data space group.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully created a database in your grid.
Before you attempt to connect an application to the database, ensure that you open the database and create a user with the appropriate privileges to connect to the database. To open the database, see Perform database operations and Execute a command on a host for more information on opening a database and executing a command on a host, respectively.
To create a user for your database with SQL Developer, use the ttIsql
utility through the Execute command on a host dialog. You can execute this utility on any of the data instances of your database.
This command creates a user, terry
, with a password of terry
for the database, database1
. Then, terry
is granted admin
privileges.
ttisql -e 'CREATE USER terry IDENTIFIED BY terry;GRANT ADMIN TO terry;' DSN=database1
See "Managing Access Control" in the Oracle TimesTen In-Memory Database Security Guide for more information on creating users.
Work with database definitions
A database definition contains the description of a TimesTen Scaleout database. It defines the database name, as well as the attributes associated with the database. Once a database definition is added to the current version of the model, it can be used to create a database. For more information on the database definition file, see "Creating a database definition file" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
You can perform the following procedures with database definitions:
Create a database definition
You can create a database definition. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Note:
When you create a new database definition, TimesTen also creates a direct connectable for this new database definition. For more information, see "Create a connectable" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
You have successfully created a database definition and a direct connectable.
Note:
After creating a database definition, a database icon from your database definition displays under the Databases node of your grid node in SQL Developer. However, you are unable to perform database operation with this database until you create the database from your database definition. See Create a database from a database definition for more information.
Import a database definition
You can import a database definition file to load attribute values for your database definition. The database definition file must use .dbdef
as the file name extension. For more information on the database definition file, see "Creating a database definition file" in the Oracle TimesTen In-Memory Database Scaleout User's
Guide.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Create a database from a database definition
You can create a database from a database definition. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
If the database definition is already used for another database, SQL Developer displays an error message. You can only create a database from a database definition that has not been used to create another database.
You have successfully created a database from a database definition. You are now ready to specify the distribution map of the database. For more information, see "Defining the distribution map for a database" in the TimesTen In-Memory Database Scaleout User's Guide.
Before you attempt to connect an application to the database, ensure that you open the database and create a user with the appropriate privileges to connect to the database. See Perform database operations and Execute a command on a host, for more information on opening a database and executing a command on a host, respectively.
To create a user for your database with SQL Developer, use the ttIsql
utility through the Execute command on a host dialog. You can execute this utility on any of the data instances of your database.
This command creates a user, terry
, with a password of terry
for the database, database1
. Then, terry
is granted CREATE SESSION
privileges.
ttisql -e 'CREATE USER terry IDENTIFIED BY terry;GRANT CREATE SESSION TO terry;' DSN=database1
See "Managing Access Control" in the Oracle TimesTen In-Memory Database Security Guide for more information on creating users.
Edit a database definition
You can edit an existing database definition.
Before you edit an existing database definition:
-
If you want to edit a database connection attribute and there is a database that was created from the database definition you are editing, you must stop the database, destroy it, and recreate it with the new database connection attributes. Note that you will lose all data in that database if you destroy it.
-
If you want to edit a general connection attribute, edit the respective connectable since general connection attributes are associated with a connectable. See Edit a connectable for more information.
-
If you edit a first connection attribute of a database definition of an open database, these changes are not applied until you unload and reload the database. SQL Developer displays a warning message if your database is currently open when you edit the database definition. See Perform database operations for more information on closing and opening a database.
To edit a database definition, ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Expand the Grid Model option, expand the Database Definitions option, right-click the name of your database definition, then select Edit.
The Edit Database Definition dialog and the Checking if database exists progress dialog display.
-
If there is an open database that was created from the database definition you are editing, the Checking if database exists progress dialog closes and a Editing open database warning dialog displays. If you do not want to see the Editing open database warning for future operations, select the Skip This Message Next Time check box. Then, click OK.
-
If there is no open database that was created from the database definition you are editing, the Checking if database exists progress dialog closes.
Follow the steps as described in Create a database definition, starting with Step 3.
Export a database definition
You can export an existing database definition, which can be used to import the definition of a new database definition.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully exported a database definition file.
Delete a database definition
You can delete a database definition from your grid model. However, you cannot delete a database definition if it references an existing database. You must destroy the database first. See Destroy a database for more information.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully deleted a database definition.
Define the distribution map of a database
You can define the distribution map of a new database from a database definition. You can also redefine the distribution map of an existing database. You cannot access a database that is in the process of defining or redefining its distribution map. Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded. For more information, see "Defining the distribution map for a database" in the TimesTen In-Memory Database Scaleout User's Guide.
Note:
Redefining the distribution map of an existing database can take up to a few hours. Ensure that you do not need to access this database before redefining the distribution map.
You have successfully defined the distribution map of a database.
Perform database operations
You can start, load, open, stop, close, and unload the TimesTen database.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Expand the Databases option, then right-click the name of your database and select one of these options:
Note:
Depending on the current state of your database, you may be unable to perform a certain operation. If SQL Developer is unable to perform a specific operation, an error or warning message displays. For example, you cannot open a database that is already open.
-
Start: Loads every element of the database into memory of their respective hosts and enables the database for user connections. This option does the same thing as if you perform a load and open operation of the database.
-
Load: Loads every element of the database into memory of their respective hosts.
-
Open: Enables the database for user connections.
-
Stop: Disables new user connections to a database and unloads every element of the database from the memory of their respective hosts. This option does the same thing as if you perform a close and unload operation of the database.
-
Close: Disables new user connections to a database.
-
Unload: Unloads every element of the database from the memory of their respective hosts.
SQL Developer performs the operation that you selected. The operation can take a few minutes.
Note:
If you select the stop, close, or unload option, a warning dialog displays asking you to confirm that you want to continue with the operation.
-
For databases from a version prior to TimesTen Scaleout 18.1.2, the dialog contains a number hyperlink that you can click to view the current connections to your database.
-
For databases from TimesTen Scaleout 18.1.2 or higher, the dialog contains a Force All User Connections to Disconnect check box for the stop or unload options. If checked, SQL Developer will attempt to abort all user connections if it fails to terminate them by using the transactional and immediate modes. Forcing all users connections to disconnect may result in data loss.
A progress dialog displays in the lower right corner of the main SQL Developer window. If SQL Developer displays an error message, troubleshoot the error.
You can review the status of your database by double clicking the name of your database from the TimesTen Scaleout view region. If your database status is already open, you can click the refresh button that is located in the top left corner of the database status window to refresh your database status.
You have successfully performed an operation on the database.
Work with connectables
You can perform various operations with direct and client/server connectables. A connectable creates a DSN in the configuration files of every data instance. Applications may use this DSN to connect to the database. The connection attributes found in the DSN depend on the type of connectable. For more information about connection attributes, see "Connection Attributes" in the Oracle TimesTen In-Memory Database Reference.
There are two types of available connectables:
-
Direct connectable: Creates a system DSN with the connection attributes both defined in the database definition and the connectable.
-
Client/server connectable: Creates a client DSN with the
TTC_SERVER
attribute of one or all the data instances available plus the connection attributes defined in the connectable.For more information, see "Database connections" in the TimesTen In-Memory Database Scaleout User's Guide.
You can perform these operations with connectables:
Create a connectable
You can create direct and client/server connectables.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully created a connectable for your database.
Edit a connectable
You can edit an existing connectable.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Export a connectable
You can export an existing connectable. You can use this exported connectable file to import the definition of a new connectable.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully exported a connectable file.
View active connections to the database
You can view all active connections to a database. This is useful to determine if it is safe to perform certain database operations like destroying a database or closing a database.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
Destroy a database
You can destroy a database.
Before you destroy a database:
-
Ensure that you have migrated or backed up all data from the database. For more information, see "Migrating, Backing Up and Restoring Data" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
-
Ensure that the database is unloaded from memory. See Perform database operations for more information.
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully destroyed a database.
Working with repositories
In a grid, a repository contains a number of collections. A collection can be a backup of a database, a database export, or a set of saved daemon logs and configuration files. TimesTen Scaleout enables you to define a repository as a directory path mounted using NFS on each host or as a directory path that is not directly mounted on each host. Multiple grids can use a single repository as long as each grid is associated with that repository.
You can create and detach repositories from your grid. For more information about repositories, see "Working with repositories" in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
You can perform the following procedures with repositories:
Create a repository
Ensure that you are on the main SQL Developer page, that you have enabled the TimesTen Scaleout view, and that your grid node is expanded.
You have successfully created a repository. This repository is now available in the repositories folder of your grid model.
Inspecting logs
You can review the support and user logs on each instance in the grid. The logs can be useful in troubleshooting errors with your grid. For each instance that is part of your grid, you can view these logs:
-
Support Log
-
User Error Log
Ensure that you are on the main SQL Developer page and that you have enabled the TimesTen Scaleout view.
You have successfully reviewed the support log or user error log of the instances of your grid.