Bily Jiang

hi,

I have created some synonyms for the remoting(the other DB) tables through the linked server.

Everything is ok in my DB, and also when I use the linked server directly in my SP, solution can be compiled.

But I don't know why when I use the synonym to reference these tables, it raise the error:

Error TSD3033: [Function] dbo.F_CAL_REQUIRED_MIU_KM: Because [dbo].[F_CAL_REQUIRED_MIU_KM] depends on [dbo].[TB_SYS_VC].[MIU_EQ], deployment will fail if [dbo].[TB_SYS_VC] is deployed before [dbo].[F_CAL_REQUIRED_MIU_KM].
Error TSD3033: [Function] dbo.F_CAL_REQUIRED_MIU_KM: Because [dbo].[F_CAL_REQUIRED_MIU_KM] depends on [dbo].[TB_SYS_VC].[VC], deployment will fail if [dbo].[TB_SYS_VC] is deployed before [dbo].[F_CAL_REQUIRED_MIU_KM].
Error TSD3033: [Function] dbo.F_CAL_REQUIRED_MIU_KM: Because [dbo].[F_CAL_REQUIRED_MIU_KM] depends on [dbo].[tb_sys_other].[other_value], deployment will fail if [dbo].[tb_sys_other] is deployed before [dbo].[F_CAL_REQUIRED_MIU_KM].
Error TSD3033: [Function] dbo.F_CAL_REQUIRED_MIU_KM: Because [dbo].[F_CAL_REQUIRED_MIU_KM] depends on [dbo].[tb_sys_other].[other_name], deployment will fail if [dbo].[tb_sys_other] is deployed before [dbo].[F_CAL_REQUIRED_MIU_KM].

Anyone can help me

Thanks

Bily Jiang




Re: Visual Studio Team System - Database Professionals Cannot compile synonym for remoting tables by linked server

Jens K. Suessmeyer

Hi Bily,

Did you see the http://msdn2.microsoft.com/en-us/library/aa833270(VS.80).aspx

"Deployment will fail if your project contains database or server-qualified names and you select the Treat warnings as errors check box on the Build tab of the database project properties. This failure results because database or server-qualified names generate warnings. You must clear the Treat warnings as errors check box if you are using database or server-qualified names."

Perhaps CPT for SR1 would fix your problems, but Ignoring Warnings should work, as synonyms also use deferred name resolution.

Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---






Re: Visual Studio Team System - Database Professionals Cannot compile synonym for remoting tables by linked server

Bily Jiang

I checked the Treat warnings as errors checkbox, it's not be chosen.

The above msdn told us that:

When you create objects in Team Edition for Database Professionals, the objects are named according to the [schema].[object].[child] naming convention. In T-SQL, you can additionally qualify an object name by including the database name and the server name. Team Edition for Database Professionals has limited support for names that are database or server-qualified. If you create a stored procedure or a view that references an object that uses a database or server-qualified name, a warning appears. An error appears if the object is created in the design-time validation database and the referenced server was not added to your design-time validation database by using sp_addlinkedserver. Another error appears when you deploy the database project if you do not add an sp_addlinkedserver statement to the LinkedServers.sql pre-deployment script.

Note

To work around the issue, add a link to the referenced server to your design-time validation database. Then, in Solution Explorer, expand the Scripts folder, expand the Pre-Deployment sub-folder, and double-click the LinkedServers.sql file. In that file, add an "EXEC sp_addlinkedserver" statement for each server that you reference in your project. If your Script.PreDeployment.sql file does not include the LinkedServers.sql file, double-click the Script.PreDeployment.sql file to open it in the T-SQL editor and add the following line:

I have already created linked server in my local PC, also the checkbox hasn't been chosen, what else should I do to resolve this issue

Thanks

Bily Jiang






Re: Visual Studio Team System - Database Professionals Cannot compile synonym for remoting tables by linked server

tomsmi - MSFT

I think you might be running into a bug that we have fixed for our first Service Release.

Information (including documentation and how to download) on the service release can be found here:

http://blogs.msdn.com/gertd/archive/2007/05/04/public-ctp-of-vsdbpro-service-release-1-is-now-available.aspx