Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query needs "re altering" to work

Status
Not open for further replies.

wokkie

Programmer
May 9, 2003
52
GB
Hi,

Following importing lots of new data I have found that some of my queries only work after I "re alter" them in QA. By "re alter" I mean that I edit it and then run it without making any changes.

I expect the problem was caused by the import, but why do I need to "re alter" my queries for them to work?

Any explanations would be very welcome.

Thanks

Ian
 
I have run across this myself. If memory serves some of the errors are not picked up in QA. They are picked up when run as a Stored Procedure, and/or from Server Agent. It could be something as simple as the DB its assigned to, or the Table; and when you run it in QA it is set correctly. Do you remember the last time these queries were parsed? Did you try parsing them in Stored Procedure and/or Server Agent?

I am assuming you are parsing them in QA.
 
I can across the problem when I was running a report using the query in my app. I looked at the query in EM and it seemed fine.

I then edited and ran the query in QA, while making no chages, and it worked. Odd.

The query works fine now.

Is there a way to "re alter" all queries in one go, so that I can do a "fix all" if I think there is a similar problem in the future?

Cheers

Ian
 
Ian,

Is there a way to "re alter" all queries in one go, so that I can do a "fix all" if I think there is a similar problem in the future?

I personally do not know of a way, but I am pretty new to SQL Server(just a year). I am guess ingyou have a lot of queries and do not want to parse them one at a time?

The other thought I had is did you do any upgrades to the Server software that may need some jobs to be re-parsed?
 
I have many queries and do not relish the thought of right click edit, hit the green arrow over and over again...

The only change I can think of was the large import of data using using DTS...

Oh well.

Thanks for your help.

Ian
 
Ian,

Have you tested any other jobs to see if they are the same way? The large import of data, how many tables did it affect? It may only be the queries related to that.

Sure anytime :)
 
Everything sems to be working fine -

Fingers crossed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top