Looking for help?
< All Topics

LeanCOST version update (MsSQL database)

This article describes how to update LeanCOST both server-side and client-side, with database on MsSQL.

1. Introduction

To update LeanCOST you’ll need to download some files from a few links: you shall check for each “.zip” file you download that it does not have a security block and eventually disable it, by applying the following procedure:

  1. Right-click with the mouse on the downloaded “.zip” file
  2. Select “Properties” option in the context menu which will open and then go to the tab named “General”.

If the “.zip” file is blocked, you will see the button or the box “Unblock”. In this case:

  1. Press “Unblock” button or tick “Unblock”.
  2. Press “Ok” to save the changes.

2. Server-side procedure

Server-side you need to update the “LeanCOSTDB” database. The following procedure must be applied on the MsSQL instance that stores the “LeanCOSTDB” database in use to update it with the one you downloaded from the link sent by Hyperlean.

Database backup

First of all, it is necessary to backup the database that is in use.
Log-in the instance where the “LeanCOSTDB” database is stored and open the “Databases” node. In the databases tree, select the database named “LeanCOSTDB” and right click on it: in the context menu that will appear, select the voice “Tasks” and, then, in the second menu which will open after this selection, choose “Back Up”.

The “Back Up Database” window will open, here:

  1. Choose “Full” as”Backup Type”
  2. Click the “Remove” button to delete the default destination folder
  3. Click “Add…” to choose where to save the new file.

Press the “….” button in the next window, to choose the destination path where the backup file will be saved.

After choosing the path, type the new file name, followed by the “.bak” extension.

You’ll be redirected to the backup window: here press “Ok” and the backup will start.

Once the backup is done, you’ll receive this message.

Database restore

Once you backed up the current database, it’s possible to update it by restoring the “.bak” file sent by Hyperlean support.

Log-in the instance where the “LeanCOSTDB” database is stored and open the “Databases” node. In the databases tree, select the database named “LeanCOSTDB” and right click on it then select “Tasks” -> “Restore” -> “Database…” in the context menus.

The “Restore Database” window wil open: here follow the steps shown in the next picture.

Once pressed “OK” at step 6 of the previous image, the path of the file “LeanCOSTDB.bak” to restore will appear in the “Select backup devides” window: here press “OK” to go on with the restoration.

After having pressed “OK” you’ll be redirected to the “Restore database” window.
If you want to change the path where the data and log files will be savedelect “Files” in the left menu, check “Relocate all files to folder” and type the desired path in the “Data file folder” and “Log file folder” textboxes.
Make sure the paths are correct in the “Restore As” column.

Now, select “Options” in left menu and select “Overwrite the existing database (WITH REPLACE)” option and, finally, press “OK” button to start the restoration.

Once the restoration procedure has been completed, you’ll recieve this message meaning that the database was updated.

Setting the “db_owner” user

To let LeanCOST open successfully with the updated database, it is necessary to check that the user created for the LeanCOST database (usually named “leanuser”) is “db_owner” of the “LeanCOSTDB” database.

Open “Security” node in the SQL instance where the LeanCOST database is stored. Open the subnode named “Logins”: here there will be the user created for LeanCOST database (suggested name = “leanuser”).
Select the user created for LeanCOST database, right click on it and select “Properties” voice in the context menu.

The “Login Properties” window will appear: select “User Mapping” on the left.
Then, select “LeanCOSTDB” database under the “User mapped to this login” table. Finally, check that “db_owner” is flagged. If it is not, select it and press “OK”.

3. Client-side procedure

The necessary file for this part is the “LeanCOST_xx.x.x_installer.zip” that contains the installer-package of the new version of LeanCOST that you downloaded from the link sent by Hyperlean. Save the “zip” file inside the shared folder with LeanCOST material then follow this procedure.

It is necessary that user has administrator rights on the PC where to install the new version of LeanCOST.

Go to the shared folder named “LeanCOST” (located on the server) and temporarily copy the installer package on your desktop. At the end of the update, whether successful, you can delete it.

Run “Setup.exe” to update LeanCOST (by double clicking with the mouse or from command line). The LeanCOST setup process will start.

Click “Next” in the welcome window.

Tick “I agree” to accept EULA then click “Next”.

Press “Next” until the end of the procedure.

Click “Close” to end the installation.

To run LeanCOST, double-click on the desktop icon.

Select language, type your username and password, then click “Ok”.

Wait for the LeanCOST interface to open.

If LeanCOST has the CAD import enabled, we suggest you test this feature right after the update.

If you run into any problems, contact support@hyperlean.eu.

Table of Contents