psOCopyTableData

Description

     This program writes a SQL script, which when run using psOSQL,
dumps all table data to text files.  This programs also creates a
operating system script which when run, runs psOLoader for each
table.

 

Syntax

psOCopyTableData -Sdsn -Vserver -Uusername -Ppassword
-Dcatalog -Wowner -Ntable -Eexc_tables_pattern -Ilist_of_tables_file
-Zcolumn_delimiter_string -Yrow_terminator_string
-Xprefix_for_generated_scripts -Qsplit_dump_file_size -Rargs_for_psOLoader
-Mmax_log_size -Foutput_scripts_prefix -Ooptions

 

Arguments

-S

ODBC Data Source

-V

ODBC Server Name

-U

ODBC User Name

-P

ODBC User's Password

-A

ODBC Other Attributes

-D

ODBC Catalog (Database)

-W

Table belongs to this 'schema'

-N

Table having pattern 'name'

-E

Exclude tables having pattern 'exc'

-I

Input file containing list of tables names to copy

-x

Maximum image/text size [10000000]

-Z

Column delimiter string [|]

-Y

Row terminator string [operating system default record terminator]

-X

Output psOSQL scripts prefix [tables]

-Q

Maximum file size for each table before splitting [0]

-R

Arguments to pass to psOLoader (enclose in quotes) []

-M

Maximum log size. [0]

-F

Output log file [standard output]

-O

Options

 

Options

m

Use Data Direct ODBC drivers

w

Remove all leading and trailing white spaces

n

Make sure not-null columns will be not null.  Turn nulls to zeros or spaces.

N

For null columns as well, turn the values into zeros or spaces.

s

Include schema name with table names

1

Sort column names (case sensitive)

2

Sort column names (case insensitive)

u

Convert object names to upper case in SQL

l

Convert object names to lower case in SQL

o

Target database is Oracle

y

Target database is MySQL

 

Environment Variables Behind the Scenes

ODBC_DSN

When -S is not specified.

ODBC_SERVER

When -V is not specified.

ODBC_USER

When -U is not specified.

ODBC_PASS

When -P is not specified.

ODBC_ATTR

When -A is not specified.

PS_SYSMSG_FILE

Name of the tool's messages file.

PS_SYSPARAM_FILE

Name of the system parameter file

 

Notes

     If you specify a non-zero value for the -M argument, this program
write a SQL script which creates one directory for each tables' data, and
then creates an OS script which reads the data for a table from the table's
own directory.   -Q causes psOSQL to split a text dump into separate
files when the data exceeds -Q bytes.

 

Go to DBPowerSuite 7.9 List of Programs.


Updated: Thu Jun 18 21:12:26 2009