Network Management

Upgrade issue "An unsupported version of the SAM Database has been detected on the following databases..."

When upgrading to the new versions of products using Orion Core 2016 and the user does not have a current (or any) version of SAM installed but did at one point in time the Pre-Check will show the below. Error "An Unsupported version of the SAM Database has been detected on the following Databases"

First published date

10/16/2018 9:07 PM

Last published date

5/9/2019 3:09 PM

Overview

When upgrading to the new versions of products using Orion Core 2016 and the user does not have a current (or any) version of SAM installed but did at one point in time, the Pre-Check will show the following message: 


Upgrading is not recommended. Correct the following issues, and run the installer again.

An unsupported version of the SAM Database has been detected on the following databases: NetPerfMon. Continuing will result in the Configuration Wizard failing.

Click for more details.
 

Product section

Orion Platform

Cause

At one point, SAM was installed either as a full version or as an evaluation and the tables are still in the database. 

Resolution

Warning: SolarWinds strongly recommends that you backup your database before doing any work as this will make a permanent change to your database.
 

  1. DECLARE @table_object_id int
    DECLARE @table_name varchar(max)
    DECLARE @table_type varchar(max)
    DECLARE @stmt nvarchar(max)
    	 
    DECLARE table_cursor CURSOR FAST_FORWARD FOR
    SELECT o.object_id, o.name, o.[type]
    FROM sys.objects o
    WHERE o.[type] IN ('FN','TF','V','P','U') AND o.name LIKE 'APM_%' AND o.name NOT LIKE '%APM_Hardware%'
    ORDER BY CASE o.[type] WHEN 'U' THEN 'z' ELSE o.[type] END
     
    OPEN table_cursor	 
    FETCH NEXT FROM table_cursor INTO @table_object_id, @table_name, @table_type
    WHILE @@FETCH_STATUS=0
    BEGIN
    SET @stmt = CASE @table_type
    WHEN 'V' THEN 'VIEW'
    WHEN 'P' THEN 'PROCEDURE'
    WHEN 'FN' THEN 'FUNCTION'
    WHEN 'TF' THEN 'FUNCTION'
    ELSE 'TABLE'
    END
    	 
    SET @stmt = 'DROP '+@stmt+' ['+@table_name+']'
    PRINT @stmt
    EXEC [dbo].sp_executesql @statement = @stmt
    FETCH NEXT FROM table_cursor INTO @table_object_id, @table_name, @table_type
    END
     
    CLOSE table_cursor
    DEALLOCATE table_cursor
    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetApmDbVersion]') AND xtype in (N'FN', N'IF', N'TF'))
    BEGIN
    DROP FUNCTION GetApmDbVersion
    END;

    Note: To copy content without line numbers, hover over the text and click the view source button. This opens a new window where you can select and copy text without any formatting or line numbering.
  2. Re-run the installer.