- Print
- PDF
How Do I Delete Revisions From Configurations Stored in The Lasernet Config Server Database?
You can delete old configuration revisions from the Lasernet Config Server database as part of your housekeeping routine.
We recommend reducing the size of the database by removing old revisions, particularly if it takes a long time to read your configuration in Lasernet Developer, or if the software frequently times out before it fully loads.
This process uses the clean command provided by LnConfig.exe. The steps differ depending on whether Config Server uses a LocalDB database or SQL Server.
Note (Lasernet 11 only)
The Config Server in Lasernet 11 supports only SQL Server. For Lasernet 11 instructions, see SQL Server.
Tip (Lasernet 10 only)
To find information about the Lasernet Config Server database (including its type):
Start Lasernet Server License Manager 10.
Click the Lasernet Config row in the instance table.
Click Edit in the toolbar.
Refer to the information in the SQL Server properties for Lasernet Config service window.
Warning
This is more likely to affect your User Acceptance Testing (UAT) or Development (DEV) instances where you are editing forms and modules regularly, especially if you have grab mode on constantly. To mitigate, click Patch when testing any changes on the Developer, and only click Commit and Deploy when you are moving the build to the Production server.
The clean Command
Lnconfig.exe has a clean command, which removes old revisions from all Lasernet configurations. This command has a <RevisionsToKeep> parameter to specify how many revisions to retain. The most recent revisions are retained, and all older revisions are deleted.
For example, LnConfig.exe -clean 100 retains the most recent 100 revisions of every Lasernet configuration and deletes all others.
Clean the Lasernet Config Server Database
The steps differ depending on whether Lasernet Config Server is using a LocalDB database (Lasernet 10 only) or SQL Server database (Lasernet 10 or Lasernet 11).
LocalDB
If Lasernet Config Server is using a LocalDB database, follow these steps:
Click the Services icon in the Windows Start menu. In the Windows Services window, stop the Lasernet Config service.

Start the Windows Task Manager, right-click sqlservr.exe, then click End task.
Note
This process handles LocalDB for the service instance and the config instance. Because it is not a service, you cannot stop it through the Windows Services window.

Run File Explorer and back up the existing database. This database is in
C:\ProgramData\Formpipe Software\Lasernet <version number>\Config\Default\Databases.Right-click the Command Prompt icon in the Windows Start menu, then click Run as administrator. In the Command Prompt window, navigate to
C:\Program Files\Formpipe Software\Lasernet <version number>.Run
LnConfig.exe -clean <number of revisions to keep>. For example, to keep the last 100 revisions, runLnConfig.exe -clean 100. The following image shows the documentation forLnConfig.exe; a red box indicates the description of the-cleanparameter.
Note
A log will be shown containing the following information:
Trimming excess revisions in configuration ‘NAME OF CONFIGURATION’... <rows affected> number of rows affected by trimming.
Click the Services icon in the Windows Start menu. In the Windows Services window, start the Lasernet Config service.
SQL Server
If Lasernet Config Server is using a SQL Server database, follow these steps:
Click the Services icon in the Windows Start menu. In the Windows Services window, stop the Lasernet Config service.

Start SQL Server Management Studio and back up the existing database.
Right-click the Command Prompt icon in the Windows Start menu, then click Run as administrator. In the Command Prompt window, navigate to
C:\Program Files\Formpipe Software\Lasernet <version number>.Run
LnConfig.exe -clean <number of revisions to keep>. For example, to keep the last 100 revisions, runLnConfig.exe -clean 100. The following image shows the documentation forLnConfig.exe; a red box indicates the description of the-cleanparameter.

Note
A log will be shown containing the following information:
Trimming excess revisions in configuration ‘NAME OF CONFIGURATION’... <rows affected> number of rows affected by trimming.
Click the Services icon in the Windows Start menu. In the Windows Services window, start the Lasernet Config service.