Overview
Library Overwrite is a Q-Series feature that replaces the entire contents of one installed library with a copy of another installed library. It is a full replacement; not a merge. All rates, resources, formulas, stored items, and library data come from the source library. Only the target library's name is preserved.
📌Note: This feature is available only to Master users in the Library Settings toolbar. Introduced in Work Item #2107167 (March 2026).
When to Use Library Overwrite
Use Library Overwrite when you need to:
Replace an outdated or incorrectly configured library with a corrected or newer version
Standardise library content across projects (copy a master library over a local one)
Recover a library that has been corrupted, using a clean copy as the source
Do NOT use Library Overwrite when:
You only want to update specific items - use item-level editing instead
You need to merge content from two libraries - this feature does not merge
The source library is not yet complete - all changes should be finalised before overwriting
Prerequisites and Access Requirements
Requirement | Detail |
User role | Master user only (IsMaster = true) |
Target library status | Must be installed (IsInstalled = true) |
Source library | At least one other installed library must exist |
Project locks | No other user may have any project open that uses either the target or source library |
Backup (recommended) | Export the target library first via Tools > Zip > Current Library |
How to Perform a Library Overwrite
Step 1 - Back up the target library (strongly recommended)
Navigate to Tools > Zip > Current Library and save the export. This is the only manual recovery option if something goes wrong.
Step 2 - Open Library Settings
Go to the Library Settings toolbar. Ensure the library you want to overwrite (the target) is selected.
Step 3 - Click the Overwrite button
Click LibOverwriteBtn (Overwrite) in the toolbar. The button is only visible and enabled for Master users with an installed library selected.
Step 4 - Select the source library
A dropdown dialog lists all installed libraries except the target. Select the library whose content you want to copy over.
Step 5 - Confirm the operation
A warning dialog will appear explaining that:
The operation is not easily reversible
The source library will not be modified
An export (ZIP) of the target should be taken first
Click OK to proceed.
Step 6 - Wait for completion
The operation runs a SQL stored procedure that copies all library data. For large libraries this may take up to 5 minutes. Do not close the application during this process.
Step 7 - Review the confirmation report
A post-operation report confirms the overwrite completed. If any issues occurred, the report will note them and advise contacting Access support or restoring from DB backup.
What Changes During an Overwrite
What is preserved from the target library
Field | Value after overwrite |
Library name | Original target name (unchanged) |
Display text | Original target display text (unchanged) |
Description | Original target description (unchanged) |
Project links | All projects that used the target library remain linked to it |
What is replaced (comes from source)
Everything else. The following data is deleted from the target and re-created as a full copy of the source:
Data category | Tables affected |
Library header | disam.Libraries |
Activity heading codes | disam.AchdLibraryItems |
Resource codes | disam.CodeLibraryItems |
Adjustment items | disam.AjstLibraryItems |
Job heading codes | disam.JchdLibraryItems |
Resource rates | disam.RateLibraryItems |
Description items | disam.DescLibraryItems |
Overhead codes | disam.OchdLibraryItems |
Group titles | disam.GrptLibraryItems |
Formula items | disam.FormLibraryItems |
Extended descriptions | disam.EdesLibraryItems |
Rate formula parts | disam.LibraryRateFormulaParts |
Form formula parts | disam.LibraryFormFormulaParts |
All StoredItems data (15 tables) | StoredItemsBillHeadings, StoredItemsMainBillItems, StoredItemsResources, etc. |
User-library associations | dbo.UserLibraryStoredItems |
What is NOT updated (important limitation)
Library Overwrite does not update a project’s own job resources (RateJobItems / R records). This is by design.
When items are added to a project from the library, they become independent copies inside the project. The library acts as a template or catalogue, once loaded into a project, the R records live independently and may have been manually adjusted by the estimator. Automatically updating them during an overwrite would risk overwriting those manual changes and causing data corruption, so the system deliberately does not do this.
⚠️Warning: If a customer expects that overwriting library B with library A will automatically update job resource rates in their existing projects - this will not happen.
Each project’s R records are independent. To update rates in existing projects, items must be re-inserted or manually updated within the project.
Internal Execution Sequence
For reference — this is the order in which the system performs the overwrite:
Step | Action |
1 | Save target library identity (Id, DisplayText, Description) |
2 | Validate source exists in DISAM |
3 | Delete all StoredItem data for the target library |
4 | Delete UserLibraryStoredItem associations for the target |
5 | Rename target to a temporary name (__ow_XXXXXXXX) in both dbo and disam |
6 | Copy all source library data to the target name via sp_CopyLibrary (SQL transaction, 5-min timeout) |
7 | Relink all projects from old target ID to new target ID |
8 | Delete the temporary (renamed old target) data completely |
📌Note: If Step 6 fails, the system automatically rolls back and restores the original target name. The source library is never modified at any point.
Risks and Known Limitations
⚠️Warning: There is no single wrapping transaction across the entire operation. If the process is interrupted between steps 3 and 6, the target library may be left in a partially deleted state.
Manual database intervention may be required.
This is why taking a ZIP backup before the operation is strongly recommended.
Known risks
Risk | Detail | Mitigation |
No full rollback | Steps 3–8 are separate; a crash mid-operation can leave orphaned data or a missing library | Always export ZIP before overwriting |
StoredItems deleted before rename | If an error occurs between step 3 and step 5, the library exists but its stored items are gone | As above — ZIP backup is the only user-level protection |
Lock check is advisory | Locks are tested and released before the operation starts; another user could lock a project in the window between the check and the overwrite | Ensure all users close the relevant projects before proceeding |
Orphaned __ow_* records | If the cleanup of the temp library (step 8) fails silently, __ow_* rows may remain in dbo.Library and disam.Libraries | Raise with Access support if suspected; requires DB query to identify |
Large library timeout | The SQL stored procedure has a 300-second timeout; very large libraries on slower SQL servers may fail mid-copy | Contact Access support to increase timeout if needed |
Troubleshooting
Overwrite button is greyed out
Confirm you are logged in as a Master user
Confirm the target library shows as Installed
Confirm at least one other installed library exists to use as source
Operation blocked — project lock message
Another user has a project open that uses either the source or target library. The error message will show the username and project name.
Ask the named user to close their project and try again
If the user is not available, the project lock will expire when their session closes
Operation appears to hang
The SQL copy step can take up to 5 minutes for large libraries. Do not close the application. If it exceeds 10 minutes, contact Access support.
Library appears missing after failed overwrite
If the process was interrupted mid-operation, the target library may have been renamed to a temporary name beginning with __ow_. In this case:
Do not attempt another overwrite
Contact Access support with the library name and approximate time of failure
Support can identify the __ow_* record and restore the library via database
Projects show wrong library after overwrite
All projects should automatically be relinked to the target library after the overwrite (step 7). If a project still references the old library, contact Access support - this may indicate step 7 failed partially.
When to Escalate to Engineering
Escalate to the development team if any of the following are observed:
Orphaned __ow_* library records persisting in the system
Projects unlinked from library after a completed overwrite
Stored items missing from a library that shows as installed
SQL timeout errors during the copy step
Any data visible in the source library that did not copy to the target
📌Note: Reference ADO Work Item #2107167 (Overwrite Library) and the Devin investigation summary when raising engineering tickets for this area.
