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/9277321

문제

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