OS Manuals

/usr/bin/freebcp

FreeTDS is a set of libraries for Unix and Linux that allows programs to natively talk to Microsoft SQL Server and Sybase databases.

From freetds 1.5.21-r0 (os), captured 2026-11-09 by running freebcp --help (exit 1). permalink

usage:  freebcp [[database_name.]owner.]table_name|query {in | out | queryout } datafile
        [-m maxerrors] [-f formatfile] [-e errfile]
        [-F firstrow] [-L lastrow] [-b batchsize]
        [-n] [-c] [-t field_terminator] [-r row_terminator]
        [-U username] [-P password] [-I interfaces_file] [-S server] [-D database]
        [-v] [-d] [-h "hint [,...]" [-O "set connection_option on|off, ...]"
        [-A packet size] [-T text or image size] [-E]
        [-i input_file] [-o output_file]

example: freebcp testdb.dbo.inserttest in inserttest.txt -S mssql -U guest -P password -c
Options (26)
OptionDescriptionSource
-A packet_sizeSet the size of a TDS packet to packet_size.man
-D dbnameThe name of the default database to use.man
-EWrite the data in datafile to the table's IDENTITY column.man
-F firstrowThe first row to copy from the input file or database table.man
-I interfacesThe name and location of the interfaces file to search when connecting to servername.man
-L lastrowThe last row to copy from an input file or database table.man
-O optionsSQL text to set connection options prior to the bcp operation.man
-P passwordThe password associated with username.man
-S servernameThe name of the Database Server to which to connect.man
-T textsizeFor text or image columns, set the maximum number of characters to request from the server.man
-U usernameA database login name.man
-b batchsizeThe number of rows per batch of data copied.man
-cThe host data file is (or will be) in "character" format, i.e., a text file.man
-dTurn off any logging.man
-e errfileWrite errors to errfile.man
-f formatfileThe format of the host data file is described by formatfile.man
-h hintsSet bcp hints.man
-m maxerrorStop after encountering maxerror errors.man
-nThe host data file is in “native” format.man
-r row_termThe row terminator for a character file.man
-t field_termThe field terminator for character file.man
-vman
-VPrint the version information and exit.man
-i inputfileRead input data from file specified.man
-o outputfileWrite output data to file specified.man
-C charsetSpecify character set to use to talk to server.man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.