Home Dashboard Directory Help
Search

Compile Stored Procedure containing coding errors but system returns "Command(s) completed successfully." by b4007


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


2
0
Sign in
to vote
Type: Bug
ID: 747517
Opened: 6/7/2012 5:29:57 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

I have a stored procedure in SQL 2012. Here is what happened. I renamed a table. Then opened a stored procedure that referrenced the table. Withoug updating the code I executed the Alter command to recompile the procedure with the expectation that an error would be thrown. However the system did not return an error message, even through intellisense highlights the incorrectly named table. This is worriesome. I need to compiler to throw an error message when attempting to Execute the Alter Procedure command.
Details
Sign in to post a comment.
Posted by annphilip on 2/18/2014 at 5:45 PM
Hi Sam -> I am also having the same issue. I created a stored procedure in T-SQL and in the select query i am using a database which is not on the same server say ABC. It is showing me error as intellisense but it is not giving error when i compile.

This has created a lot of issues, since none of the SP or function is giving me error when i use F5(complie) in SSMS and my code in .net is returing the error. This was never the case when i was using SQL Server 2005. Is there a setting on Server or SSMS which needs to be done to capture error at compile time ?

same code is as below

alter procedure testerror
begin
select * from ABC.dbo.Tb1
end
Posted by Microsoft on 11/16/2012 at 8:43 AM
Hi b4007

Thanks for writing in. We attempted to reproduce this issue, but it does not seem to reproduce with SSMS 2012 SP1. Can you confirm that this issue still exists? Can you also confirm this is a T-SQL stored procedure and not a SQLCLR stored procedure?

Thanks,
-Sam
Sign in to post a workaround.