开发者

Database Project; Cross-Database Intellisense

开发者 https://www.devze.com 2023-03-19 20:49 出处:网络
I\'ve been trying to move all my SQL databases to VS 2010 SQL Server 2008 database projects this weekend and have noticed that Intellisense is messed up when setting up cross-database relationships. N

I've been trying to move all my SQL databases to VS 2010 SQL Server 2008 database projects this weekend and have noticed that Intellisense is messed up when setting up cross-database relationships. Note: Both database projects are in the same solution.

Here's what I want to do (with Intellisense offline so I make sure I don't goof up..):

--2 Databases (1) DB_Main which references (2) DB_Support (both on the same SQL instance)
--using DB_Main

Select Column1, Column2, Column3
From DB_Support.dbo.ExampleTable WITH (nolock)

...is that so much to ask?

Anyways it seems like the code all compiles fine when typing it out w/o the Intellisense suppor开发者_Python百科t, but that takes a lot longer and you have to build to see if you goofed... I read here that it works "not like you would expect" where the following seems to be valid:

--Again using DB_Main

Select Column1, Column2, Column3
From dbo.ExampleTable WITH (nolock)

... but < insert expletive here >, DB_Main.dbo.ExampleTable doesn't exist!!!, and I tested it and it will deploy that way, unless I did something wrong, which is possible, I've had all of 1 day's experience with all this...

Anyways, I have this cross-database issue in several of the instances I manage/develop so any ideas?

Thanks in advance.


I wondered if there are meanwhioe any solutions / fixs for this behaviour?

I figured out the same and can't believe it.

Actually my compiler won't allow me to add a "Table1" object into a database project (B) that references another database project (A) having a Table1 object as well because the objects of (A) are loaded into the schema collection of (B). This is nonsense...!

Maybe there is some new progress with this iddue I did not find so far..:?

0

精彩评论

暂无评论...
验证码 换一张
取 消