Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2209
  • Last Modified:

Using sp_executeSQL in SQL 2008 Express give missing module error

Hi there,

I compiling a SPROC that calls sys.sp_executeSQL in SQL 2008 Express edition. It compiles but I get this error...

The module 'InsertRecords' depends on the missing object 'sys.sp_executeSQL'. The module will still be created; however, it cannot run successfully until the object exists.

If I look at Sys, I cant see the sproc there any ideas. Please dont tell me this is an Express issue and thats its only available in the professional edition...

thanks M
0
MickyMc
Asked:
MickyMc
1 Solution
 
AkAlanCommented:
I'm looking at SQL 2008 and I don't see sys.sp_executeSQL either so that probably isn't the issue.
0
 
Anthony PerkinsCommented:
>>I compiling a SPROC that calls sys.sp_executeSQL in SQL 2008 Express edition<<
That is because it is called sp_executesql, just remove the "sys." and you should be fine.
0
 
Ephraim WangoyaCommented:
use
dbo.sp_executesql
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
MickyMcAuthor Commented:
sorry ewanqoya, I used dbo but it didnt work. I can get it to work if I use Master.sys.sp_executesql but I havnt seen this syntax used in any of the examples?  Have I to grant permissions or something
0
 
Anthony PerkinsCommented:
>>I can get it to work if I use Master.sys.sp_executesql <<
Please read what I stated:
That is because it is called sp_executesql, just remove the "sys." and you should be fine.

Incidentally it is not "Master", but "master".   This is important in case you have a CS install.

You need to verify that you have access/permission to sp_executesql in the master database.
0
 
MickyMcAuthor Commented:
Yes acperkins. This is what I also think is the problem. What rights roles do I need to give to my user to use the sp_executesql. My user has a role of dbo. Thanks
0
 
Anthony PerkinsCommented:
Just that the user belongs to the Public role.
0
 
MickyMcAuthor Commented:
thanks all
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now