Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

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: 287 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
22:22, 22 Jun 2016

Tags

Classifications

Public