Re: long SQL lines for osql



I haven't been able to reproduce it locally - it always happens during
our production push... Then I have to execute it in QA for every
database we have which is a pain. The total file size is about 2 MB and
there is a go after pretty much each statement.

Erland Sommarskog wrote:
pb648174 (google@xxxxxxxxxxx) writes:
The error messages are bogus, i.e. it is stopping processing in the
middle of a line, i.e. "Ad" is not a column, when the line is doing
something with "Address". I'll try the -l option and see if that makes
a difference, but it doesn't seem like it would make a difference since
I am using standard name, i.e. nothing with brackets, quotes or spaces
in the names.

OK, it sounds like it chokes on something.

It could be the file size, but it could also be the batch size.

If it is the file size, you can split the file into several and then
include the files with ~r. (Well, maybe. It could choke on the total.
But you could try.)

If it is the batch size, maybe you can throw in more "go" of you have
very long batches.

I recall that we had an issue with INSERT-files that we generate
from Excel. I had to fix the tool, so that it added a "go" after
each 40th EXEC or so. But if memory serves, it was the ISQL/W 6.5
that had this problems.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

.



Relevant Pages

  • Re: Insert Error: Column name or number of supplied values does not match table definition.
    ... submitting the batch, ... You need to learn about parameterised statements. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)
  • Re: long SQL lines for osql
    ... it sounds like it chokes on something. ... It could be the file size, but it could also be the batch size. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: run Profiler on a specific SP/Query/Function
    ... events help you get a better grip over the flow? ... Do Starting events let you know if a batch is aborted due to an error any ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: Error converting a text field to a datetime datatype, who can figure this anyone????
    ... But since SQL Server thinks conversion error is reason enough for aborting ... the batch, that does not fly. ... Books Online for SQL Server SP3 at ...
    (microsoft.public.sqlserver.server)
  • Re: GO ...?
    ... client side command, which makes sense. ... I don't use GO statements as I have always assumed sql server will process ... I be concerned with processing it all as one 'batch' (i.e., ... there are also cases where you must not put commands ...
    (microsoft.public.sqlserver.programming)