Moving the SOLIDWORKS PDM Vault Database Yourself? Start Here

Article by Francisco Guzman on Mar 23, 2020

Moving the SOLIDWORKS PDM vault database server yourself? The first thing to do is to read through this guide thoroughly – preferably, days before the scheduled server move. This guide is not an exhaustive guide covering every possible scenario that can be performed for this task. However, this guide is based on typical server setups found while supporting our customers. Therefore, should you come up with questions after reading this guide, contact us, and let’s clear things up for you before you move any SOLIDWORKS PDM component.

This guide will cover the move of the Microsoft SQL vault database alone to a different server machine that hosts SQL Standard.

Guide use cases

  • Moving the vault database to new server hardware and decommissioning old.
  • Moving vault database to a server with newer Windows OS instead of an OS in-place upgrade.
  • Moving vault database to a server with a newer SQL version instead of an SQL in-place upgrade.
  • Moving the vault database to a new SQL server instance.

Overview

  1. Install SQL Server on a new system
  2.  Create a PDM vault database backup
  3. Restore the vault database in new SQL server
  4. Take old vault database offline or delete it
  5. Update SOLIDWORKS PDM Database Server service registry keys
  6. Update SOLIDWORKS PDM Archive Server service registry keys
  7. Update SOLIDWORKS PDM Client registry keys
  8. Update passwords in
    1. SOLIDWORKS PDM Archive Server service
    2. SOLIDWORKS PDM Database Server service
    3. Lists for cards (in Administration tool)

The Works

1. Installing SQL server for SOLIDWORKS PDM vault database

We have created a guide to help step through the process of installing Microsoft SQL Standard that currently ships with the purchase of SOLIDWORKS PDM Professional 2020. This guide can be found here.

Also, here is the process of installing service pack 3 for Microsoft SQL 2014.

Ensure with your IT that all the PDM clients and PDM server components can connect to it. (i.e. open firewall ports, etc.)

2. Create a PDM vault database backup

This vault database backup is to perform the vault database move. Alone, it is not enough for a disaster recovery scenario. Ensure that you have taken proper backup(s) before proceeding.

  1. Open Microsoft SQL Management Studio. Log into your SQL instance that hosts your PDM vault database.
  2. Right-click on your vault database and navigate Task > Backup…
    Create a PDM vault database backup
  3. When the backup database window appears, set the following to their respective tabs:

    General
    Backup Type: Full
    Back up to: Disk
    Destination: Set where you will place the SQL Backup. Give it a unique name and provide extension of ".bak".

    Media Options
    Overwrite Media: "Overwrite all existing Media Set" radio button with "Append
    to the existing backup set"
    Reliability: Check the box for "Verify backup when finished"
  4. Proceed with taking the backup. A notification will indicate of its success.
  5. Repeat process for the ConisioMasterDb.

3. Restore the vault database in new SQL server

  1. Copy the vault database backups from step 2 to the new server. Open SQL management studio and log in to proceed with the restoration.
  2. Right-click on databases > Restore Database…
    restore the vault database in the new SQL server
  3. When the restore database window appears, set the following to their
    respective tabs:

    General
    Device: Select the database backup to restore.

    Files
    Check the box for “relocate all files to folder” if you require the .mdf and .ldf files to be placed in a particular location. Otherwise, leave unchecked.

  4. Proceed with the restore of the backup. A notification will indicate its success.
  5. Repeat process for the ConisioMasterDb

4. Take old vault database offline or delete it

Avoid the potential of messy issues with clients connecting back to the old server. It is highly recommended to either take the old database “off-line” or delete it.

  1. To take the old database offline, right-click the old vault database and navigate: Tasks > Take Off-line. The database will then be denoted with the following if it was successfully taken off-line.
  2. In some cases, you may need to run the query below to end any running process that is preventing the database from being taken off-line. Provide the name of your database in the query 'database name' but keep the single quotes.

    USE master
    GO
    DECLARE @kill varchar(8000) = ''
    SELECT @kill=@kill+'kill '+ convert(varchar(5),spid)
    FROM master..sysprocesses
    WHERE dbid=db_id('database name') --your database name goes here
    EXEC (@kill)

  3. If you would like to delete the old database instead of taking it off-line, the process is a lot easier. Simply, right-click the old vault database and select Delete.
    Delete Object Dialog
    In the Delete Object dialog, you can close existing connections. You may not have to run the query above to kill the connections.

