|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
stored procedures not "refreshed" in Query AnalyzerI create stored procedures in Notepad, then copy and paste them into a blank query window in Query Analyzer; then I click on the buttons to check the syntax and save the new procedure. From that point on QA will display the newest version of my procedures when I right-click on them and select "Edit". However, as of two days ago, when I edit and save a stored procedure, everything works as expected and I don't receive any error messages. BUT, when I reopen the stored procedure in QA, my changes do not appear! It's as if QA never updates the stored procedure in the database. HOWEVER, when I display the stored procedure in Enterprise Manager, my changes are there. I've even printed out all of my stored procedures to a .SQL file for examination, just to verify that all stored procedures have been saved with my modifications. I've closed and reopened QA numerous times; I've rebooted my PC at least a half dozen times, and yet the problem still persists. QA still shows older versions of stored procedures, as if they're stuck in some kind of database cache that won't clear. If anyone has seen this problem before and has a solution and/or work-around, please contact me ASAP. Thank You. Brian Connors DOB Systems, Inc. BConnors at dobsystems dot com Brian Connors (BrianConn***@discussions.microsoft.com) writes:
Show quote > I create stored procedures in Notepad, then copy and paste them into a I would strongly suspect that you are looking in the wrong database, > blank query window in Query Analyzer; then I click on the buttons to > check the syntax and save the new procedure. From that point on QA will > display the newest version of my procedures when I right-click on them > and select "Edit". > > However, as of two days ago, when I edit and save a stored procedure, > everything works as expected and I don't receive any error messages. > BUT, when I reopen the stored procedure in QA, my changes do not appear! > It's as if QA never updates the stored procedure in the database. > HOWEVER, when I display the stored procedure in Enterprise Manager, my > changes are there. I've even printed out all of my stored procedures to > a .SQL file for examination, just to verify that all stored procedures > have been saved with my modifications. > > I've closed and reopened QA numerous times; I've rebooted my PC at least > a half dozen times, and yet the problem still persists. QA still shows > older versions of stored procedures, as if they're stuck in some kind of > database cache that won't clear. > > If anyone has seen this problem before and has a solution and/or > work-around, please contact me ASAP. Thank You. possibly because you connected to a different server. Also check that you have not messed with the owner, so that you have the same procedure name under different owners. -- Erland Sommarskog, SQL Server MVP, esq***@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 I checked every database attached to that instance of SQL Server on our
network share - none of the modified stored procedures appear under any of them. I also checked ownership of the stored procedures. Since I had created them early in the morning using QA, and I left it running all morning. Thus, when I went to edit them I was still logged in as the same owner who created them. There's no versions of them under any other owner. Since I've edited all of them by using Enterprise Manager (not my tool of preference for this task), QA now shows the latest updated versions of the stored procedures. If it happens again, I'll be sure to bring it to this community's attention again. Brian Connors Show quote "Erland Sommarskog" wrote: > I would strongly suspect that you are looking in the wrong database, > possibly because you connected to a different server. Also check that > you have not messed with the owner, so that you have the same procedure > name under different owners. > > > -- > Erland Sommarskog, SQL Server MVP, esq***@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 > |
|||||||||||||||||||||||