views:

17

answers:

2

When I try EXEC sp_refreshsqlmodule [myschema.myprocedure] it throws Could not find object 'myschema.myprocedure' or you do not have permission.

+1  A: 

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'
Joe Stefanelli
It didn't work ...
pdiddy
A: 

Found the issue I had to do it like this :

EXEC sp_refreshsqlmodule '[myschema].[myprocedure]'

pdiddy