Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #102 > unrolled thread
| Started by | Gene Wirchenko <genew@ocis.net> |
|---|---|
| First post | 2011-04-04 20:04 -0700 |
| Last post | 2011-04-05 22:44 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to comp.databases.ms-sqlserver
SQL Server 2008 SSMS Error Line Numbers Gene Wirchenko <genew@ocis.net> - 2011-04-04 20:04 -0700
Re: SQL Server 2008 SSMS Error Line Numbers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-05 08:47 +0200
Re: SQL Server 2008 SSMS Error Line Numbers Erland Sommarskog <esquel@sommarskog.se> - 2011-04-05 07:32 +0000
Re: SQL Server 2008 SSMS Error Line Numbers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-05 10:04 +0200
Re: SQL Server 2008 SSMS Error Line Numbers Gene Wirchenko <genew@ocis.net> - 2011-04-05 12:47 -0700
Re: SQL Server 2008 SSMS Error Line Numbers Henk van den Berg <hvandenberg@xs4all.nl> - 2011-04-05 21:56 +0200
Re: SQL Server 2008 SSMS Error Line Numbers Erland Sommarskog <esquel@sommarskog.se> - 2011-04-05 22:44 +0200
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-04-04 20:04 -0700 |
| Subject | SQL Server 2008 SSMS Error Line Numbers |
| Message-ID | <291lp6plrgb2on2h6madjkhd3o8idpc2fg@4ax.com> |
Dear SQLers:
Occasionally, I make an error and SSMS reports this.
Actually, I make a lot of them. There is a frustration that the
line number given by SSMS is rarely the line in my .SQL file since I
have a lot of GOs in it. I am putting together a simple database a
bit at a time, and I find it easier to drop it and restart on each
change so as to simplify debugging.
How do I find out the actual line number? If I am fortunate
enough to recognise the GO section where the error is, I can position
to the beginning and add the error line number given minus one to get
the actual line number. This is tedious. If I can not tell which GO
section met with disapproval, it is even worse. This is even more
tedious.
Please tell me that I am overlooking a setting. And what it is,
course. I will probably post the .SQL once I have finished. There
should be a few procedures in it worth snagging.
Sincerely,
Gene Wirchenko
[toc] | [next] | [standalone]
| From | Henk van den Berg <hvandenberg@xs4all.nl> |
|---|---|
| Date | 2011-04-05 08:47 +0200 |
| Message-ID | <4d9abb21$0$41117$e4fe514c@news.xs4all.nl> |
| In reply to | #102 |
With GO's intertwined in your .SQL file, I would recommend you debug the .SQL by selecting the batches one at a time and execute the selection. That works for me. On 05-04-2011 05:04, Gene Wirchenko wrote: > Dear SQLers: > > Occasionally, I make an error and SSMS reports this. > > Actually, I make a lot of them. There is a frustration that the > line number given by SSMS is rarely the line in my .SQL file since I > have a lot of GOs in it. I am putting together a simple database a > bit at a time, and I find it easier to drop it and restart on each > change so as to simplify debugging. > > How do I find out the actual line number? If I am fortunate > enough to recognise the GO section where the error is, I can position > to the beginning and add the error line number given minus one to get > the actual line number. This is tedious. If I can not tell which GO > section met with disapproval, it is even worse. This is even more > tedious. > > Please tell me that I am overlooking a setting. And what it is, > course. I will probably post the .SQL once I have finished. There > should be a few procedures in it worth snagging. > > Sincerely, > > Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Date | 2011-04-05 07:32 +0000 |
| Message-ID | <Xns9EBE610E94BACYazorman@127.0.0.1> |
| In reply to | #102 |
Gene Wirchenko (genew@ocis.net) writes: > How do I find out the actual line number? If I am fortunate > enough to recognise the GO section where the error is, I can position > to the beginning and add the error line number given minus one to get > the actual line number. This is tedious. If I can not tell which GO > section met with disapproval, it is even worse. This is even more > tedious. Double-click on the error message, and SSMS will do the rest of the work for you. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se 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
[toc] | [prev] | [next] | [standalone]
| From | Henk van den Berg <hvandenberg@xs4all.nl> |
|---|---|
| Date | 2011-04-05 10:04 +0200 |
| Message-ID | <4d9acd32$0$41110$e4fe514c@news.xs4all.nl> |
| In reply to | #105 |
DAMN! I've learned that a couple of months ago and I STILL forgot all about it when I read this question. Thanks for the slap over the forehead, Erland. On 05-04-2011 09:32, Erland Sommarskog wrote: > Gene Wirchenko (genew@ocis.net) writes: >> How do I find out the actual line number? If I am fortunate >> enough to recognise the GO section where the error is, I can position >> to the beginning and add the error line number given minus one to get >> the actual line number. This is tedious. If I can not tell which GO >> section met with disapproval, it is even worse. This is even more >> tedious. > > Double-click on the error message, and SSMS will do the rest of the work for > you. > >
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-04-05 12:47 -0700 |
| Message-ID | <4asmp6h3ahimk3lgfc8rj74e19p4qrtu4j@4ax.com> |
| In reply to | #105 |
On Tue, 5 Apr 2011 07:32:27 +0000 (UTC), Erland Sommarskog
<esquel@sommarskog.se> wrote:
>Gene Wirchenko (genew@ocis.net) writes:
>> How do I find out the actual line number? If I am fortunate
>> enough to recognise the GO section where the error is, I can position
>> to the beginning and add the error line number given minus one to get
>> the actual line number. This is tedious. If I can not tell which GO
>> section met with disapproval, it is even worse. This is even more
>> tedious.
>
>Double-click on the error message, and SSMS will do the rest of the work for
>you.
Thank you. This will save me a lot of trouble.
While a useful thing, it is *not* obvious. Except by accident, I
doubt I would have ever tried clicking on text. Microsoft HCI expert,
please pick up a white courtesy phone...
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Henk van den Berg <hvandenberg@xs4all.nl> |
|---|---|
| Date | 2011-04-05 21:56 +0200 |
| Message-ID | <4d9b741a$0$41114$e4fe514c@news.xs4all.nl> |
| In reply to | #124 |
On 05-04-2011 21:47, Gene Wirchenko wrote: > Thank you. This will save me a lot of trouble. > > While a useful thing, it is *not* obvious. Except by accident, I > doubt I would have ever tried clicking on text. Microsoft HCI expert, > please pick up a white courtesy phone... I highly agree with you Gene. Still, it's mentioned in the help though. (Not that I would ever have found it if I didn't look specifically for "error line") FWIW, here's the location: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_5techref/html/fae6327d-e268-44ae-a474-4a8f8f843129.htm Best, Henk
[toc] | [prev] | [next] | [standalone]
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Date | 2011-04-05 22:44 +0200 |
| Message-ID | <Xns9EBEE75C91D7EYazorman@127.0.0.1> |
| In reply to | #124 |
Gene Wirchenko (genew@ocis.net) writes: > While a useful thing, it is *not* obvious. Except by accident, I > doubt I would have ever tried clicking on text. Microsoft HCI expert, > please pick up a white courtesy phone... Dunno. It is certainly not the only environment where you can do this. In fact, I would go crazy if I came to environment where something like this was not available. But of course, if you have never seen the metaphor, it may not be that obvious to try. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
[toc] | [prev] | [standalone]
Back to top | Article view | comp.databases.ms-sqlserver
csiph-web