Hide this message
Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.
One of the following errors appear during SAM installation where the previous version of SAM was installed:
Your database includes data from APM older than 3.0.
Invalid object name 'dbo.APM_ProcessEvidence_Detail'.
SAM v6.0 and later
There is a previous SAM version installed using the same database and data needs to be removed.
Warning: SolarWinds strongly recommends that you backup your database before doing any work as this will make a permanent change to your database.
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.