# OK, MAJOR problem here with 5.0.0.444.........

**URL:** <https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902>\
**Category:** Toad for SQL Server\
**Created:** [August 19, 2010, 4:21pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902 "2010-08-19T16:21:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 19, 2010, 4:21pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/1 "2010-08-19T16:21:14Z")

</div>

I am working on a SP. It is quite long (2800) rows. To work on it and trouble  
shoot issues of not returning the correct data and what not, I create an alter  
statement to the editor and then I comment out the top of an alter statement. I  
then find and replace the 4 variables (@StartDate, @EndDate, @Period, and @Year)  
with the values that I want and then I run the SP.

In Microsoft Management Studio, I will get 8003 rows. I run it in Toad 5.0.0.444  
and I only get 6849 rows. I run it in Toad 4.6 and I get 8003 rows. Now, while  
working on this SP in Toad 5.0 today, I probably had and error pop up like 5 or  
so times while typing in code where I was typing some database object name and  
then typed the dot “.” and I would get the error to pop up. I sent  
one to you earlier this week or last week. Because it happened while typing the  
dot, I am guessing this is a Code Complete error. When this error happened, Toad  
did not crash, but kept running. I would just click OK for the error and keep  
working. I had the same session of Toad open all day and using the same editor  
window.

So I closed Toad 5 and opened again and run the code for the SP and now it  
returns a correct row count. So something is amiss after I get this code  
complete error and thus cannot trust Toad 5.0 after this crash. I am willing to  
help anyway I can to stop this error, just let me know what I can do. I know it  
was discussed that since it is a intermittent error that it is going to be tough  
to chase down but I did not see these errors on 4.6. Tomorrow I will be working  
on this SP again most of the day and I will use 4.6 to see if I can get the same  
error to happen but I can guarantee that if I work in 5.0 for very long that  
this error will show it ugly face. So if I make it thru tomorrow in 4.6 without  
this error happening, then that might give you some place to start your bug  
search.

Please let me know if I can be of any help to you in your quest (pun intended)  
to solve this code complete bug.

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![eric\_hackett\_156](https://avatars.discourse-cdn.com/v4/letter/e/6bbea6/32.png) [@eric\_hackett\_156](https://forums.toadworld.com/u/eric_hackett_156)\
**Post date:** [August 19, 2010, 4:24pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/2 "2010-08-19T16:24:10Z")

</div>

Matt, this may be a Toad issue or not but as a fellow developer, I HIGHLY advise  
against writing an SP with that many lines of code. There’s got to be some way  
to break it down into smaller bits.

Thanks  
Eric L Hackett | 970.882.5510

---

<div class="post-metadata">

**Author:** ![IgorM](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/igorm/32/116_2.png) [@IgorM](https://forums.toadworld.com/u/IgorM)\
**Post date:** [August 19, 2010, 4:44pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/3 "2010-08-19T16:44:15Z")

</div>

Matt,

Can you post an error message or the exception stack of the error you were  
getting while typing “.”? Hank also reported the similar problem, we  
just want to know if it’s the same problem.

Thanks,

Igor.

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 5:38pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/4 "2010-08-19T17:38:46Z")

</div>

Yes,  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 5:38pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/5 "2010-08-19T17:38:46Z")

</div>

Yes,  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 5:48pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/6 "2010-08-19T17:48:49Z")

</div>

Eric, I was wondering about that, ask him for some links to back that up…

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

[hfreeman@msn.com](mailto:hfreeman@msn.com)

678.414.0090 my cell Primary  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 5:48pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/7 "2010-08-19T17:48:49Z")

</div>

Eric, I was wondering about that, ask him for some links to back that up…

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

[hfreeman@msn.com](mailto:hfreeman@msn.com)

