freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Executing a huge sql script
- Date: Mon, 18 Nov 2013 00:18:15 -0500
On Sun, 17 Nov 2013 00:14:30 +0000
Chris Kings-Lynne <Chris.Kings-Lynne AT navitas.com> wrote:
> Are there any plans to add host and port CLI options to bsqldb? It's
> a severe pain having to use service definitions :(
Hmm? Why is it more difficult to specify hostname & port once in
freetds.conf than it is to specify every time on the command line?
A little-known feature: if the argument to -S is not found in
freetds.conf, it is passed to DNS for resolution. On my system,
$ grep willow ~/.freetds.conf
$ TDSDUMPCONFIG=stdout bsqldb -S willow \
< /dev/null | sed -ne '/willow/p; /Final/,/port/p'
config.c:170:Getting connection information for [willow].
config.c:468:Looking for section willow.
config.c:288:[willow] not found.
config.c:468:Looking for section willow.
config.c:288:[willow] not found.
config.c:1060:Looking for server willow....
config.c:195:Failed to find [willow] in configuration files; trying
'SYBASE' instead.
config.c:209:Final connection parameters:
config.c:210: server_name = willow
config.c:211: server_host_name = willow
config.c:212: ip_addr = 192.168.5.17
config.c:213: instance_name = MSSQLSERVER
config.c:214: port = 1433
bsqldb: Msg 20009, Level 9 (OS error 61: Connection refused)Unable to
connect: Adaptive Server is unavailable or does not exist
You can control the port with TDSPORT. Or, you know, it's open
source.
--jkl
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K.
> Lowden Sent: Saturday, 16 November 2013 11:13 PM To:
> freetds AT lists.ibiblio.org Subject: Re: [freetds] Executing a huge sql
> script
>
> On Wed, 13 Nov 2013 01:19:45 +0000
> Chris Kings-Lynne <Chris.Kings-Lynne AT navitas.com> 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
> FreeTDS AT lists.ibiblio.org
> 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
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] Executing a huge sql script,
Chris Kings-Lynne, 11/12/2013
- Re: [freetds] Executing a huge sql script, Frediano Ziglio, 11/13/2013
-
Re: [freetds] Executing a huge sql script,
James K. Lowden, 11/16/2013
-
Re: [freetds] Executing a huge sql script,
Chris Kings-Lynne, 11/16/2013
- Re: [freetds] Executing a huge sql script, Konrad Hambrick, 11/17/2013
-
Re: [freetds] Executing a huge sql script,
James K. Lowden, 11/18/2013
-
Re: [freetds] Executing a huge sql script,
Chris Kings-Lynne, 11/18/2013
-
Re: [freetds] Executing a huge sql script,
David Chang, 11/18/2013
-
Re: [freetds] Executing a huge sql script,
Konrad Hambrick, 11/19/2013
- Re: [freetds] Executing a huge sql script, Chris Kings-Lynne, 11/19/2013
- Re: [freetds] Executing a huge sql script, Frediano Ziglio, 11/20/2013
- Re: [freetds] Executing a huge sql script, Konrad Hambrick, 11/27/2013
- Re: [freetds] Executing a huge sql script, Chris Kings-Lynne, 11/27/2013
- Re: [freetds] Executing a huge sql script, James K. Lowden, 11/27/2013
- Re: [freetds] Executing a huge sql script, Chris Kings-Lynne, 11/27/2013
-
Re: [freetds] Executing a huge sql script,
Konrad Hambrick, 11/19/2013
-
Re: [freetds] Executing a huge sql script,
David Chang, 11/18/2013
-
Re: [freetds] Executing a huge sql script,
Chris Kings-Lynne, 11/18/2013
- Re: [freetds] Executing a huge sql script, Patrick McCoole, 11/18/2013
-
Re: [freetds] Executing a huge sql script,
Chris Kings-Lynne, 11/16/2013
Archive powered by MHonArc 2.6.24.