Creating a file with the command options v55

To specify a text file that contains command line options and values, create an <options_textfile> file with the options you want to execute. Then run the runMTK.sh command with the -optionsFile <options_textfile> argument.

Note

You can store the <options_textfile> file in the same folder as the Migration Toolkit utility or in a directory of your choice.

Creating the text file - guidelines

Create a text file in a location that's accessible by the user performing the migration. Then, add one option per line following these guidelines.

Skip the dash

Use the same option syntax as in the command line options without the dash (-). The options file recognizes each line as a new parameter and doesn't require a dash as a delimiter.

Option in CLISupported syntax for the option in file
-tables hrtables hr

Use a line per option

Use a new line for each option. Use one line per key-value pair.

Option in CLISupported syntax for the option in file
-tables hr -allViews
-excludeViews all_emp,acct_list
tables hr
allViews
excludeViews all_emp,acct_list

Specify values for an option in a single line or multiple lines

You can add a single line with an option and multiple values for that option.

You can add several lines for the same option, each time with a different value.

And you can combine both approaches, because Migration Toolkit combines all lines that specify the same option.

Option in CLISupported syntax for the option in file
-tables TAB1,TAB2,TAB3tables TAB1
tables TAB2
tables TAB3
tables TAB1,TAB2,TAB3
tables TAB1
tables TAB2,TAB3
Note

Duplicating options is supported only for the options file.
When using -tables at the command line more than one time, only the last parameter is executed. For example, ./runMTK.sh -tables TAB2 -tables TAB3 includes only the TAB3 table in the migration.

Use a space or equal sign to provide values

For options that require values (key-value pairs), separate the option from the value with a space or an equal sign (=). Both syntaxes are supported.

Option in CLISupported syntax for the option in file
-views all_empviews=all_emp
views all_emp

Don't specify an option in the file and at the command line

Don't include an option in the options file if you're specifying it as a flag at the command line.

Specifying an option both at the command line and in the text file causes the migration to fail.

Order of processing

Migration Toolkit reads command line options and option files in the order you provide them when running the command. Ensure you add the schema scope as the last parameter at the command line.

For example, if you run the following command, Migration Toolkit first recognizes the -sourcedbtype oracle option, and then reads the contents of options_textfile in order from top to bottom. The last parameter is the <schema_scope>.

runMTK.sh -sourcedbtype oracle -optionsFile options_textfile <schema_scope>

Using an options file means that you can employ different syntaxes to perform a migration where parameters are executed in the same way. The following alternatives perform the same migration.

Alternative 1

runMTK.sh -sourcedbtype oracle -optionsFile <options_textfile> <schema_scope>

Where the content of the <options_textfile> file is:

tables=TAB1
dataOnly

Alternative 2

runMTK.sh -sourcedbtype oracle -optionsFile <options_textfile> -dataOnly <schema_scope>

Where the content of the <options_textfile> file is:

tables=TAB1

Other considerations

  • Commenting out Use a pound sign (#) to comment out a line. Migration Toolkit doesn't execute lines that are commented out.

  • Limitations Don't use quote marks.

  • Space processing Migration Toolkit removes spaces between an option and its value. When you separate an option from its value with a space, only one space is treated as a delimiter.

    For example, to run the -views all_emp, mgmt_list, acct_list command line option, you can add views all_emp,mgmt_list,acct_list or views = all_emp,mgmt_list,acct_list in the options file.

After you create the options file, execute the migration with it.