.\" Text automatically generated by txt2man-1.4.5 .TH FreeTDS "November 27, 2004" "0.63RC1" "" .SH NAME \fBfreebcp \fP- bulk loading utility for Sybase and Microsoft databases .SH SYNOPSIS .nf .fam C \fBfreebcp\fP [database.[owner].]table_name {in | out} \fIdatafile\fP { \fB-c\fP | \fB-n\fP | \fB-f\fP \fIformatfile\fP } [\fB-b\fP \fIbatchsize\fP] [\fB-F\fP \fIfirstrow\fP] [\fB-L\fP \fIlastrow\fP] [\fB-e\fP \fIerrfile\fP] [\fB-I\fP \fIinterfaces_file\fP] [\fB-m\fP \fImaxerrors\fP] [\fB-t\fP \fIfield_term\fP] [\fB-r\fP \fIrow_term\fP] [\fB-S\fP \fIservername\fP] [\fB-U\fP \fIusername\fP] [\fB-P\fP \fIpassword\fP] .fam T .fi .SH DESCRIPTION \fBfreebcp\fP is a utility program distributed with FreeTDS. \fBfreebcp\fP replicates (in part at least) the functionality of the "bcp" utility programs distributed by Sybase and Microsoft. .PP \fBfreebcp\fP makes use of the dblib bcp api built into FreeTDS. This api is also available to application developers. .PP The manual pages or online help for Sybase or SQL Server can be referenced for more detailed information on "bcp" functionality. .SH TABLES AND FILES .TP .B database is optional if the table being copied is in your default database or in master. Otherwise, you must specify a database name. .TP .B owner is optional if you or the database owner are the owner of the table being copied. .TP .B table_name is the name of the database table you wish to access. .TP .B in | out is the direction of the bulk copy operation. 'in' indicates that data is being copied from a host file into a database table, 'out' indicates that data is being copied from a database table to a host file. .TP .B \fIdatafile\fP is the full path name of an operating system file. .SH OPTIONS .TP .B \fB-c\fP specifies that the host data file is in 'character' format. Briefly, this means the following: that all data in the file is (or will be written) in ASCII; that the \t (tab) is the default field terminator; that \n (newline) is the default row terminator. .TP .B \fB-n\fP specifies that the host data file is in 'native' format. This is a format that \fBfreebcp\fP will be able to process, but is not portable or readable. .TP .B \fB-f\fP \fIformatfile\fP specifies that the format of the host data file is described by the specified \fIformatfile\fP. The format of \fIformatfile\fP is identical to that understood by Sybase or MS bcp, but is too complicated to describe here. .TP .B \fB-b\fP \fIbatchsize\fP is the number of rows per batch of data copied. Batching applies only when you are bulk copying into the database. each batch of data is effectively 'committed' into the database. the default value for \fIbatchsize\fP is 1000. .TP .B \fB-F\fP \fIfirstrow\fP is the number of the first row to copy from the input file or database table the default is the first row. .TP .B \fB-L\fP \fIlastrow\fP is the number of the last row to copy from an input file or database table the default is the last row. .TP .B \fB-r\fP \fIrow_term\fP specifies the row terminator. Default is newline ('\\n') .TP .B \fB-t\fP \fIfield_term\fP specifies the field terminator. Default is tab ('\\t') .TP .B \fB-S\fP \fIservername\fP specifies the name of the Database Server to which to connect. .TP .B \fB-U\fP \fIusername\fP specifies a database login name. .TP .B \fB-P\fP \fIpassword\fP specifies a database \fIpassword\fP. .RE .PP .SH NOTES To date, \fBfreebcp\fP has been tested against Sybase ASE 11, and SQL Server 2000. There are currently a number of restrictions on its use. .PP When connecting to a Sybase database server, it is required that the TDS 5.0 protocol be used. When connecting to a Microsoft SQL Server 2000 database server, the TDS 8\.0 protocol is required. .PP Theoretically both Sybase and Microsoft support the TDS 4.2 protocol, but in reality they implement the bcp portion of TDS 4.2 differently. Freetds has no way of knowing which type of server it's connected to, hence TDS protocol 4.2 is not supported. .SH HISTORY \fBfreebcp\fP first appeared in FreeTDS 0\.60 .SH AUTHORS The \fBfreebcp\fP utility was written by Bill Thompson (thompbil@exchange.uk.ml.com) .SH BUGS Currently, there is no support for text data types in \fBfreebcp\fP, when SQL Server 2000 is the target database. .PP The following parameters are accepted but unimplemented .RS .TP .B [\fB-e\fP \fIerrfile\fP] .TP .B [\fB-I\fP \fIinterfaces_file\fP] .TP .B [\fB-m\fP \fImaxerrors\fP]