开发者

how to sp_refreshsqlmodule with procedure that are prefixed with a schema

开发者 https://www.devze.com 2023-01-09 10:17 出处:网络
When I try EXEC sp_refreshsqlmodule [myschema.myprocedure] i开发者_JS百科t throws Could not find object \'myschema.myprocedure\' or you do not have permission.If the object is schema-bound, then the m

When I try EXEC sp_refreshsqlmodule [myschema.myprocedure] i开发者_JS百科t throws Could not find object 'myschema.myprocedure' or you do not have permission.


If the object is schema-bound, then the metadata cannot become outdated because the object is bound to the underlying objects that it references.

EDIT: Based on your edit, the procedure name should be enclosed in single quotes:

EXEC sp_refreshsqlmodule 'myschema.myprocedure'


Found the issue I had to do it like this :

EXEC sp_refreshsqlmodule '[myschema].[myprocedure]'

0

精彩评论

暂无评论...
验证码 换一张
取 消