none
SharePoint/Project displays "Cannot connect to the configuration database" after failing over to DR, then after about 30 minutes starts working RRS feed

  • Question

  • We failed over SP/Project server to DR (using VMware SRM) and activated mirrored databases on DR server (all but Reporting DB).  We use a host file on the SP server to point to the right SQL box.  After failover, we changed the IP for SP server.  When users tried to connect they got "Cannot connect to the configuration database".  DBA verified there were connections coming in to SP and the app pool account had the right permissions configured.  On SP server I saw the following messages in app log:

     

    EventID: 5617 There is a compatibility range mismatch between the Web server and database "", and connections to the data have been blocked to due to this incompatibility. This can happen when a content database has not been upgraded to be within the compatibility range of the Web server, or if the database has been upgraded to a higher level than the web server. The Web server and the database must be upgraded to the same version and build level to return to compatibility range.

     

    EventID: 5586 Unknown SQL Exception 262 occurred. Additional error information from SQL Server is included below.

     

     

     

    After about 30 minutes, everything started working (minus the reporting DB).  I am not sure what was holding it up, nothing really changed in those 30 minutes.

     

    Below is a snippet of SP logs with errors just before it started working (about 8:06)

     

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:01:41 PM]: Missing BuildVersion.

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:01:41 PM]: Defaulting to BuildVersion = 12.0.0.6421.

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:01:41 PM]: Missing Version, Id = 00000000-0000-0000-0000-000000000000.

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:01:41 PM]: Executing SQL DDL Script.

    System.Data.SqlClient.SqlException: CREATE TABLE permission denied in database 'SharePoint_Config'.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()     at Microsoft.SharePoint.Utilities...

    ....SqlSession.ExecuteNonQuery(SqlCommand command)

       at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.ExecuteDataDefinitionMethodCore(SqlSession sqlSession, ISqlSession isqlSession, String sqlscript, SPLog log)     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.SetVersion(Guid id, Version version)     at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.set_BuildVersion(Version value)     at Microsoft.SharePoint.Upgrade.SPSequence.get_CanUpgrade()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CanUpgrade(Object o)     at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.get_CanUpgrade()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ReflexiveCanUpgrade(Object o)     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)     at Microsoft.SharePoint.Administration.SPPersist...

    ...edUpgradableObject.get_NeedsUpgrade()     at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.ValidateBackwardsCompatibility()     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility, Boolean bindRequestGuid)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local()     at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.EnsureInitialize(HttpRequest request)     at Micro...

    ...soft.SharePoint.ApplicationRuntime.SPRequestModule.BeginRequestHandler(Object oSender, EventArgs ea)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.Pipeli...

    ...neRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  

    SqlError: 'CREATE TABLE permission denied in database 'SharePoint_Config'.'    Source: '.Net SqlClient Data Provider' Number: 262 State: 1 Class: 14 Procedure: '' LineNumber: 4 Server: 'SQL-SERVER-NAME'

    Unknown SQL Exception 262 occurred. Additional error information from SQL Server is included below.  CREATE TABLE permission denied in database 'SharePoint_Config'.

    ConnectionString: 'Data Source=SQL-SERVER-NAME;Initial Catalog=SharePoint_Config;Integrated Security=True;Enlist=False;Asynchronous Processing=False;Connect Timeout=15'    ConnectionState: Open ConnectionTimeout: 15

    SqlCommand: '              IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[Versions]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)              BEGIN              CREATE TABLE [dbo].[Versions] (                  [VersionId]                 uniqueidentifier NOT NULL,                  [Version]                   nvarchar(64) NOT NULL,                  [Id]                        int IDENTITY NOT NULL,                  [UserName]                  nvarchar(255) NULL,                  [TimeStamp]                 datetime NULL,                  [FinalizeTimeStamp]         datetime NULL,                  [Mode]                      int NULL,                  [ModeStack]                 int NULL,                  [Updates]                   int DEFAULT 0 NOT NULL,        ...

    ...          [Notes]                     nvarchar(1024) NULL,                  CONSTRAINT [Versions_PK]    PRIMARY KEY CLUSTERED (VersionId, Id)              )              END              ELSE IF NOT EXISTS (SELECT * FROM sysobjects join syscolumns on sysobjects.id = syscolumns.id WHEREsysobjects.name='Versions' and syscolumns.name = 'TimeStamp')              BEGIN                  ALTER TABLE [dbo].[Versions] DROP Versions_PK                  ALTER TABLE [dbo].[Versions] ADD                      Id        int IDENTITY NOT NULL,                      UserName  nvarchar(255) NULL,                      TimeStamp datetime NULL,                      FinalizeTimeStamp datetime NULL,                      Mode      int NULL,                      ModeStack int NULL,                      Updates   i...

    ...nt DEFAULT 0 NOT NULL,                      Notes     nvarchar(1024) NULL,                      CONSTRAINT Versions_PK PRIMARY KEY CLUSTERED (VersionId, Id)              END              '     CommandType: Text CommandTimeout: 0

    [w3wp] [SPUpgradeSession] [ERROR] [7/24/2012 8:01:41 PM]: CanUpgrade [SPConfigurationDatabase] failed.

    [w3wp] [SPUpgradeSession] [ERROR] [7/24/2012 8:01:41 PM]: Exception: CREATE TABLE permission denied in database 'SharePoint_Config'.

    [w3wp] [SPUpgradeSession] [ERROR] [7/24/2012 8:01:41 PM]:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand comm...

    ...and)     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.ExecuteDataDefinitionMethodCore(SqlSession sqlSession, ISqlSession isqlSession, String sqlscript, SPLog log)     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.SetVersion(Guid id, Version version)     at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.set_BuildVersion(Version value)     at Microsoft.SharePoint.Upgrade.SPSequence.get_CanUpgrade()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CanUpgrade(Object o)

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:01:41 PM]: Cannot upgrade [SPConfigurationDatabase].

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:01:41 PM]: Skip [SPConfigurationDatabase] NeedsUpgrade.

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:01:41 PM]: Missing Version, Id = 60b1f2be-5130-45ab-af1d-edd34e626b5d.

    [w3wp] [SPConfigurationDatabaseSequence2] [DEBUG] [7/24/2012 8:01:41 PM]: Missing Version, Id = f4d348c4-a6e9-4ed5-bdb2-2358b74ef902.

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:01:41 PM]: IsBackwardsCompatible [SPConfigurationDatabase] returned: False.

    Can not connect to configuration database due to compatibility issue: Microsoft.SharePoint.Upgrade.SPUpgradeCompatibilityException: There is a compatibility range mismatch between the Web server and database "", and connections to the data have been blocked to due to this incompatibility. This can happen when a content database has not been upgraded to be within the compatibility range of the Web server, or if the database has been upgraded to a higher level than the web server. The Web server and the database must be upgraded to the same version and build level to return to compatibility range.     at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.ValidateBackwardsCompatibility()     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionSt...

    ...ringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility, Boolean bindRequestGuid)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local() 

    Disabling the configuration filesystem and memory caches.

     

     

     

    Entering monitored scope (Request (GET:http://PROJECT-SERVER-NAME:8080/_admin/DatabaseStatus.aspx))

    Name=Request (GET:http://PROJECT-SERVER-NAME:8080/_admin/DatabaseStatus.aspx)

    Site=/

    Releasing stale server locks.

    Successfully released [0] stale server locks. timeout seconds=[300]

     

     

     

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:04:52 PM]: Cannot upgrade [SPConfigurationDatabase].

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:04:52 PM]: Skip [SPConfigurationDatabase] NeedsUpgrade.

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:04:52 PM]: Missing Version, Id = 60b1f2be-5130-45ab-af1d-edd34e626b5d.

    [w3wp] [SPConfigurationDatabaseSequence2] [DEBUG] [7/24/2012 8:04:52 PM]: Missing Version, Id = f4d348c4-a6e9-4ed5-bdb2-2358b74ef902.

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:04:52 PM]: IsBackwardsCompatible [SPConfigurationDatabase] returned: False.

    Can not connect to configuration database due to compatibility issue: Microsoft.SharePoint.Upgrade.SPUpgradeCompatibilityException: There is a compatibility range mismatch between the Web server and database "", and connections to the data have been blocked to due to this incompatibility. This can happen when a content database has not been upgraded to be within the compatibility range of the Web server, or if the database has been upgraded to a higher level than the web server. The Web server and the database must be upgraded to the same version and build level to return to compatibility range.     at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.ValidateBackwardsCompatibility()     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionSt...

    ...ringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility, Boolean bindRequestGuid)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility)     at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local() 

    Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Cannot connect to the configuration database.    at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.EnsureInitialize(HttpRequest request)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.BeginRequestHandler(Object oSender, EventArgs ea)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Cannot get the SPMonitoredScope for the request

     

     

     

    [w3wp] [SPConfigurationDatabaseSequence] [DEBUG] [7/24/2012 8:05:52 PM]: UpgradableBuildBypass = 0

    [w3wp] [SPConfigurationDatabaseSequence2] [DEBUG] [7/24/2012 8:05:52 PM]: UpgradableBuildBypassInternal = 0

    [w3wp] [SPConfigurationDatabaseSequence2] [DEBUG] [7/24/2012 8:05:52 PM]: UpgradableBuildBypass = 0

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:05:52 PM]: CanUpgrade [SPConfigurationDatabase] returned: True.

    [w3wp] [SPUpgradeSession] [DEBUG] [7/24/2012 8:05:52 PM]: NeedsUpgrade [SPConfigurationDatabase] returned: False.

     

     

    The configuration database was queried for a non-existent object with the id 78751816-822a-406a-8ee2-e5e2a576ebea. Most commonly, this is caused by removing an SPFeatureDefinition without writing upgrade code to remove references to the feature from each site.

    Wednesday, July 25, 2012 6:45 PM

All replies

  • Hi there,

    Did you try restarting all app / web servers after you repointed the SQL Alias so that the SQL connections were dropped from the old SQL box then connected to to the DR SQL box when the servers restarted?

    Thanks

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com

    Thursday, July 26, 2012 8:17 AM
    Moderator
  • yes I restarted the SharePoint server in question (btw we used OS host file not SQL host entries)
    Tuesday, August 21, 2012 1:05 AM