Trying to disable replication from the Publisher ADMS Console on a Standard Content Center Library, showed this error in the ADMSConsole log file.
11/13/2012 2:22:52 PM Unable to clean up replication database 'AI2013_Inventor ISO' on subscribing database server 'RR-W2K8R2-SUB\AUTODESKVAULT'.
11/13/2012 2:22:52 PM Connectivity.Application.VaultManager.ServiceException: SubscriberCleanupError [4415] (RR-W2K8R2-SUB\AUTODESKVAULT, AI2013_Inventor ISO) ---> Connectivity.Core.Exceptions.EncodableException: SubscriberCleanupError [4415] (RR-W2K8R2-SUB\AUTODESKVAULT, AI2013_Inventor ISO) ---> System.Data.SqlClient.SqlException: Changes to the state or options of database 'AI2013_Inventor ISO' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
ALTER DATABASE statement failed.
at Connectivity.Core.Database.TransactionContext.OnSqlException(SqlException e)
at Connectivity.Core.Database.SqlAccess.ExecuteNonQueryInternal(SqlCommand cmd)
at Connectivity.Core.Database.SqlAccess.ExecuteNonQuery(CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters)
at Connectivity.Core.DataAccess.KnowledgeMasters.SetDatabaseOptions(String databaseName, String[] options)
at Connectivity.Core.DataAccess.KnowledgeMasters.DropDatabase(String databaseName)
at Connectivity.Core.BusinessLogic.WorkgroupBL.Database.CleanupRemoteSubscription(Workgroup publisher, String publicationName, String databaseName)
at Connectivity.Core.BusinessLogic.WorkgroupBL.Database.Unsubscribe(Workgroup currentwg, Workgroup targetwg, String databaseName, Boolean ignoreSubscriberErrors)
--- End of inner exception stack trace ---
Server stack trace:
at Connectivity.Core.BusinessLogic.WorkgroupBL.Database.Unsubscribe(Workgroup currentwg, Workgroup targetwg, String databaseName, Boolean ignoreSubscriberErrors)
at Connectivity.Core.BusinessLogic.WorkgroupBL.KnowledgeDB.DeleteReplica(String sqlServer, KnowledgeDatabase database, Boolean ignoreSubscriberErrors)
at Connectivity.Core.Services.KnowledgeLibraryService.DeleteLibraryReplica(String sqlServer, Guid libraryGuid, String partionID, Boolean ignoreSubscriberErrors)
at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Connectivity.Core.Services.KnowledgeLibraryService.DeleteLibraryReplica(String sqlServer, Guid libraryGuid, String partionID, Boolean ignoreSubscriberErrors)
at Connectivity.Application.VaultManager.KnowledgeLibraryService.DeleteLibraryReplica(String sqlServer, Guid libraryGuid, String partitionID, Boolean ignoreSubscriberErrors)
--- End of inner exception stack trace ---
at Connectivity.Application.VaultManager.KnowledgeLibraryService.DeleteLibraryReplica(String sqlServer, Guid libraryGuid, String partitionID, Boolean ignoreSubscriberErrors)
at Connectivity.Application.VaultManager.ReplicationUtil.DeleteLibraryReplica(String remoteServerName, String workgroupDisplayName, Guid libraryGuid, String libraryPartition, Boolean ignoreSubscriberErrors, String dbUser, String dbPassword, ICommonProgressReporter progressReporter)
at Connectivity.Application.VaultManager.KnowledgeLibraryObject.DeleteReplica(String remoteServerName, String workgroupDisplayName, ICommonProgressReporter progressReporter)
at Connectivity.Application.VaultManager.ManageReplicationCommand.ApplyChange(ICommonProgressReporter progressReporter, Form threadSafeForm, ReplicationUpdate currentUpdate)
at Connectivity.Application.VaultManager.ManageReplicationCommand.WorkgroupReplication_DoWork(Object sender, DoWorkEventArgs e)
I am not able to reproduce how this happened in the first place.
Logging into SQL Server Management Studio (SSMS) on the subscriber showed that the database had been put into Single User mode. To workaround this, I detached the database from the subscriber SSMS restarted the following services
Net stop "Autodesk Data Management Job Dispatch"
Net stop "SQLAgent$AUTODESKVAULT"
Net stop "MSSQL$AUTODESKVAULT"
Net stop "W3SVC"
Net start "Autodesk Data Management Job Dispatch"
Net start "MSSQL$AUTODESKVAULT"
Net start "SQLAgent$AUTODESKVAULT"
Net start "W3SVC"
...and then went back to the Publisher ADMS Console and tried again. The second time it was successful.