muhammad.irfan

MS SQL Collation Problems during reinstalling of SLM

Discussion created by muhammad.irfan Employee on Mar 12, 2019

NOTE: The solution in this article is given without a guarantee and it need experience and a deeper understanding of the SLM/SI and MS SQL solutions given. If you don’t feel comfortable with applying these yourself, please contact your local Snow contact for assistance.

 

Many colleges contacted me because they can’t reinstall Snow license Manager and it is hard to trouble shoot the problem because error message is not clear.

 

Problem Background:

Sometimes due to any reason we need to reinstall SLM. Customer want to keep all old data after reinstalling SLM. Normal procedure is we take SLM database back and delete the SLM database and uninstall SLM.

During reinstallation of SLM, install ends up with the following error message after entering SQL server information. 

 

From the error message it seems Snow Inventory server 3.7 is installed but, Snow inventory server is on version 5.x or 6.x.

Problem root Cause:

Problem is because of MS SQL server and Snow inventory server collation mismatch. Please run the following script before starting the actual task.

 

DECLARE @INVCollation  nvarchar(50), @SLMCollation nvarchar(50), @systemcollation nvarchar(50)

SET @INVCollation = CONVERT(nvarchar(100),DATABASEPROPERTYEX('Snowinventory', 'Collation'));

SET @SLMCollation =  CONVERT(nvarchar(100),DATABASEPROPERTYEX('Snowlicensemanager', 'Collation'));

SET @systemcollation =CONVERT(nvarchar, CONVERT(nvarchar(100),SERVERPROPERTY('Collation')));

 

            IF

                         @INVCollation <> @systemcollation 

                         PRINT N'Inventory DB and SQL Server collation is different and it is not possible to upgrade/reinstall SLM'

                         +'SQL Server Collation is  = '+@systemcollation

                         +'Inventory Collation is   = '+@INVCollation

 

            IF

                         @SLMCollation <> @systemcollation 

                         PRINT N'SLM DB and SQL Server collation is different and it is not possible to upgrade/reinstall SLM'

                         +'SQL Server Collation is  = '+@systemcollation

                         +'SLM DB  collation is     = '+@INVCollation

 

            IF

                         @INVCollation <> @SLMCollation 

                         PRINT N'Inventory and SLM DB collation is different and it is not possible to upgrade/reinstall SLM'

                         +'SQL Server Collationis   = '+@systemcollation

                         +'Inventory collation is   = '+@INVCollation

 

            If

                         @INVCollation = @SLMCollation 

                         AND

                         @SLMCollation = @systemcollation 

                         AND

                         @INVCollation = @systemcollation 

                         PRINT N'MS SQL Server, Inventory DB and SLM DB collation is same and ready for upgrade/Install'

 

If in the results it shows:

 “MS SQL Server, Inventory DB and SLM DB collation is same and ready for upgrade/Install

Please continue and reinstallation should work fine.

But if it shows any mismatch of Collation please follow the Solution section.

 

Solution:

Uninstall SLM and Snow Inventory application (Please make sure you saved all necessary configurations, port, certificate etc.).

Take the backup of SnowInventory and Snowlicensemanager databases (Make sure you have SQL sa account etc.).

Delete the SLM and Snowinventory databases.

Install Snowinventory and Snow License Manager (It will create new snowinventory and snowlicensemanager databases).

Delete the new inventory and Licene manager databases.

Restore old inventory and license manager database from backup.

Make sure SMACC connection is working and snowinventory server is processing the files.

Remap the license manager user in database.

Outcomes