From: Kalen Delaney on
As GO is the default batch separator, this seems to imply that your problem
had to do with what statements can and cannot be included in the same batch.
You might benefit by reading the documentation about batches in T-SQL.

--
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

"morphius" <morphius(a)discussions.microsoft.com> wrote in message
news:E07897E5-F4B2-45E0-89FB-122984E74B8E(a)microsoft.com...
> Jay,
> You are right. It was the ;'s and GO's. Thanks.
>
> "Jay" wrote:
>
>> Are you logically separating the statements with ;'s and placing GO at
>> the
>> end of logical blocks?
>>
>> Beyond that, you would have to build everything into a procedure and add
>> error checking (see @@ERROR, TRY & CATCH).
>>
>>
>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>> news:8490B9FC-4C70-4A24-95D4-EED5979B8727(a)microsoft.com...
>> >I have a .sql file with about at least 70-80 different sql
>> > statements in any order (insert, update, delete) . I ran it in ssms
>> > successfully, but it
>> > didnt run some of the statements. The statements that didnt run will
>> > only
>> > run
>> > successfully if run by itself. How do I ensure every statement
>> > successfull
>> > fires?
>> > I have read an article http://support.microsoft.com/kb/827575 about the
>> > output buffer.
>> > 1. How is the output buffer increase?
>> > 2. What is the size limit of the output buffer so that I can divide my
>> > big
>> > .sql file into several small ones?
>>
>>
>> .
>>
From: Jay on
Got a reference Kalen? I'm in study mode and could use the refresher.

"Kalen Delaney" <please_reply_on_newsgroups(a)domain.com> wrote in message
news:E878B949-453A-4564-8541-9AB92357ADA9(a)microsoft.com...
> As GO is the default batch separator, this seems to imply that your
> problem had to do with what statements can and cannot be included in the
> same batch. You might benefit by reading the documentation about batches
> in T-SQL.
>
> --
> HTH
> Kalen
> ----------------------------------------
> Kalen Delaney
> SQL Server MVP
> www.SQLServerInternals.com
>
> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
> news:E07897E5-F4B2-45E0-89FB-122984E74B8E(a)microsoft.com...
>> Jay,
>> You are right. It was the ;'s and GO's. Thanks.
>>
>> "Jay" wrote:
>>
>>> Are you logically separating the statements with ;'s and placing GO at
>>> the
>>> end of logical blocks?
>>>
>>> Beyond that, you would have to build everything into a procedure and add
>>> error checking (see @@ERROR, TRY & CATCH).
>>>
>>>
>>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>>> news:8490B9FC-4C70-4A24-95D4-EED5979B8727(a)microsoft.com...
>>> >I have a .sql file with about at least 70-80 different sql
>>> > statements in any order (insert, update, delete) . I ran it in ssms
>>> > successfully, but it
>>> > didnt run some of the statements. The statements that didnt run will
>>> > only
>>> > run
>>> > successfully if run by itself. How do I ensure every statement
>>> > successfull
>>> > fires?
>>> > I have read an article http://support.microsoft.com/kb/827575 about
>>> > the
>>> > output buffer.
>>> > 1. How is the output buffer increase?
>>> > 2. What is the size limit of the output buffer so that I can divide my
>>> > big
>>> > .sql file into several small ones?
>>>
>>>
>>> .
>>>


From: Jeroen Mostert on
Jay wrote:
> Kalen Delaney wrote:
>> As GO is the default batch separator, this seems to imply that your
>> problem had to do with what statements can and cannot be included in the
>> same batch. You might benefit by reading the documentation about batches
>> in T-SQL.
>>
> Got a reference Kalen? I'm in study mode and could use the refresher.
>
When people talk about "the documentation", they usually mean Books Online.
Third hit on Google for "books online batches" brings me to
http://msdn.microsoft.com/library/ms188037 and from there it links to
batches at http://msdn.microsoft.com/library/ms175502.

Now that we're aware of your presence, SQL Server Training Tiger Teams will
be sent to infiltrate your work environment and check up on you
periodically. You will have been expected to read Books Online and SQL
Server Internals in your spare time, and there will be quizzes. Failing them
will have... unpleasant consequences.

(Disregard the second paragraph.)

--
J.
From: Kalen Delaney on
Books Online should be your number one reference, whether you're in study
mode or not. Just open the documentation that is installed with SQL Server
and search for "Batches".

Or you can look at the Books Online online, starting with
http://msdn.microsoft.com/en-us/library/ms175502.aspx

--
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

