Import a Database (dbImport)

The dbImport command imports data from a specified previous export into the specified database. The dbExport and dbImport commands are used, for example, to migrate a database between two grids or between releases of TimesTen that are not patch-compatible.

ttGridAdmin dbImport dbname 
                     -repository reponame 
                     -name exportname 
                     [-ckptFreq mb]
                     [-updateStats]
                     [-estimateStats pct]
                     [-numThreads num]
                     [-batchSize rows]
                     [-dbCacheCredentialCheck]
                     [-errorTolerance level]

Options

The dbImport command has the options:

Option Description

dbname

Name of the database where the data is to be imported.

-repository reponame

Name of the repository where the export is located.

-name exportname

Name of the export to use for the import.

-ckptFreq mb

Checkpoint frequency, in terms of how many megabytes have been imported. A checkpoint is written each time that many megabytes have been imported. The default is to write no checkpoints during the import.

-updateStats

Updates statistics on each table as it is imported.

Also see Notes below.

-estimateStats pct

Estimates statistics on each table as it is imported, by reading the specified percentage of rows of each table.

Also see Notes below.

-numThreads num

Restores database objects in parallel using the specified number of threads. Valid values are 1 through 32. The default value is 4.

-batchSize rows

Specifies the number of rows processed simultaneously per thread. The default value is 256.

-dbCacheCredentialCheck

Verifies that the cache admin credentials have been set for the specified database before starting the import operation.

-errorTolerance level

Specifies the level of error tolerance. Valid values are 0 or 3. The default values is 0.

If you specify 0, there is no error tolerance. The command terminates the import operation after encountering an error. If the operation encountered an error, the operation is marked as Import_Phase_Failed upon termination, where Phase represents the last phase of the operation that the command attempted to complete.

If you specify 3, the command ignores any errors and completes the import operation. If the operation encountered an error, the operation is marked as Import_Complete_With_Errors upon completion.

Also see Notes below.

Examples

This example imports the export created in the example in Export a Database (dbExport), into a database imp_db1.

% ttGridAdmin dbImport imp_db1 -repository repo1 -name exp_db1
dbImport exp_db1 started

You can then use dbImportStatus to check progress, as shown in the example in Display the Status of a Database Import (dbImportStatus). The import is finished when each element and the database as a whole are indicated as complete.

Notes

  • The database must already be created and loaded and must have a distribution map, but must be closed, with all connections closed, when you run dbImport.

  • The import is performed asynchronously. Use the dbImportStatus command to check progress.

  • Only one dbImport command can run for a database at any given time, and dbImport cannot run concurrently with dbExport.

  • For disk space requirements, see Exporting and Importing a Database in Oracle TimesTen In-Memory Database Scaleout User's Guide .

  • If you specify both -estimateStats and -updateStats, statistics on imported tables are updated, not estimated.

  • Functionality of the -ckptFreq, -updateStats, and -estimateStats options is the same as for equivalent options of the ttMigrate utility. See ttMigrate.

  • If the export contains cache groups and the cache admin credentials have not been set for the database, the dbImport command prompts for the cache administration user id and password used for connecting to the Oracle database.

  • If you specify the -dbCacheCredentialCheck option and the cache admin credentials have not been set for the database, TimesTen returns an error. See Register the Cache Administration User Name and Password in the TimesTen Database in Oracle TimesTen In-Memory Database Scaleout User's Guide.

  • The import sets the autorefresh state to OFF and imports no data to cache groups. Once the import is complete, you will need to set the autorefresh state to PAUSED and load the cache groups. See Managing the Autorefresh State and Manually Load the Cache Group in the Oracle TimesTen In-Memory Database Scaleout User's Guide.

  • An export from a newer TimesTen release may contain unsupported features or SQL objects. Generally, any unsupported feature generates a warning and terminates the import operation. Use -errorTolerance 3 to have dbImport ignore the warning, skip the unsupported feature, and complete the import.