Skip to main content

Removing Duplicate Subassemblies

This article covers the complete process for identifying and removing duplicate subassemblies from a Microvellum database using the Microvellum SQL CE Viewer tool and a targeted SQL UPDATE query.

J
Written by Jordan Munoz

Prerequisites

Access & Permissions

  • Admin access to Microvellum confirmed.

  • Microvellum SQL CE Viewer installed on technician workstation.

  • Remote access to the target machine if required (AnyDesk or equivalent).

Information and Conditions

  • Your Microvellum version (software type, software build, library build) documented.

  • Database type identified (SQL CE or SQL Server).

  • No active jobs or critical operations in progress — schedule a maintenance window.

  • Backup of the database created before running any UPDATE query.

Always take a full database backup before running any UPDATE or DELETE query. This allows a safe rollback if unexpected results occur.

Step 1 — Install Microvellum SQL CE Viewer

Before proceeding, confirm that MV SQL CE Viewer is installed on the device being used for the removal process.

  1. Download MV SQL CE Viewer from the Microvellum support resources or internal tools repository. (Download here)

  2. Run the installer and follow on-screen prompts.

  3. Launch the application to confirm it opens without errors.

NOTE: MV SQL CE Viewer is required even for SQL Server environments — it provides the query interface used throughout this process.

Step 2 — Check Database Type in Microvellum

Determine whether your Microvellum database uses SQL CE or SQL Server authentication.

  1. Open Microvellum.

  2. Navigate to: Microvellum Settings > Options > Data Access.

  3. Identify the database type.

Step 3 — Gather SQL Connection Info

While still in MV Settings > Options > Data Access, record the connection details you will need to log into MV SQL CE Viewer. If using an SQL CE, instead close this option and navigate to your factory data.

Field

Where to Find It

Example

Server Name

Data Access > Server Name field

SERVERNAME\INSTANCE

Username

Data Access > Username field

mv_admin

Password

Data Access > Password field

mvadmin

Database / .sdf path

Help > Browse to Factory Data > Factory Database > Microvellum Factory (Copy as Path)

MV_CompanyName_Prod

Step 4 — Connect to the Database

Open MV SQL CE Viewer and connect using the appropriate method:

If using SQL Server:

  1. In MV SQL CE Viewer, select the SQL Server connection option.

  2. Enter the Server Name, Username, and Password gathered in Step 3.

  3. Select the target database from the dropdown.

  4. Click Connect.

If using SQL CE:

  1. In MV SQL CE Viewer, select the SQL CE connection option.

  2. Browse to the .sdf file path identified in Step 3.

  3. Click Connect.

If connection fails, confirm the Server Name includes the instance (e.g. SERVER\SQLEXPRESS), verify SQL Authentication is enabled, and check that firewall port TCP 1433 is open for SQL Server environments.

Step 5 — Open the Library & Get LinkIDTemplate

Once connected, locate the Microvellum Foundation Library record to retrieve the LinkIDTemplate value needed for the cleanup query.

  1. In the left column of MV SQL CE Viewer, locate the Library table.

  2. Double-click Library to open its records.

  3. Find the row corresponding to the MV Foundation Library.

  4. Copy the value in the LinkIDTemplate column — you will paste this into the query in Step 6.

TIP: The LinkIDTemplate is a unique GUID-style identifier for the library. Copy it exactly — any character mismatch will cause the query to match no records.

Step 6 — Write & Run the Cleanup Query

Use the built-in query editor in MV SQL CE Viewer to run the UPDATE statement that marks duplicate subassemblies as deleted (Type = 5).

  1. Click Write New Query from the top toolbar in MV SQL CE Viewer.

  2. Paste the following query into the editor:

    UPDATE Subassemblies SET Type = 5

    WHERE LinkIDProject = 'HERE PASTE LINKIDTEMPLATE'

    -- Replace 'HERE PASTE LINKIDTEMPLATE'

    with the LinkIDTemplate value from Step 5 AND Type = 3

    AND LinkIDParentProduct IS NOT NULL;
  3. Replace the placeholder 'HERE PASTE LINKIDTEMPLATE' with the actual LinkIDTemplate value copied in Step 5.

  4. Click Run from the top toolbar.

  5. Wait for the query to complete. The left column will reload automatically.

  6. A success message or row-count confirmation indicates the duplicates have been cleaned.

This query updates Subassembly records where:

  1. The project matches your Foundation Library.

  2. The record is a duplicate subassembly (Type = 3).

  3. The record has a parent product link. Setting Type = 5 marks these as deleted without permanently removing the row, preserving data integrity.

Step 7 — Verify Deletion in Microvellum

After the query runs successfully, confirm the cleanup within Microvellum.

  1. Switch to Microvellum.

  2. Navigate to: Microvellum Settings > Utilities > Database Explorer.

  3. Browse to the Subassemblies section.

  4. Verify that the duplicate subassemblies no longer appear.

Validation Checklist

#

Validation Check

Expected Result

1

Query completed without SQL errors

Row count > 0 affected

2

Left column reloaded in MV SQL CE Viewer

Library refreshes automatically

3

Database Explorer in MV shows no duplicates

Subassemblies list is clean

4

Open a project in MV and verify normal operation

Project loads without errors

IF VALIDATION FAILS:

Re-check the LinkIDTemplate value used in the query (Step 5). Confirm mv_admin has db_owner rights on the database. Re-run the query with the corrected value if needed.

Did this answer your question?