Hallo Leute, ich hab eine relativ komplexe view gebastelt, die die Haupttabelle mit Daten aus mehreren Detailtabellen anreichert. Nun habe ich mir überlegt, dass ein Index auf einer View evtl. die Abfragegeschwindigkeit erhöhen könnte. Leider gelingt es mir nicht diesen Index zu erstellen.
Bei der Erstellung eines Index kommt Fehler 1939 (Could not create index because the view is not schema bound.
Dann dachte ich miir, dass ich mit ALTER VIEW WITH SCHEMABINDING etwas bewirken könnte. Das läßt sich allerdings nicht ausführen.
Fehler:
Msg 4512, Level 16, State 3, Procedure VIEW_Hauptabelle
, Line 5 Cannot schema bind view 'dbo.VIEW_Hauptabelle
because name 'basis.dbo.Profiles' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
Ich verstehe hier das Problem nicht so ganz. Die Tabelle Profiles ist mehrfach mit der Hauptabelle verbunden und jeweils über zwei Felder verknüpft. Ist das, das Problem?
Wäre toll, wenn mir jemand das Problem erklären könnte.
Gruß Stefan
Bei der Erstellung eines Index kommt Fehler 1939 (Could not create index because the view is not schema bound.
Dann dachte ich miir, dass ich mit ALTER VIEW WITH SCHEMABINDING etwas bewirken könnte. Das läßt sich allerdings nicht ausführen.
Fehler:
Msg 4512, Level 16, State 3, Procedure VIEW_Hauptabelle
, Line 5 Cannot schema bind view 'dbo.VIEW_Hauptabelle
because name 'basis.dbo.Profiles' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
Ich verstehe hier das Problem nicht so ganz. Die Tabelle Profiles ist mehrfach mit der Hauptabelle verbunden und jeweils über zwei Felder verknüpft. Ist das, das Problem?
Wäre toll, wenn mir jemand das Problem erklären könnte.
Gruß Stefan
Comment