How to use sp_sqlrefreshmodule?

Hi to all

I just change the user defined data type from smallint to int .

But i could not access any table it shows following error

"The parameter "@some" is not the same type as the type it was created with. Drop and recreate the module using a two-part name for the type, or use sp_refreshsqlmodule to refresh its parameters metadata. "

I dont know how to solve this error

Please help me Thanks in advance

more ▼

asked Apr 26, 2011 at 04:52 AM in Default

varun 1 gravatar image

varun 1
22 8 8 9

(comments are locked)
10|1200 characters needed characters left

1 answer: sort newest

In the error message it refers to 'the module' - you need to get the name of this, it could be a stored procedure, function, trigger or view. What T-SQL are you executing when you get this error?

Then use

sp_refreshsqlmodule 'YourModuleName'

to solve the problem.

Check this [MSDN/BOL page][1] for detailed info.

[1]: http://msdn.microsoft.com/en-us/library/bb326754.aspx
more ▼

answered Apr 26, 2011 at 05:03 AM

Kev Riley gravatar image

Kev Riley ♦♦
53.9k 47 49 76

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Apr 26, 2011 at 04:52 AM

Seen: 1697 times

Last Updated: Apr 26, 2011 at 04:52 AM