Pages

Thursday, February 20, 2014

Resolving the Error: "Cannot drop the database KnowledgeVaultMaster because it is being used for replication"

“More important than the quest for certainty is the quest for clarity”
Francois Gautier

One thing about working with Autodesk Vault, is it's always got a surprise for you.  There are so many possible configurations, that it can be hard to take all the considerations into account.

A case I encountered, showed me just that. 

The condition I was working in was a replicated environment, where the Vault database and filestore existed on a server in one location, and an additional filestore existed in a completely different location.

It's an environment where I'm constantly learning something from, and this day was no exception.

I was in the process of restoring a backup, after reconfiguring the installation, and this unusual error came up.


Cannot drop the database KnowledgeVaultMaster because it is being used for replication

I was puzzled.  Never in my life had I seen this error before.  But a quick Google search yielded the solution at the Autodesk blog linked here.

It shows the solution as follows:

USE [database]
EXEC sp_removedbreplication @dbname=[database]
GO

Unfortunately for me, I'm not sure where to put this solution into action.

But fortunately, for me, I know someone who likely does, and I "use my life line".

Mike Carlson, Vault Guru Extraordinaire gives me the tips that I'm looking for.  He filled the gaps that I needed filled. 

With his help, here are the steps that I was able to use.

First, I opened SQL Server Management Studio.

Starting SQL Server Management Studio




Once opened, I logged into my Vault.  The default login is SA, with a default password of AutodeskVault@26200 per the Autodesk Advanced Configuration Guide.

Logging into SQL Server Management Studio

Once logged in I was able to find what I needed in the interface.  First, I expand the database folder, find the KnowledgeVaultMaster database, right click, and choose Query.




Starting the Query

Once the Query window is open, I can paste in the following lines, and replace [database] with KnowledgeVaultMaster.



USE KnowledgeVaultMaster
EXEC sp_removedbreplication @dbname=KnowledgeVaultMaster
GO

The command ready to Execute
 Once the query is run, a message acknowledging a successful execution of the command will appear at the bottom of the screen.

The command after clicking the Execute button

After this, the restore ran perfectly fine, and I was back in business!   This seems like an obscure thing to come up, but I'm glad I found the solution, and someone with the knowledge to know what to do with it!

NOTE!

SQL Server Management Studio is needed to run this command.  It can be found on the SQL installation disk.  There is also an Express version that can be downloaded from Microsoft here.


No comments:

Post a Comment