FIX: "Msg 7359" error when a view uses another view in SQL Server 2005 if the schema version of a remote table is updated

Article translations Article translations
Article ID: 2615425 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • 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.

Notes
  • 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:
    • ALTER TABLE
    • REATE INDEX
    • DROP INDEX
    • DBCC REINDE


CAUSE

This issue occurs because after the schema version of the linked table is changed, the view that uses the linked table is incorrectly recompiled.

RESOLUTION

SQL Server 2005

Hotfix information

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:
http://support.microsoft.com/contactus/?ws=support
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.
Prerequisites
To apply this hotfix, you must have SQL Server 2005 SP4 installed. 
Restart requirement
You may have to restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace a previously released hotfix. 
File information
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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqlservr.exe2005.90.5296.029,293,92007-Sep-201106:16x86
Sqlservr.exe2005.90.5296.039,798,62407-Sep-201106:05x64
Sqlservr.exe2005.90.5296.072,938,84807-Sep-201105:50IA-64

WORKAROUND

To work around this issue, use one of the following methods.

Method 1

Use the Sqlcmd.exe utility or Microsoft SQL Server Management Studio to run the following statement:
DBCC FREEPROCCACHE

Method 2

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.Tab CREATE 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

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 2615425 - Last Review: October 24, 2011 - Revision: 2.0
APPLIES TO
  • 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
Keywords: 
kbautohotfix kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2615425

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com