DATACOPY(FreeTDS) FreeTDS (freetds reference manual) DATACOPY(FreeTDS)

# [NAME](#NAME)

`datacopy` — move table data between two servers

# [SYNOPSIS](#SYNOPSIS)

`datacopy` \[`-vdE`] {`-t` | `-a` | `-c` `owner`} \[`-b` `batchsize`] \[`-p` `packetsize`] \[`-S` `server/username/password/database/table_or_view`] \[`-D` `server/username/password/database/table`] \[`-T` `textsize`]

# [DESCRIPTION](#DESCRIPTION)

`datacopy` is a utility distributed with FreeTDS. `datacopy` will move table data from one server to another without the need for intermediate files. `datacopy` is much faster and more efficient than is freebcp out/in.

`datacopy` makes use of the db-lib bcp API built into FreeTDS. This API is also available to application developers.

`datacopy` can be used to migrate data between Sybase ASE and SQL Server or vice versa.

# [OPTIONS](#OPTIONS)

[`-t`](#t)

Truncate target table before loading data.

[`-a`](#a)

Append data to target table.

[`-c`](#c) `owner`

Create the target table with the same schema as the source table. `datacopy` will submit a ‘`CREATE TABLE`’ command on the target server using the specified owner in the command, e.g. ‘`CREATE TABLE owner.table (...).`’

[`-b`](#b) `batchsize`

The number of rows per batch of data copied. Each batch of data is effectively 'committed' to the database. The default is 1000.

[`-p`](#p) `packetsize`

The number of bytes, per network packet, sent to and from the servers. Increased packet size can enhance performance.

[`-T`](#T) `textsize`

Specify size of TEXT/IMAGE column from network.

[`-v`](#v)

Produce verbose output, including diagnostic timings.

[`-d`](#d)

Produce freetds TDSDUMP output. (Serious debug only!)

[`-S`](#S) `server/username/password/database/table_or_view`

The connection information for the source server and the location/name of the table (or view) to be copied. If not specified, `datacopy` prompts the user for the information.

[`-D`](#D) `server/username/password/database/table`

The connection information for the destination server and the location/name of the target table. If not specified, `datacopy` prompts the user for the information.

[`-E`](#E)

Keep identity values.

# [SEE ALSO](#SEE_ALSO)

[freebcp(1)](/man/os/freetds/freebcp.1), [defncopy(1)](/man/os/freetds/defncopy.1), [bsqldb(1)](/man/os/freetds/bsqldb.1), [tsql(1)](/man/os/freetds/tsql.1), *FreeTDS User Guide.*

# [HISTORY](#HISTORY)

`datacopy` first appeared in FreeTDS 0.64.

# [AUTHORS](#AUTHORS)

The `datacopy` utility was written by Bill Thompson ⟨thompbil@exchange.uk.ml.com⟩.

March 25, 2015 FreeTDS 1.5.20

---

Document: datacopy(1) from freetds 1.5.20-r0 (Chainguard OS)
Source: https://github.com/FreeTDS/freetds
