Network Management
Configuration Wizard fails with "Database configuration failed: dbm_EnsureMEObjects" error due to incorrect default schema on the SolarWinds Platform
This article provides steps to resolve the Configuration Wizard failure with Database configuration failed: dbm_EnsureMEObjects errors caused by the SolarWinds database user's default schema being set to db_owner instead of dbo.
First published date
Last published date
Overview
When running the Configuration Wizard, it fails with an error similar to the following:
Database configuration failed:
dbm_EnsureMEObjects: dbm_CreateMEObjects: Cannot drop the procedure 'Ctx_C_Orion_CiscoAci_Apic_Del',
because it does not exist or you do not have permission.
dbm_CreateMETypeTable: Table: Ctx_C_Orion_CiscoAci_ApicData_man_1 already exists.
Exiting stored procedure.
All parameters: @tab_name: Ctx_C_Orion_CiscoAci_Apic, @table_type: Data_man, @table_part_nr: 1
dbm_CreateMETypeTable: Table: Ctx_C_Orion_CiscoAci_ApicData_poll_1 already exists.
Exiting stored procedure.
All parameters: @tab_name: Ctx_C_Orion_CiscoAci_Apic, @table_type: Data_poll, @table_part_nr: 1
This error can be found in the Configuration Wizard log at: C:\ProgramData\SolarWinds\Logs\Orion\ConfigurationWizard.log
Product section
Cause
The default schema of the SQL account used to connect to the SolarWindsOrion database was set to db_owner instead of the required dbo. As documented in the SolarWinds Platform requirements, users running the Configuration Wizard must have DBO specified as the default database schema.
When the default schema is db_owner, database objects (tables, stored procedures, functions, and table types) are created under the db_owner schema. The Configuration Wizard expects all objects under the dbo schema and fails when it cannot find or modify them.
Resolution
Step 1: Update the default schema of the database user to dbo
-
Open SQL Server Management Studio (SSMS) and connect to the SolarWinds Platform SQL instance with admin credentials.
-
Expand Security > Logins.
-
Right-click the SQL account used by the SolarWinds Configuration Wizard and select Properties.
-
Go to the User Mapping page.
-
Select the SolarWinds Orion database and change the Default Schema from
db_ownertodbo. -
Click OK to apply.
Step 2: Transfer all database objects from the db_owner schema to dbo
Open a New Query window against the SolarWindsOrion database and run the following scripts one at a time:
Transfer all tables:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
USE [SolarWindsOrion]; -- Replace with your database name
GO
DECLARE @sql NVARCHAR(MAX) = '';
SELECT @sql = @sql + 'ALTER SCHEMA dbo TRANSFER [db_owner].[' + t.name + '];' + CHAR(13)
FROM sys.tables t
JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE s.name = 'db_owner';
PRINT @sql; -- Review first
EXEC sp_executesql @sql;
GO
Transfer all stored procedures:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
DECLARE @sql2 NVARCHAR(MAX) = '';
SELECT @sql2 = @sql2 + 'ALTER SCHEMA dbo TRANSFER [db_owner].[' + p.name + '];' + CHAR(13)
FROM sys.procedures p
JOIN sys.schemas s ON p.schema_id = s.schema_id
WHERE s.name = 'db_owner';
PRINT @sql2; -- Review first
EXEC sp_executesql @sql2;
GO
Transfer all functions:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
DECLARE @sql3 NVARCHAR(MAX) = '';
SELECT @sql3 = @sql3 + 'ALTER SCHEMA dbo TRANSFER [db_owner].[' + o.name + '];' + CHAR(13)
FROM sys.objects o
JOIN sys.schemas s ON o.schema_id = s.schema_id
WHERE s.name = 'db_owner'
AND o.type IN ('FN', 'TF', 'IF'); -- Scalar, Table-valued, Inline functions
PRINT @sql3;
EXEC sp_executesql @sql3;
GO
Step 3: Run the Configuration Wizard
Run the Configuration Wizard as administrator. If it completes successfully, no further action is needed.
If the Configuration Wizard fails with the following error, proceed to Step 4:
Could not find the type 'CLM_AwsVpnConnectionData_man_1_Type'. Either it does not exist, or you do not have the necessary permission.
Step 4: Drop remaining table types under the db_owner schema
User-defined table types cannot be transferred via ALTER SCHEMA. They must be dropped and will be recreated by the Configuration Wizard under the correct dbo schema.
Run the following script against the SolarWinds Orion database:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
USE [SolarWindsOrion]; -- Replace with your database name
GO
DECLARE @sql NVARCHAR(MAX) = '';
SELECT @sql = @sql + 'DROP TYPE [db_owner].[' + tt.name + '];' + CHAR(13)
FROM sys.table_types tt
JOIN sys.schemas s ON tt.schema_id = s.schema_id
WHERE s.name = 'db_owner';
PRINT @sql; -- Review the list first
EXEC sp_executesql @sql;
GO
Step 5: Re-run the Configuration Wizard
Run the Configuration Wizard again as an administrator. The Configuration Wizard should complete with no errors.