Start a new topic

MSSQL procedure not editable by DbVis after rename in SSMS

[This topic is migrated from our old forums. The original author name has been removed]

A problem I have noticed is that SQL Server stored procedures and functions cannot be edited in DbVis if they have been renamed using SQL Server Management Studio. This problem is actually not new to this Beta, but I thought this issue might possibly get fixed as part of the beta since you have fixed so many other issues :) Here are the steps to reproduce this problem: 1) Create a SQL Server stored procedure 2) Observe that it can be opened in the DbVis procedure editor 3) Open SSMS and select the stored procedure in Object Explorer 4) Press F2 (or right click / Rename) and change the procedure name 5) Refresh the DbVis Objects Tree 6) Open the stored procedure in the DbVis procedure editor 7) Observe that the procedure editor is blank The root cause of this behavior seems to be that SSMS is failing to update the procedure source in the database with the new procedure name. Presumably DbVis is parsing the procedure source and expecting the procedure name and the name contained in the source to match. The workaround for this problem is to open and save the procedure in SSMS or to rename the procedure back to its original name. A primary reason this conflict between SSMS and DbVis came to my attention is because both are being used by my development team. We generally prefer DbVis over SSMS for coding, but there are common tasks such as database refactoring which are much easier to accomplish in SSMS. While I do not expect DbVis to have all of the functionality of the native MS tool, it would be nice to have the ability to handle simple tasks such as renaming stored procedures and functions. The workaround I currently use to "rename" procedures is to clone the procedure by manually changing the procedure name in the editor and changing "ALTER PROCEDURE..." to "CREATE PROCEDURE...". Pressing Save in the procedure editor creates a copy of the procedure with the new name. Ideally DbVis would provide an easy means of copying or renaming procedures. Thanks, David

[This reply is migrated from our old forums.]

Re: MSSQL procedure not editable by DbVis after rename in SSMS
Hi David, Thanks for the detailed report. You analysis of the issue is correct. It will be fixed in the next Beta by parsing a second time without the object name if parsing with it fails. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: MSSQL procedure not editable by DbVis after rename in SSMS
Hans, Thanks for the quick response! Regards, David
[This reply is migrated from our old forums.]

Re: MSSQL procedure not editable by DbVis after rename in SSMS
David, This is now fixed in 90.1861. http://www.dbvis.com/download/beta/ Regards Roger