This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Any way to export Top SQL Statements to file or read in the dpa_repository database?

I'm just getting started in DPA and I'm looking to export data from our Top SQL Statements report to a CSV, or track the data from a historical record set on the dpa_repository database.  I would like to use this data for benchmarking when we migrate our SQL Servers from our local WAN to an offsite location.  I'm interested in tracking other historical data including hard drive consumption and derive an estimated date where the system drives will reach a critical performance threshold (95% for example).  Let me know if you can help with any of this.

Thanks,

Mike

  • Capacity planning comes out of the box with SAM (an Orion module for servers and applications). However, you could create a custom metric in DPA to show overall storage usage.

    What databases are you monitoring (Oracle, SQL, other)?

    For top SQL, you can query the summary tables (it's going to be a LOT more performant than going against detail).

    Try something like:

    select name, id from cond -- to get the name of the instance you want the top SQL from

    select sqlhash, sum(timesecs)/60

    from con_sql_sum_<id from above query>

    where period = 'D'

    and datehour between '<begin date>' and '<end date>'

    group by sqlhash, timesecs

    order by timesecs desc

  • Thanks for the tip.  I was hoping to find a way to export raw data to a csv file but I could probably use this to create my own SQL Server report.

    Do you know if Solarwinds provides any documentation on their database structure?

  • For that, I'd recommend opening up a support case. I know we've shared information about the ERD previously...