psCopyTables

Description

    This program copies column definitions of tables of one owner
to a target owner.  The target owner can be on a different SQL
server or database.
     By default, if the table has a clustered index, the clustered
index is copied along with the table definition.
     By default, the datatypes of columns are transferred in their
Sybase native datatypes.  If you want the transfer to occur using
your own user-defined types, then specify the -Ou option.   Nullness
and identity attributes are preserved.  Check constraints
and column defaults are also preserved.  However, if you need to
transfer bindings to defaults and rules that were created with
'create default' and 'create rule' commands, you need to run
psCopyDefaults, psCopyRules, psBindDefaults and psBindRules also.
     You can copy the indices to different segments with the -T
option.  With -T you specify the name of an input text file.  The
the text file contains a table with 4 columns.  I ignore the third
column.
Table        Segment       Non-clus Index Segment      Image/Text Segment
You can generate this file by running psGenerateSegmentMap.  An
example segment map is in:
/disk2/ceccareb/PS/dbaccess/demo/psGenerateSegmentMap
     If you do not put an entry for the segment column, I
assume you want the segment specified by the -X option.  If you don't
specify -X, the target segments are the same as the source segments.

 

Syntax

psCopyTables -Sserver -Uusername -Ppassword -Ddatabase
-Wowner -Nname
-starget_server -utarget_user -ptarget_pass -dtarget_db -wtarget_owner
-Tsegment_map -Xtable_segment -iimage_segment -Ifill_factor
-Rresults_file -Mresults_file_max_size
-Ooptions

 

Arguments

-S

Source Sybase Server Name

-U

Source Sybase User Name

-P

Source Sybase User Password

-D

Source Sybase Database

-W

Copy definitions of tables definitions belonging to 'owner' only [-U]

-N

Copy definitions of tables having pattern 'name' [!rs%]

-s

Target Sybase Server Name [-S]

-u

Target Sybase User Name [-U]

-p

Target Sybase User Password [-P]

-d

Target Sybase Database [-D]

-w

Make target indices owned by 'owner' [-W]

-T

Text file containing a table to segment map

-X

Target table/clustered index segment

-i

Target image/text segment

-I

Index fill factor

-F

Name of output Korn shell script [standard output]

-R

psSQL results file name [standard output]

-M

psSQL initial maximum size in bytes for results file [0]

-O

Options

 

Options

c

Do NOT copy clustered indices

t

Do NOT check for existence of target server

u

Use user-defined datatypes

 

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