Hi,
I would like to start using VSDT for database development for an existing set of databases, I will also like to develop on the databases and for it to be in source control automatically. Here are my current blockers and questions.
As I have multiple databases, should I create one project per database. The nature of my work is that I can use any of the databases.
What is the best way to add the database objects into source control, create the project and then add this to source control ?
Lastly, I am experiencing the following errors during the build process after importing one of the databases.
SQL71561: Computed Column xxxx contains and unresolved reference to an object. Either the code object does not exist of the reference is ambiguous because it could refer to any of the following objects [LINKEDSERVER].[DATABASE].[dbo].[object_name] or [LINKEDSERVER].[DATABASE].[dbo]::[object_name]
Is the only solution here to export the entire linked server as a DACPAC file and add it as a reference, what if I do not have access directly to the remote linked server instance or if its not a SQL server database instance ?
create view [schema].[test]
as
select distinct
[ai].[account_id] as [service_account]
from
[linkedserver].[database].[dbo].[view_name] ai
where
stage = 'start'
and
srn not in (
select distinct
[ai].[account_id]
from
[linkedserver].[database].[dbo].[view_name] ai
where stage = 'progressing'
)
I get the error
SQL71561: Computed column [schema].[test].[service_account] contains and unresolved reference to an object. Either the object does not exist or the reference is ambigious becuase it could refer to any of the following objects. [linkedserver].[database].[dbo].[view_name].[account_id] or [linkedserver].[database].[dbo].[view_name].[ai]::[account_id]