678.414.0090 my cell Primary  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![IgorM](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/igorm/32/116_2.png) [@IgorM](https://forums.toadworld.com/u/IgorM)\
**Post date:** [August 19, 2010, 6:03pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/8 "2010-08-19T18:03:13Z")

</div>

… but I would like to take a look at Matt’s error message/exception  
stack anyway.

Igor.  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![IgorM](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/igorm/32/116_2.png) [@IgorM](https://forums.toadworld.com/u/IgorM)\
**Post date:** [August 19, 2010, 6:03pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/9 "2010-08-19T18:03:13Z")

</div>

… but I would like to take a look at Matt’s error message/exception  
stack anyway.

Igor.  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 19, 2010, 8:09pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/10 "2010-08-19T20:09:00Z")

</div>

Well, it is to pull accounting data. So I have to go to three systems, our  
accounting application, and two TMS applications. Each one of those I have to  
grab both AP and AR data. And the business rules are incredible! There must be  
40 of them. That is what happens when there is not a set standard for paying the  
customers and shippers. The accounting staff wants to run this at will. Yes I  
could easily take this and run each part and populate separate tables but the  
problem is I could have more than one accounting staff running this at one time  
and if the data was populating tables with temp data, they could trip over each  
other. Or I would have rather just populated a cube or reporting database each  
night but the accounting staff want to run this…look for issues. Run  
invoices…run again all in the same day. Having the data current as last night  
was no good for them….

Don’t worry, even though it is 2800 lines, a lot of it are comments,  
spaces between the AP and AR sections to make things readable , a lot of line  
wrapping to keep the code to  
sounds. For all it does, it takes less than 60 seconds to run to pull a whole  
lotta data together.

One time where I was reading some sql web page and guy said that the sql code  
they write, if it does not run in 1 second or less, it cannot be put on the  
production server. I laughed…that would eliminate about 99% of our queries  
and SP’s. Does not matter…my SQL server is sitting at 5 to 10%  
processer load most of the time.  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 19, 2010, 8:09pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/11 "2010-08-19T20:09:00Z")

</div>

Well, it is to pull accounting data. So I have to go to three systems, our  
accounting application, and two TMS applications. Each one of those I have to  
grab both AP and AR data. And the business rules are incredible! There must be  
40 of them. That is what happens when there is not a set standard for paying the  
customers and shippers. The accounting staff wants to run this at will. Yes I  
could easily take this and run each part and populate separate tables but the  
problem is I could have more than one accounting staff running this at one time  
and if the data was populating tables with temp data, they could trip over each  
other. Or I would have rather just populated a cube or reporting database each  
night but the accounting staff want to run this…look for issues. Run  
invoices…run again all in the same day. Having the data current as last night  
was no good for them….

Don’t worry, even though it is 2800 lines, a lot of it are comments,  
spaces between the AP and AR sections to make things readable , a lot of line  
wrapping to keep the code to  
sounds. For all it does, it takes less than 60 seconds to run to pull a whole  
lotta data together.

One time where I was reading some sql web page and guy said that the sql code  
they write, if it does not run in 1 second or less, it cannot be put on the  
production server. I laughed…that would eliminate about 99% of our queries  
and SP’s. Does not matter…my SQL server is sitting at 5 to 10%  
processer load most of the time.  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 8:54pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/12 "2010-08-19T20:54:55Z")

</div>

Matt, what is the possibility of having a reporting server, where the production  
database on server (A) is replicated by Log Shipping to sever(b) and the later  
is in READ-ONLY mode. SOOO reports and adhoc® could have all the Run-Fun they  
want by writing script and code against the R0 version … The Quest Logshipping  
systems, I have set up in the past, this worked great and was also another  
failsafe copy of the database that was never more than 15 mins behind because we  
wanted it that way.

Just a thought, for which you know I’d help if needed.

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

[hfreeman@msn.com](mailto:hfreeman@msn.com)

678.414.0090 my cell Primary  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 8:54pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/13 "2010-08-19T20:54:55Z")

</div>

Matt, what is the possibility of having a reporting server, where the production  
database on server (A) is replicated by Log Shipping to sever(b) and the later  
is in READ-ONLY mode. SOOO reports and adhoc® could have all the Run-Fun they  
want by writing script and code against the R0 version … The Quest Logshipping  
systems, I have set up in the past, this worked great and was also another  
failsafe copy of the database that was never more than 15 mins behind because we  
wanted it that way.

Just a thought, for which you know I’d help if needed.

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

