Quantcast
Channel: THWACK: Document List - Network Performance Monitor
Viewing all articles
Browse latest Browse all 1956

Recover SQL/SWQL widgets from database (sql)

$
0
0

Hi All

 

There was an instance where client needed to create a new Orion database; however the SQL/SWQL from the old database were forgotten to be backed up.  

 

This script will display the widgets with the SQL/SWQL code which can be copied to the new instance of Orion.  Nice and simple and effective.

 

 

 

use SOlarWindsOrion

SELECT v.ViewGroupName, v.ViewTitle,r.ResourceTitle, rp.PropertyName, rp.PropertyValue

FROM Views v

join Resources r on r.ViewID = v.ViewID

join ResourceProperties rp on rp.ResourceID=r.ResourceID

where rp.PropertyName in('sql','swql') and ViewGroupName like '%loop%'

 

Thank you,

Amit


Viewing all articles
Browse latest Browse all 1956