SQL Server – Importance of Coding standards – FIX – Msg 15225, Level 11, State 1, Procedure sp_rename, Line 338 No item by the name of could be found in the current database, given that @itemtype was input as ‘(null)’.

Mostly we all know that sp_rename is a system stored procedure, which is used to rename an object in the sql server database. But I recently entered into the scenario where this stored procedure doesn’t work properly due to bad coding standards.

We can just look at this scenario,

I renamed a table “Bankloan” to “dbo.Bankloan” using sp_rename. But when I tried to rename it back to “dbo.Bankloan” to “Bankloan”, it throws the error.

After this I tried re-naming the column by putting tablename inside the square brackets and it worked fine. This post is just to make us to remember the Importance of the coding standards in the SQL Server.

print

Leave a Reply

Your email address will not be published. Required fields are marked *


× 1 = six