[hfreeman@msn.com](mailto:hfreeman@msn.com)

678.414.0090 my cell Primary  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![hfreeman](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hfreeman/32/54_2.png) [@hfreeman](https://forums.toadworld.com/u/hfreeman)\
**Post date:** [August 19, 2010, 8:54pm UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/14 "2010-08-19T20:54:55Z")

</div>

Matt, what is the possibility of having a reporting server, where the production  
database on server (A) is replicated by Log Shipping to sever(b) and the later  
is in READ-ONLY mode. SOOO reports and adhoc® could have all the Run-Fun they  
want by writing script and code against the R0 version … The Quest Logshipping  
systems, I have set up in the past, this worked great and was also another  
failsafe copy of the database that was never more than 15 mins behind because we  
wanted it that way.

Just a thought, for which you know I’d help if needed.

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

[hfreeman@msn.com](mailto:hfreeman@msn.com)

678.414.0090 my cell Primary  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 7:03am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/15 "2010-08-20T07:03:45Z")

</div>

Yea, I thought about that as well. I would have to make another instance of SQL  
on that server as I only have one “production” database. This query  
was wrote by a different developer and when I have time, I would like to see if  
I could make it work. When she made it, it took like 15 minutes plus to run. Not  
acceptable. I worked on it and got it to less than 60 seconds with some  
tweaking. Now I would like to streamline it further but I think a re-think and a  
re-write from the ground up is in order.

If I get in a jam, you will be the first person I will call…… J  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 7:03am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/16 "2010-08-20T07:03:45Z")

</div>

Yea, I thought about that as well. I would have to make another instance of SQL  
on that server as I only have one “production” database. This query  
was wrote by a different developer and when I have time, I would like to see if  
I could make it work. When she made it, it took like 15 minutes plus to run. Not  
acceptable. I worked on it and got it to less than 60 seconds with some  
tweaking. Now I would like to streamline it further but I think a re-think and a  
re-write from the ground up is in order.

If I get in a jam, you will be the first person I will call…… J  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 7:43am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/17 "2010-08-20T07:43:27Z")

</div>

OK, now I am not sure what to do…I came in today, opened up a Toad 4.6  
session. Opened my query and ran it and only had like 4600 rows returned. Then I  
ran it in MSSMS and I got 8014 rows. I closed and opened Toad 4.6 and returned  
the correct rows……Now I don’t think I can trust Toad.

How do we troubleshoot this one?  
 ![image002.jpeg](https://global.discourse-cdn.com/quest/original/1X/ca60ef1b55129d126c1774d4371b31a0a5bd7429.jpeg)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 7:43am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/18 "2010-08-20T07:43:27Z")

</div>

OK, now I am not sure what to do…I came in today, opened up a Toad 4.6  
session. Opened my query and ran it and only had like 4600 rows returned. Then I  
ran it in MSSMS and I got 8014 rows. I closed and opened Toad 4.6 and returned  
the correct rows……Now I don’t think I can trust Toad.

How do we troubleshoot this one?  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 7:57am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/19 "2010-08-20T07:57:49Z")

</div>

Also, am I missing something on how the “like” filter is supposed to  
work in the grid?

You can see that I have two rows in the selection list that correspond to the  
filter I have selected which is two distinct rows in the result set (there are  
actually 4 rows that contain my value). Since this is a “Like” and  
not a “Begins With” or “Ends With”, I am assuming that  
if my selection is contained anywhere within the cell, it should display?

Please correct me if I am interpreting this wrong.

Thanks,

Matt

 ![image003.png](https://global.discourse-cdn.com/quest/original/2X/d/dadafbdab7c38213dea0fe2eeb4d08a50fd360f9.png)

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [August 20, 2010, 8:24am UTC](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902/20 "2010-08-20T08:24:27Z")

</div>

SEE ATTACHMENT  
 ![image001.gif](https://global.discourse-cdn.com/quest/original/1X/c419a4884cb60937895dfef6b4b6862a4a679db6.gif)

[Next page](https://forums.toadworld.com/t/ok-major-problem-here-with-5-0-0-444/11902.md?page=2)