"Jay" <spam(a)nospam.org> wrote in message
news:eeCISTqdKHA.4636(a)TK2MSFTNGP04.phx.gbl...
> Got a reference Kalen? I'm in study mode and could use the refresher.
>
> "Kalen Delaney" <please_reply_on_newsgroups(a)domain.com> wrote in message
> news:E878B949-453A-4564-8541-9AB92357ADA9(a)microsoft.com...
>> As GO is the default batch separator, this seems to imply that your
>> problem had to do with what statements can and cannot be included in the
>> same batch. You might benefit by reading the documentation about batches
>> in T-SQL.
>>
>> --
>> HTH
>> Kalen
>> ----------------------------------------
>> Kalen Delaney
>> SQL Server MVP
>> www.SQLServerInternals.com
>>
>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>> news:E07897E5-F4B2-45E0-89FB-122984E74B8E(a)microsoft.com...
>>> Jay,
>>> You are right. It was the ;'s and GO's. Thanks.
>>>
>>> "Jay" wrote:
>>>
>>>> Are you logically separating the statements with ;'s and placing GO at
>>>> the
>>>> end of logical blocks?
>>>>
>>>> Beyond that, you would have to build everything into a procedure and
>>>> add
>>>> error checking (see @@ERROR, TRY & CATCH).
>>>>
>>>>
>>>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>>>> news:8490B9FC-4C70-4A24-95D4-EED5979B8727(a)microsoft.com...
>>>> >I have a .sql file with about at least 70-80 different sql
>>>> > statements in any order (insert, update, delete) . I ran it in ssms
>>>> > successfully, but it
>>>> > didnt run some of the statements. The statements that didnt run will
>>>> > only
>>>> > run
>>>> > successfully if run by itself. How do I ensure every statement
>>>> > successfull
>>>> > fires?
>>>> > I have read an article http://support.microsoft.com/kb/827575 about
>>>> > the
>>>> > output buffer.
>>>> > 1. How is the output buffer increase?
>>>> > 2. What is the size limit of the output buffer so that I can divide
>>>> > my big
>>>> > .sql file into several small ones?
>>>>
>>>>
>>>> .
>>>>
>
>
From: Jay on
"Kalen Delaney" <please_reply_on_newsgroups(a)domain.com> wrote in message
news:ubSkznqdKHA.4112(a)TK2MSFTNGP06.phx.gbl...
> Books Online should be your number one reference, whether you're in study
> mode or not. Just open the documentation that is installed with SQL
> Server and search for "Batches".
>
Oh it is. The difference is the depth into a subject I go. When not in study
mode, I stop as soon as I get what I need. Hence, why I could know/guess at
the problem the OP had without being able to provide specific why's.

I know there is a difference between a ; and a GO and have a rough idea of
what it is (and just sort of do it semi-automagically), however, that don't
work worth s*** when taking a test.


> Or you can look at the Books Online online, starting with
> http://msdn.microsoft.com/en-us/library/ms175502.aspx
>
> --
> HTH
> Kalen
> ----------------------------------------
> Kalen Delaney
> SQL Server MVP
> www.SQLServerInternals.com
>
> "Jay" <spam(a)nospam.org> wrote in message
> news:eeCISTqdKHA.4636(a)TK2MSFTNGP04.phx.gbl...
>> Got a reference Kalen? I'm in study mode and could use the refresher.
>>
>> "Kalen Delaney" <please_reply_on_newsgroups(a)domain.com> wrote in message
>> news:E878B949-453A-4564-8541-9AB92357ADA9(a)microsoft.com...
>>> As GO is the default batch separator, this seems to imply that your
>>> problem had to do with what statements can and cannot be included in the
>>> same batch. You might benefit by reading the documentation about batches
>>> in T-SQL.
>>>
>>> --
>>> HTH
>>> Kalen
>>> ----------------------------------------
>>> Kalen Delaney
>>> SQL Server MVP
>>> www.SQLServerInternals.com
>>>
>>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>>> news:E07897E5-F4B2-45E0-89FB-122984E74B8E(a)microsoft.com...
>>>> Jay,
>>>> You are right. It was the ;'s and GO's. Thanks.
>>>>
>>>> "Jay" wrote:
>>>>
>>>>> Are you logically separating the statements with ;'s and placing GO at
>>>>> the
>>>>> end of logical blocks?
>>>>>
>>>>> Beyond that, you would have to build everything into a procedure and
>>>>> add
>>>>> error checking (see @@ERROR, TRY & CATCH).
>>>>>
>>>>>
>>>>> "morphius" <morphius(a)discussions.microsoft.com> wrote in message
>>>>> news:8490B9FC-4C70-4A24-95D4-EED5979B8727(a)microsoft.com...
>>>>> >I have a .sql file with about at least 70-80 different sql
>>>>> > statements in any order (insert, update, delete) . I ran it in ssms
>>>>> > successfully, but it
>>>>> > didnt run some of the statements. The statements that didnt run will
>>>>> > only
>>>>> > run
>>>>> > successfully if run by itself. How do I ensure every statement
>>>>> > successfull
>>>>> > fires?
>>>>> > I have read an article http://support.microsoft.com/kb/827575 about
>>>>> > the
>>>>> > output buffer.
>>>>> > 1. How is the output buffer increase?
>>>>> > 2. What is the size limit of the output buffer so that I can divide
>>>>> > my big
>>>>> > .sql file into several small ones?
>>>>>
>>>>>
>>>>> .
>>>>>
>>
>>