TSD00563 Deployment may encounter errors because it depends on [sys].[sp_executesql] and it does not exist in the target database

StackOverflow https://stackoverflow.com/questions/8910403

I'm running into a very annoying issue. One of our SPROC is building up a dynamic bit of SQL which is then executed with sp_executesql (please let's not go into the issues with building up SQL strings for execution).

Using Visual Studio 2010 Database Project (aka. DataDude) to to schema comparisons and deployments and I'm getting the error below for the SPROC:

TSD00563 This deployment may encounter errors during execution because [dbo].[MYSPROC] depends on [sys].[sp_executesql] and [sys].[sp_executesql] does not exist in the target database

Does anyone know how I can get around this?

I have a reference to the master database schema file, but it makes no difference. Also, it's not referencing master, but sys instead.

Many thanks, Jaans

有帮助吗?

解决方案 2

Use a . prefix before the [sys].[sp_executesql]

Here's an example EXEC .sys.sp_executesql 'SELECT * FROM Table'

Strange indeed!

其他提示

"The issue you mentioned is a known issue, we had fixed this for RTM. And when you add a db reference to master .dbschema file, you need to make sure the database name part is choosed as literal and named "master""

http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/68b0ce97-5275-42af-b213-bd456ce882d7

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top