5. Update SOLIDWORKS PDM Database Server service registry keys

From the machine hosting the SOLIDWORKS PDM Database Server service, update the Windows registry key below. You MUST restart the SOLIDWORKS PDM Database Server service for the change to apply.

HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks
Enterprise\MailService\Server

  • Enter the name of the new SQL machine if using a default instance of SQL.
  • Enter the machine and instance name if using a named instance of SQL.
    • For example: MyServerName\InstanceName
  • Leave blank if the SOLIDWORKS PDM Database Server service has been uninstalled from the previous location and installed in the new SQL server machine.

If you are not sure how to update Windows registry keys, stop and contact us

6. Update SOLIDWORKS PDM Archive Server service registry keys

From the machine hosting the SOLIDWORKS PDM Archive server service, update the Windows registry keys below. Repeat this step for every replicated archive server of this vault. You MUST restart the SOLIDWORKS PDM Archive server service for the change to apply. 

HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks
Enterprise\ArchiveServer\Vaults\MyVaultName\Server

  • Enter the name of the new SQL machine if using a default instance of SQL.
  • Enter the machine and instance name if using a named instance of SQL.
    • For example: MyServerName\InstanceName

7. Update SOLIDWORKS PDM Client registry keys

From PDM client, update these two Windows registry keys. Repeat this step for every machine of this vault. It is recommended to at least restart the explorer.exe application from the client’s Windows Task Manager. This will ensure that the changes have been applied.

  1. HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks
    Enterprise\Databases\MyVaultName\DbServer
  2. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\Applications\PDMWorks
    Enterprise\Databases\MyVaultName\DbServer 
  3. Close any PDM Administration tools and DELETE this key:
    HKEY_CURRENT_USER\Software\SolidWorks\Applications\PDMWorks Enterprise\ConisioAdmin

    • Enter the name of the new SQL machine if using a default instance of SQL.
    • Enter the machine and instance name if using a named instance of SQL
      For example: MyServerName\InstanceName.

8. Update passwords!

This step is typically missed when there has been a different password assigned for the SQL ‘sa’ account. If there is a new password for the SQL account that PDM uses i.e. ‘sa’, ensure to update these locations.

  1. SOLIDWORKS PDM Archive Server service

    In the archive server machine, open the Archie Server Configuration tool. Update the “SQL Login” password in either the default settings or vault-specific properties:

    vault specific properties

    Repeat this step for every replicated archive server of this vault. You MUST restart the SOLIDWORKS PDM Archive server service for the change to apply.

  2. SOLIDWORKS PDM Database Server service 

    In the machine that hosts the SOLIDWORKS PDM Database server service, open the Database Server Configuration tool to update the SQL password. You MUST restart the SOLIDWORKS PDM Database Server service for the change to apply.

    SOLIDWORKS PDM Database server screen

  3. Lists for cards

    SOLIDWORKS PDM lets you query the SQL vault database to populate lists that can be used in data cards. If your vault uses Lists for cards that query the vault database, you will need to update information. This change will need to be performed in the PDM Administration tool.

    SQL command returning the data

    From this point, you should be able to connect to your newly moved SQL vault database. If you have any issues, send them our way.

Related Articles

Working Offline with SOLIDWORKS PDM Tips & Tricks

How to Reset the SQL 'SA' User Password in SOLIDWORKS PDM

Managing Your SOLIDWORKS PDM Archive with Compression and Cold Storage

About Francisco Guzman

Francisco Guzman is the PDM Technical Support Lead at GoEngineer, and is pursuing his degree in mechanical engineering at the University of Utah. In addition to providing guidance and support to SOLIDWORKS and SOLIDWORKS PDM customers, Francisco also provides support for DriveWorks design automation. He won the world-wide DriveWorks reseller CPD contest as the best DriveWorks AE for 2015. For fun, he designs, 3D-Prints, builds and races custom first-person-view (FPV) racing drone frames.

View all posts by Francisco Guzman

Subscribe

Get the latest articles delivered daily to your inbox, unsubscribe at any time.