Migrate the SolarWinds Platform database to or from a Microsoft Azure database solution
Last Updated: March 23, 2021| Migration Guide
Supports: SolarWinds Platform products using SQL database that support Azure database solutions (2019.2 and later for Azure SQL, 2019.4 and later for Azure Managed Instance)
This guide details how to migrate your SolarWinds Platform database to a Microsoft Azure database solution (Azure SQL or Azure Managed Instance) and the other way round.
Migrating allows you to keep all relevant data and history without having to start with a fresh database on a new server.
You may need to migrate if...
- The database shares a server with a poller or other products
- The database is encountering performance and disk space issues
- The supported version or requirements for the database have changed
Recommendations
- Always use a dedicated server for the SolarWinds Platform database. You should not migrate the SQL database to servers already in use.
- Use SQL Server Authentication with the
sa
login and password to ensure that Orion can access the SolarWinds Platform database, even if it is hosted remotely on a separate server.
How do I migrate?
- Review the database migration requirements.
- Review the before-you-begin recommendations.
- Migrate:
- Learn more
Task 1: Review the database requirements migration
Task 2: Review the Before you begin hints
Review the recommendations specific for the migration between the MS SQL Server and an Azure database solution (Azure SQL or Azure Managed Instance) and general migration requirements.
Recommendations specific to migration between MS SQL server and Azure SQL
-
Make sure you upgraded all deployed SolarWinds products to a version that supports Azure SQL. If there is but one that does not support Azure SQL, you cannot migrate the database to the Azure SQL cloud.
-
If you are migrating from SQL 2016.1 SP1 or later, complete the following steps:
- Check whether the Azure database tier you're migrating to supports memory-optimized OLTP storage*. Use the following links:
- vCore based model (© 2019 Microsoft, obtained from https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits-single-databases on April 21, 2019)
- DTU-based model (© 2019 Microsoft, obtained from https://docs.microsoft.com/en-us/azure/sql-database/sql-database-vcore-resource-limits-single-databases on April 21, 2019)
-
If your tier does not support memory-optimized OLTP storage*, find out whether you are using it. Run the following query:
SELECT * FROM dbm_DatabaseProperties WHERE [Key] = 'TimeSeries.MemoryOptimizedTables'
-
If
TimeSeries.MemoryOptimizedTables = true
, openC:\Program Files (x86)\SolarWinds\Orion\ConfigurationWizard.exe.config
, set<add key="TimeSeries_MemoryOptimizedTables_Enabled" value="false"/>
, and run the Configuration wizard.
- Check whether the Azure database tier you're migrating to supports memory-optimized OLTP storage*. Use the following links:
-
If you are migrating from Microsoft SQL 2016 RTM or earlier you won't be able to migrate back. This is because after the migration to Azure SQL, the database will use Column Store that is not supported in the earlier SQL Server versions.
-
Make sure the server hosting your SolarWinds Platform server is using Central European Time (UTC). Azure SQL uses UTC and if your settings are different, you might experience issues with polled data.
-
Run the following query on the SolarWinds Platform database to ensure that guest account settings do not block the migration:
REVOKE CONNECT FROM guest
Recommendations for the Azure Managed Instance migration
If your current database uses a memory-optimized file group, you need to disable it to be able to migrate to an Azure Managed Instance.
-
To find out whether it is the case, run the following query:
SELECT * FROM dbm_DatabaseProperties WHERE [Key] = 'TimeSeries.MemoryOptimizedTables'
- If
TimeSeries.MemoryOptimizedTables = true
, disable memory-optimized tables:- Open
C:\Program Files (x86)\SolarWinds\Orion\ConfigurationWizard.exe.config
. - Set
<add key="TimeSeries_MemoryOptimizedTables_Enabled" value="false"/>
. - Run the Configuration wizard.
- Open
General migration recommendations
- Discuss database migrations with a DBA.
- Schedule a maintenance window to migrate, during non-peak hours (recommended), and notify your company when taking services offline to migrate.
- Be aware that during the database migration, your services are down and not collecting polling data.
- Do not uninstall the SolarWinds Platform database instance on the original SolarWinds Platform server because this causes issues with the SolarWinds Platform server and settings.
Task 3a: Migrate the SolarWinds Platform database from SQL Server to the Azure database solution (Azure SQL or Managed Instance)
1. Stop SolarWinds services | Open the SolarWinds Platform Service Manager, and stop all SolarWinds services. | |
2. Back up the SQL database |
Back up your SolarWinds Platform database. If you need help, please check your vendor's site for documentation and instructions. If you have your database on a VM, create a snapshot or copy of your VM. |
|
3. Clean redundant spaces in column names |
Run the following script on your SolarWinds Platform database to prevent redundant spaces in column names:
If the following issue occurs when exporting the database to the bacpac format, back up your database and run the following script. Error SQL71501: Error validating element [dbo].[Cortex_CS_Orion_ApiPoller_ApiPoller_Metrics]: View: [dbo].[Cortex_CS_Orion_ApiPoller_ApiPoller_Metrics] has an unresolved reference to object [dbo].[Cortex_CS_Orion_ApiPoller_ApiPoller_Metrics_Detail_legacy]. Reorganize Views to fix export issues
If you encounter the following issue when exporting to bacpac, create a login for the user or delete the user. See the topic on troubleshooting orphan users in Microsoft help (©2020 Microsoft, obtained from https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/troubleshoot-orphaned-users-sql-server?view=sql-server-ver15 on September 29, 2020). Error SQL71564: Error validating element [Username]: The element [Username] has been orphaned from its login and cannot be deployed. |
|
4. Migrate the database to an Azure database solution |
To migrate to Azure SQL: Run the Deploy Database to Microsoft Azure SQL Database task. You can also use the Export Data-tier Application to save the database file to a drive or to the Azure storage and then go to SQL Studio on the Azure SQL server and Import Data-tier Application. To migrate to Azure Managed Instance:
|
|
5. Run the Configuration wizard on all servers |
Perform the following instructions on all servers in your SolarWinds Platform environment to update the location for the SolarWinds Platform database:
If you are using a custom port for your SQL server, see Using Orion with a MS SQL server listening on a custom port.
|
|
6. Start services | Start your services on the main and additional polling servers. |
Results:
The SolarWinds Platform database is migrated to your Azure database solution (Azure SQL or Azure Managed Instance).
Task 3b: Migrate the SolarWinds Platform database from an Azure database solution to an SQL Server
Migrating the Log Analyzer database or the NTA Flow Storage database from a Azure database solution (Azure SQL or Azure Managed Instance) to an on-premises database is not supported, and the LA- or NTA-specific data is lost.
If you migrate the SolarWinds Platform database from an Azure database solution to an on-premises SQL Server, all settings, configurations, and CBQoS data specific for Log Analyzer or NTA are migrated, because they are stored in the SolarWinds Platform database.
1. Stop SolarWinds services | Open the SolarWinds Platform Service Manager and stop all SolarWinds services. | |
2. Back up the SQL database |
Back up your SolarWinds Platform database. If you need help, please check your vendor's site for documentation and instructions. If you have your database on a VM, create a snapshot or copy of your VM. |
|
3. Migrate the database to SQL Server on premise |
|
|
4. Run the Configuration Wizard on all servers |
Perform the following instructions on all servers in your SolarWinds Platform environment to update the location for the SolarWinds Platform database:
If you are using a custom port for your SQL server, see Using Orion with a MS SQL server listening on a custom port.
|
|
5. Start services | Start your services on the main and additional polling servers. |
Results:
The SolarWinds Platform database is migrated from the Azure database solution to the SQL Server on premises.
After the migration to SQL Server
When migrating your database from an Azure database solution (Azure SQL or Azure Managed Instance) to Microsoft SQL Server, SolarWinds suggests that you change the options back to defaults for SQL Server:
-
Run this query to turn the "Is Read committed snapshot" to false:
ALTER DATABASE dbname SET READ_COMMITTED_SNAPSHOT OFF
-
Run this query to turn the recovery mode to simple:
ALTER DATABASE dbname SET RECOVERY simple
Troubleshoot a Configuration wizard issue (User cannot be added to the database)
If you need to re-run the Configuration wizard after the migration, the default SWOrionUser created during the migration does not have enough privileges to access specific tables and functions. The Configuration wizard fails to read the account information from the database and tries to create a new user with the same name, thus failing with a message that the user cannot be added to the database.
To resolve the issue, assign the following roles to the SWOrionUser. Run the following script on the SolarWinds Platform database.
ALTER ROLE dbmanager ADD MEMBER [SWOrionUser];
ALTER ROLE loginmanager ADD MEMBER [SWOrionUser];
Learn more
- See SQL Server configuration best practices for more info on recommended SQL settings.
- Review our database best practices for helpful maintenance tips.
- If you are upgrading, check the SolarWinds Upgrade Guide.
*Memory-optimized tables, also known as In-Memory OLTP: a feature available in MS SQL Server 2016 and 2019 that improves the performance of transaction processing, data ingestion, data load, and transient data scenarios. Memory-optimized tables are only used for nodes and volumes.
The scripts are not supported under any SolarWinds support program or service. The 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.