Striim Migration Service for Google Cloud Documentation

Create the target tables

Before running the initial load application, you must create tables in the target that are compatible with those in the source. You may use any tool you wish.

If you choose to use SMSGC's schema conversion utility, the command is:

striim/bin/schemaConversionUtility.sh \
-s="oracle" \
-d="jdbc:oracle:thin:@//<IP address>:<port>/<SID or service name>" \
-u="<user name>" \
-p="<password>" \
-b="< database_name.% or a list of tables separated by semicolons>" \
-t="postgres"

The user you created as described in Create an Oracle user for SMSGC has the privileges necessary to run this command.

In Cloud SQL for PostgreSQL, create the target database, and in that database create a schema with the same name.

For detailed instructions on using the schema conversion utility, see Create target tables using SMSGC's schema conversion utility.

In the same schema, create a checkpoint table (required for SMSGC to support recovery of the initial load application):

create table chkpoint (
  id character varying(100) primary key,
  sourceposition bytea,
  pendingddl numeric(1), 
  ddl text);

After you have created the tables, give the SMSGC user you created as described in Create a user for SMSGC in the PostgreSQL target SELECT, INSERT, UPDATE, and DELETE privileges on the tables.