Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

Home > Success Center > Network Performance Monitor (NPM) > Find tables and views containing column with specific name

Find tables and views containing column with specific name

Table of contents
Created by Mariusz Handke, last modified by MindTouch on Jun 23, 2016

Views: 2,889 Votes: 1 Revisions: 5

Overview

This article provides information on how to find tables and views containing column with specific names in the database, which may be useful while working on Orion and facing issues.

Environment

All Orion Platform versions

Steps

Note: In the following example, all tables and views where some column names contain NodeID):

  1. Make sure to backup database, although dropping views has no impact on stored data.
  2. Open SQL Server Management Studio (SSMS)
    Note: You can also use Orion Database Manager
  3. Use the following query to drop all views:

    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;

Last modified

Tags

Classifications

Public