psCopyTableData

Description

     This program writes a script to copy tables from one database
to another.  The program uses Sybase's bcp to copy out the tables
and psBcpIntoTable to copy them into the target database.

 

Syntax

psCopyTableData -Sserver -Uusername -Ppassword -Ddatabase -Wowner -Nname
-starget_server -utarget_username -ptarget_password -dtarget_database -wtarget_owner
-Bbcp_out_directory -bbcp_in_directory
-Acolumn_delimiter_string -Yrow_terminator_string
-Ifill_factor_for_indices
-Foutput_Korn_script -Rresults_file -Mresults_file_max_size -Ooptions

 

Arguments

-S

Source Sybase Server Name

-U

Source Sybase User Name

-P

Source Sybase User's Password

-D

Source Sybase Database

-W

Use source database tables belonging to 'owner' - REQUIRED

-N

Use source database tables having pattern 'name' [!rs%]

-s

Target Sybase Server Name

-u

Target Sybase User Name

-p

Target Sybase User's Password

-d

Target Sybase Database

-w

Change ownership of tables in target database to 'target_owner'

-B

BCP Out directory

-b

BCP In directory [BCP out directory]

-A

Column delimiter string ['|' when -Oa specified]

-Y

Row terminator string [defaults to operating system standard terminator]

-I

Fill factor for target indices

-F

Name of output UNIX Korn shell script [standard output]

-R

psSQL results file [standard output]

-M

psSQL results file initial maximum size in bytes [0]

-O

Options

 

Options

o

Only write the bcp-out commands

i

Only write the bcp-in commands

p

The presence of BCP files for input is optional

a

Use character bcp.  Column delimiter is -A.

A

Use character bcp.  Use the tab as the column delimiter.

t

Truncate target database tables

v

Put time stamps on psSQL comments

c

Suppress target table compatibility test

d

Delete intermediate files at end (o and i required)

z

Do bcps for zero row count tables too

 

Environment Variables Behind the Scenes

DSQUERY

When -S is not specified.

SYB_USER

When -U is not specified.

SYB_PASS

When -P is not specified.

SYB_DATABASE

When -D is not specified.

PS_SYSMSG_FILE

Name of the tool's messages file.

 

Go to DBPowerSuite 7.9 List of Programs.


Updated: Thu Jun 18 21:12:26 2009