Using the ttbulkcp utility – Oracle Audio Technologies B31679-01 User Manual

Page 90

Advertising
background image

82

Oracle TimesTen In-Memory Database Installation Guide

% /opt/TimesTen/tt70/bin/ttMigrate -rx DSN=Salestt70

sales.dat

Using the ttBulkCp utility

The

ttBulkCp

utility copies table data between TimesTen data stores

and ASCII files. The data files used by

ttBulkCp

can only contain rows

from a single table. They also do not store the table’s column or index
definitions. Therefore, when migrating from one TimesTen data store to
another with

ttBulkCp

, you must first create the tables and indexes in

the new data store manually. Then use

ttBulkCp

to copy the rows from

the original data store to the new data store. For a description of the

ttBulkCp

syntax and usage, see

"Utilities"

in

Oracle TimesTen In-

Memory Database API Reference Guide

.

Note: The release of

ttBulkCp

must match the release of the data store

you are copying from or to. In this example, use

ttBulkCp

Release 6.0

to save the tables to disk files and use

ttIsql

and

ttBulkCp

Release 7.0

to copy the disk files into the tables of the new data store.

To import data from a data store created with TimesTen6.0:

1.

Find all the tables you want to copy into the new release of TimesTen.

2.

Use the TimesTen utility

ttBulkCp

to copy the data in each table to a

disk file.

3.

Define a data source name for the new data store.

4.

Use the CREATE TABLE and CREATE INDEX commands with

ttIsql

to recreate each table and index you are importing.

5.

Use the TimesTen utility

ttBulkCp

to copy the contents of the disk

file(s) into the table(s) of the new data store. If, for example:

• Release 6.0 is installed in:

/opt/

TimesTen6.0

/32

and release 7.0

is installed in /opt/TimesTen/tt70;

• Your DSN for release 6.0 is called

source600

and your DSN for

release 7.0 is

source_

tt70.

• You have a

ttIsql

script named

create.sql

that creates user tables

and indexes, or use the

ttSchema

utility to create the SQL statements

necessary for object creation; and

• You want to migrate the tables ABLE and BAKER from

source600

to

source_

tt70.

To copy the tables to disk files, you would execute the commands:

Advertising