Sponsored Content
Full Discussion: Help with freetds
Special Forums UNIX and Linux Applications Help with freetds Post 302665253 by r4v3n on Monday 2nd of July 2012 08:26:05 AM
Old 07-02-2012
Help with freetds

Hi all,

I have an MS-Sql 2008 server. I need to perform a bulk insert of data (over 1 million records every hour) from an Ubuntu box. Doing this in python using pymssql takes about 30 seconds for every 100,000 records.

I've installed the freetds suite on this ubuntu box. While tsql and isql are able to connect and execute queries successfully, only freebcp keeps throwing a "Msg 2410, Level 2" "Cannot bcp with TDSVER < 5.0" error.

The same bcp tool (Microsoft's version) on a Windows XP virtual box on the same Ubuntu box, can insert to the SQL server without any problem the entire 1million records in just 30 seconds.

I've checked and re-checked every configuration for freetds. It's puzzling why tsql and isql work, but freebcp doesn't.

Any help/pointers on getting freebcp to work or how to get such large data inserted quickly is greatly appreciated.
 
tsql(1) 							 FreeTDS Utilities							   tsql(1)

NAME
tsql - utility to test FreeTDS connections and queries SYNOPSIS
tsql { -S servername [-I interface] | -H hostname -p port } -U username [-P password] [-o options] tsql -C DESCRIPTION
tsql is a diagnostic tool provided as part of FreeTDS. It uses the TDS protocol directly to connect to Sybase or Microsoft SQL Servers, and allows the user to issue queries that test the capabilities of FreeTDS. tsql is *not* a replacement for a complete isql, such as sqsh (www.sqsh.org). It is designed to rely on the lowest level FreeTDS library, tdslib, as a way to isolate potential bugs in the protocol implementation. tsql can be run in two ways, one which uses the freetds.conf and one which connects directly using the server's hostname and port. When -S is used, FreeTDS uses the freetds.conf (or equivalent) and environment variables in the normal way to determine the server's ip address and port. You can use -I to specify a filename, overriding FreeTDS's configuration file search algorithm. The -H and -p parameters are provided especially for troubleshooting new configurations (or servers). Use of these parameters causes FreeTDS to ignore any freetds.conf and environment variables. OPTIONS
-S servername the Database Server to which to connect. -I interface a freetds.conf or interfaces file describing servername -H hostname the DNS hostname of the server -p port the port at which SQL Server is listening -U username database login name. If username is not provided, a domain login is attempted for TDS 7+ connections. -P password database password. -L list server "instances" (with -H) -C prints some of the compile-time configuration parameters. -o options apply the options specified to every command. f No footer [result count] h No header [titles] t Print time v Print version q Quiet NOTES
Typing "exit", "quit", or "bye" (or ^D) exits tsql. Typing "version" displays the TDS protocol version. Command batches may be separated with "go" or "GO". If "GO", the version string is reported before executing the batch. After prompting for the password, tsql will attempt to connect to the remote server. tsql displays a counter indicating the number of seconds that it is attempting to connect. Typically, tsql should immediately respond with a '1>' prompt. If you see the counter (1, 2, 3, ...), most likely tsql is unable to connect to the indicated server. If you can connect with "tsql -S servername", your basic FreeTDS installation is working. If you have suggestions for ways to make tsql more useful as a diagnostic tool, please recommend them to the FreeTDS mailing list for con- sideration. HISTORY
tsql first appeared in FreeTDS 0.60. AUTHORS
The tsql utility was written by Brian Bruns. BUGS
Several, to be sure, now that it's documented. :) doc 13 November 2011 tsql(1)
All times are GMT -4. The time now is 11:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy