You create a linked server on a computer that is running Microsoft SQL Server 2005. The linked server points to an OLE DB data source on a remote server.
You create a view that uses a linked table. The linked table is mapped to a table on the remote server.
You create another view. This view uses the first view that you created.
You perform an operation on the remote server to alter the schema version of the linked table.
For example, you rebuild the index of the table on the remote server.
Note The rebuilding operation alters the schema version of the linked table.
You run a query against the view that uses the first view that you created.
In this scenario, you receive an error message that resembles the following:
Server: Msg 7359, Level Level Number, State State Number, Line Line Number
The OLE DB provider Provider-Name for linked server Linked-Server-Name reported a change in schema version between compile time Compile-Time) and run time (Run-Time) for table Linked-Table-Name.
This issue occurs in build number 5266 of cumulative update package 3 for Microsoft SQL Server 2005 Service Pack 4 (SP4) and in later cumulative update packages for SQL Server 2005 SP4.
Provider-name is a placeholder for the name of the OLE DB provider.
Linked-Table-Name is a placeholder for the name of the linked table.
Compile-Time is a placeholder for the time at which the query was compiled.
Run-Time is a placeholder for the time at which the query ran.
The following statements alter the schema version of a table:
This issue occurs because after the schema version of the linked table is changed, the view that uses the linked table is incorrectly recompiled.
SQL Server 2005
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.
To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
To apply this hotfix, you must have SQL Server 2005 SP4 installed.
You may have to restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace a previously released hotfix.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
To work around this issue, use one of the following methods.
Use the Sqlcmd.exe utility or Microsoft SQL Server Management Studio to run the following statement:
Change the view that uses another view to an equivalent view that does not use another view.
For example, assume that you run the following statements to create two views:
CREATE VIEW InnerView AS SELECT * FROM LnkSrv.Db.Sch.TabCREATE VIEW OuterView AS SELECT * FROM InnerView
In this scenario, you can run the following statement to create an equivalent OuterView view that does not use the InnerView view:
CREATE VIEW OuterView AS SELECT * FROM LnkSrv.Db.Sch.Tab
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Enterprise X64 Edition, Microsoft SQL Server 2005 Express Edition, Microsoft SQL Server 2005 Express Edition with Advanced Services, Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2005 Standard X64 Edition, Microsoft SQL Server 2005 Workgroup Edition, Microsoft SQL Server 2005 Evaluation Edition