Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

The below error starts happening once a week at the same time every week.

The OLE DB provider "SQLNCLI" for linked server X reported a change in schema version between compile time X and run time X for table [tablename].
[SqlException (0x80131904): The OLE DB provider "SQLNCLI" for linked server "ABCDEF" reported a change in schema version between compile time ("175385004624084") and run time ("175393583420554") for table ""ABCDEF"."dbo"."TheViewOnLinkedServer"".]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteReader() +89
   XXXX.XXXX.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) in E:\WorkingFolderVSSNET\Lesa\Databases\Lesa.Net.Data\Lesa.Net.Data\SQLHelper.cs:671
   XXXX.XXXX.Data.SqlHelper.ExecuteReader(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) in E:\WorkingFolderVSSNET\Lesa\Databases\Lesa.Net.Data\Lesa.Net.Data\SQLHelper.cs:803
   XXXX.XXXX.XXXXX.XXXX.GetAttTypes(String ID, String App) +279

[ApplicationException: Error in GetAttTypes]
   XXXX.XXXX.XXXX.XXXX.XXXXXXX(String ID, String App) +507
   XXXX.XXXX.XXXX.XXXXX.XXXXX.Load(Int32 XXXX) +14717

[Exception: Error in XXXXXX.Load( XXXXX=XXXXXX) at XXXXX- for.]
   XXXX.XXX.XXX.XXXXXX.XXXXXX..ctor(String XXXXX, String XXXXX) +312
   XXXXXXX.XXXXXXXX.Page_Load(Object sender, EventArgs e) +2481
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

To fix the problem I just run the alter statement for the view without any changes.

The view selects from another view on a linked server and does list the column names (doesn't select by *).

I am not able to duplicate the problem after it has been fixed yet because I can't figure out what could be causing it. I have tried rebuilding indexes to see if that is causing it but it doesn't seem to.

Any ideas on how to troubleshoot this or what the cause could be?

share|improve this question
    
Does the same results happen if you manually execute the same query that the code is executing? –  billinkc Oct 23 '11 at 12:50
    
Yes, sorry I guess I should have just sent the error from the query and not the application error. If I haven't figured it out by next Sunday morning (when it breaks) I'll get just the error text from there. However, it is the same root error. –  Beth Whitezel Oct 23 '11 at 20:43

2 Answers 2

Are you using a synonym? The few cases I have seen people complaining of this, this fix worked - http://support.microsoft.com/kb/2498818 - What version/build are you on?

share|improve this answer
    
Sorry, we are not using a synonym and we are fully patched for 2008 SP1. –  Beth Whitezel Oct 24 '11 at 16:46
    
When you say "Full patched for 2008 SP1" what do you mean? SP1 isn't the latest SP for 2008. Did you mean 2008 R2 and what do you mean by fully patched? What is your version number? (select @@version) The fixes in the link provided above are post SP Cumulative Updates. May not be your case but may be worth a shot. –  Mike Walsh Oct 24 '11 at 19:13
    
Sorry, I completely messed that one up and didn't verify my completely incorrect assumption. Let me try again... I believe you may have hit the jackpot, according to the link you gave we would need to be running 2005 SP3 or SP4. We are running "Microsoft SQL Server 2005 - 9.00.4340.00 (Intel X86) Apr 13 2011 15:47:36 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) ". Let me do a little more investgating and see this indeed fixes the issue. Thanks!!! –  Beth Whitezel Oct 24 '11 at 23:19
    
How did this work out? –  Mike Walsh Nov 10 '11 at 16:58
    
Waiting to be able to apply SP4 to production. I will update it and let you know when I know for sure. –  Beth Whitezel Nov 10 '11 at 19:27

We have linked server connections from one SQL server to another and on multiple servers. Get this error msg everyday and been researching for the past two yrs with no definitive answer. Even placed (paid) support call to Microsoft with no resolution due to they couldn't absolutely pinpoint during testing.

Since we setup our data pulls to utilize SQL Sever Agent, we set to retry a few time if a failure occurs.

I think the problem lies within the db engine and those at Microsoft SQL product group programming the product would be the only ones who could come up with a valid reason.

FYI, our company uses several SQL instances on several servers with versions 2005 and 2008.

Good luck

There is also another post relating to the issue and response from Microsoft. Seems like it could be related to rebuilding indexes and stats. You may want to try running before these occur:

Posted by Microsoft on 6/8/2010 at 8:54 PM

We fixed the bug related to the schema version error when using synonyms in a local view to reference a remote table. The fix will be in the first CTP (CTP0) of the coming release (SQL Server 11 Codename Denali). We are currently also considering backporting it to earlier versions but the decision has not been made yet.

Thanks for your patience.

Regards,

Joachim Hammer Program Manager SQL Server

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.