Home > SQL Developer: TimesTen Sup... > Load Data from an Oracle Da...
SQL Developer allows you to load data from an Oracle database into a TimesTen database without creating a cache grid, cache group, or cache table.
Before attempting to load data from an Oracle database into a TimesTen database:
Make sure you are using Oracle TimesTen In-Memory Database Release 11.2.2.4 (or later).
Make sure you have specified the Oracle connection information (Oracle Database Password and Oracle Net Service Name) for your TimesTen SQL developer connection. For more information on defining your TimesTen database connection, see " Defining a TimesTen database named connection" in the Oracle SQL Developer Oracle TimesTen In-Memory Database Support User's Guide.
To load data from an Oracle database into a TimesTen database, make sure you are on the main SQL Developer page and that your TimesTen connection is expanded.
Right-click the Tables option and select Load from Oracle Database Tables.
The Load from Oracle Database Tables dialog displays. Locate your Oracle database schema name from the navigation tree on the left of the Load from Oracle Database Tables dialog.
Click the + located next to your Oracle database schema name to expand the Oracle database tables list.
Your Oracle database schema expands showing a list of available Oracle database tables. Locate the Oracle database tables you want to load into the TimesTen database.
Right-click the name of the Oracle database table that you want to load into the TimesTen database and select Load. You can repeat this step, including for the same Oracle database table, to load multiple Oracle database tables.
If you want to load all of the Oracle database tables, right-click the Oracle database schema name and select Load All.The TimesTen Username dialog displays. Enter the TimesTen user for which you want to create the tables and click OK.
Your selected tables are added to the right pane and are displayed in a table format.
Review the selected Oracle database tables and edit any necessary fields. You can edit a field by double clicking it. A description of each column follows:
TimesTen Username
The owner of the TimesTen table that you are creating. By default, this is the TimesTen connection user. You can edit this column. An error message is displayed if the specified table owner does not exist or the TimesTen connection user does not have privileges to access the specified table owner.
TimesTen Table Name
The name of the TimesTen table that you are creating. By default, this is the same table name as the Oracle database table. You can edit this column.
Query to Run on the Oracle database
The SQL query executed on the Oracle database to generate the desired result set. By default, this is a SELECT * FROM oracledb_tbl query, where oracledb_tbl is the Oracle database table from which you are loading data. You can edit this column. For more information on valid Oracle Database SQL queries, see Oracle Database SQL Language Reference.
Row Count
The number of rows that TimesTen loads from the Oracle database table. This is the row count of the result set from the "Query to Run on the Oracle database" field. By default, this value is not counted.
To populate the Row Count field for a specific Oracle database table, right-click on the Row Count field for your table, then select Count.
To populate the Row Count fields for all the selected Oracle database tables, right-click on a Row Count field of any table, then select Count All. A confirmation dialog displays. Click Yes to continue with the row count of all of your previously selected Oracle database tables.
Create Table Statement
The SQL statement that TimesTen uses to create the table to load your Oracle database data. You cannot edit this column. Review the CREATE TABLE statement by double clicking on the Create Table Statement field.
If a TimesTen table with the same name already exists in the TimesTen database, the data from the Oracle database table is appended to the existing TimesTen table. TimesTen does not load table constraints from the Oracle database table. An error dialog displays if a TimesTen table with the same name but different table structure already exists in the TimesTen database.
Number of Parallel Loads
The number of parallel loads that will be used to load the Oracle database table into the TimesTen database. If the table contains less than 500, 000 rows the default value is one. If the Oracle database table contains more than 500, 000 rows the default value is two. You can edit this column.
TimesTen recommends the use of multiple parallel loads when you are loading a large number of rows. Multiple parallel loads speeds up the process of loading rows by having each parallel load import a subset of rows from the Oracle database table into the TimesTen database.
Number of Threads per Parallel Load
The number of parallel threads that will be used to load the Oracle database table into the TimesTen database. By default, the value is four. You can edit this column. An error dialog displays if you attempt to use a number of parallel threads that is less than two.
Status
The status of the data loading operation from the Oracle database to the TimesTen database. This value is empty before starting the load operation. Once you start the load tables from the Oracle database operation, this value can be IN PROGRESS, DONE, or FAILED.
Locate the Index Creation Policy at the bottom of the Load from Oracle Database Tables dialog.
Select the desired index creation policy from the Index Creation Policy drop-down list:
Copy all indexes from peer Oracle database table: TimesTen creates all of the indexes that exist on the peer Oracle database table. This is the default index creation policy.
Copy unique indexes only from peer Oracle database table: TimesTen creates all of the unique indexes that exist on the peer Oracle database table.
Do not copy indexes from peer Oracle database table: TimesTen does not creates any indexes.
Locate the Load button in the bottom right of the Load from Oracle Database Tables dialog.
Once you edit all of your desired fields, click the Load button.
A progress dialog displays. Verify that each field of the Status column of the Load from Oracle Database Tables dialog is marked as DONE.
If any Status field is marked as something other than DONE, make sure that all the data you entered is correct. Any status that is not marked as DONE indicates that an error occurred.
If all of the Status fields are marked as DONE, your TimesTen tables are created and populated with the Oracle database table data. Double click the DONE status to see more information regarding the imported indexes.
Locate the Close button in the bottom right of the Load from Oracle Database Tables dialog.
Click Close.
You have successfully loaded data from the Oracle database to the TimesTen database.