This article will create a duplicate of an existing PDM Vault, similar to a Sandbox, but as an exact copy.
In another article, we described how to create a Sandbox Vault. Following the Sandbox Vault article, a new vault will be created with the same vault settings; however, it does not duplicate the Database or the Archive.
In this article, we will look at how to create a duplicate of an existing SOLIDWORKS PDM Vault.
The first step is creating the Sandbox Vault as described in the linked article, with one exception. We will hold off on the step involving the importing of the vault settings. This step will be addressed at the end of this article.
The next step will be to gather the necessary data by either manually obtaining it or using the “Collect Support Information…” wizard described in this article.
We will need the following:
- Database backup from the production vault.
- Archive folder location for the production vault.
- Administrative Export from the production vault.
Once we have an empty Vault, we restore the Database through SQL Management Studio. After logging into SQL Management Studio, right-click on the Databases folder and select restore.
In the General category, within the Source group, select Device and hit the browse (ellipsis) button. Click "Add" to select the backup that was created. Then click “OK” and “OK” again.
Back in the General category, set the Destination Database to the Sandbox Vault created previously by selecting it from the pulldown.
Select the “Options” category, then check the box for “Overwrite the existing database (WITH REPLACE)”, deselect “Take tail-log backup before restore” and select “Close existing connections to destination database”.
Finally, click “OK” to restore the vault.
Now that we have restored the production database, overwriting the Sandbox database, we can copy the Archive folders from our production vault to our Sandbox vault. We can copy all the archive sub-folders, but the archive folder can be massive.
If the location is not known, open the “Archive Server Configuration” tool. Expand the plus next to “This Computer” and select the “Archives” folder. This will show all the vaults for this archive server. Then find the production vault, right-click, and select “Properties”.
Then, in the “Archive Locations” group section, it will list the “Path:” to the data folder.
Most likely, not all the folders will be needed, so we can use the “Collect Support Information” wizard to copy only the files and/or folders we want to work with.
There are some changes that we need to make to the database via SQL Management Studio.
In Object Explorer, expand Databases>Your Sandbox database>Tables, right-click “dbo.ArchiveServers” and select “Edit Top 200 Rows”.
Change the “VaultName” column value to match that of your Sandbox vault. After changing the value, press the tab key until you are on the next row, which then triggers the new value to be written to the database.
Next, do the same for the “dbo.SystemInfo” table (also found in Databases > Your Sandbox database > Tables).
To update all the SQL and PDM settings, restart the SQL Server service. Then, restart PDM Database and Archive Services.
The last step is to import the vault settings, as described in the Sandbox Vault article.
If you experience any problems connecting to the vault, edit the Windows Registry and check that the settings for the Sandbox vault are correct. Ensure that everything is pointing at the correct locations.
Below are the keys that should be checked.
HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\ArchiveServer\Vaults
HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\ArchiveServer\Vaults\”Sandbox Vault Name”\ArchiveTable
HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\ArchiveServer\Vaults
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\Applications\PDMWorks Enterprise\Databases