Re: Executing a huge sql script

Chris Kings-Lynne <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <a617adeb5c764e0285b3f28a8c12036f@HKXPR02MB007.apcprd02.prod.outlook.com>
Are there any plans to add host and port CLI options to bsqldb?  It's a severe pain having to use service definitions :(

Chris

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of James K. Lowden
Sent: Saturday, 16 November 2013 11:13 PM
To: [email protected]
Subject: Re: [freetds] Executing a huge sql script

On Wed, 13 Nov 2013 01:19:45 +0000
Chris Kings-Lynne <[email protected]> wrote:

> I'm trying to execute a huge sql script via tsql and although it can 
> execute from management studio, tsql just fails halfway though.
> There's no error, nothing.  It just finishes its 10th set of 1000 
> inserts (with GO between) and simply chooses not to continue on with 
> the next lot, in the same file.

I don't recommend tsql for that purpose; that's not its intended use.
tsql is primarily a diagnostic tool for testing the tds library independent of the client libraries.  That's why it has a bunch of weird options for bypassing the configuration files, for instance.  

I can't think of a reason offhand it would fail, though.  

I recommend bsqldb for non-interactive use.  The 'b' stands for "batch".  bsqldb will definitely report any errors and messages from the server, and will exit if a server message carries a serverity > 10.  

If that doesn't solve your issue, you'll need a TDSDUMP log.  

HTH.  

--jkl
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
--
Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.http://www.mailguard.com.au/mg
Click here to report this message as spam:
https://login.mailguard.com.au/report/1IopsmRIQy/1JMb0Wu5nPtoxNKJAt9tR/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.