Network Management
Find tables containing columns with a specific name in the Orion database
This article provides information on how to find tables containing columns with specific names in the database. This can help you troubleshoot Orion Platform issues.
First published date
Last published date
Overview
When troubleshooting Orion Platform issues, you might need to find tables containing columns with specific names in the database. Use a SQL query to do so.
Product section
Resolution
The following example finds all tables with column names that contain NodeID. Customize the query.
- Make sure to back up your database.
- Open Microsoft's SQL Server Management Studio (SSMS).
You can also Use Database Manager to view the SolarWinds database. - Use the following query to list all tables meeting your criteria:
-- 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. SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%NodeID%' /* adjust filter criteria here */ ORDER BY schema_name, table_name