SQL Server Indexed View syntax for a federated database

I am trying to tune the index in my opinion. The first error was 1939, a schema binding is required.

Well, no problem with that.

ALTER VIEW xyz WITH SCHEMABINDING AS abc

Now, in this VIEW, I use one local table [dbo].] [ReleaseantTable] and two joined tables from other databases on the same server:

OtherDbName..OtherRelevantTable

Failed to modify VIEW by specifying OtherDbName..OtherRelevantTable incorrectly for schema binding.

I assume this is just a syntax issue. Can someone tell me how to contact my OtherDb?

+3
source share
1 answer

To create an indexed view, your base tables must be in the same database.

Microsoft Books Online:

http://msdn.microsoft.com/en-us/library/ms191432(SQL.90).aspx

+4

Source: https://habr.com/ru/post/1714958/


All Articles