[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using powershell to extract data from an SQL Server 2008 R2 custom report

Posted on 2016-08-17
2
Medium Priority
?
86 Views
Last Modified: 2016-08-17
Heyas,

Modified the SQL Server 2005 Performance Dashboard Reports https://www.microsoft.com/en-au/download/details.aspx?id=22602 to work with SQL Server 2008.

How do I use PowerShell to call and extract data from these custom reports?

There is no reporting services model on my server so it can't be utilized.

Any assistance is appreciated.

Thank you.
0
Comment
Question by:Zack
2 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 2000 total points
ID: 41759139
Hi
I would advise to try the following approach:
Start up a SQL Server Profiler session to trace SQL against the server.
Then run the Performance Dashboard Report and afterwards examine the SQL logged in Profiler.
This may give an idea what SQL Server looks at to get the raw performance data - it is possibly some sort of system tables/views.
Then use Powershell Invoke-Sqlcmd cmdlet to execute similar SQL against these system tables/views to get the performance data.

Also please look into Powershell SMO for some ideas of interacting with SQL Server.
0
 

Author Closing Comment

by:Zack
ID: 41760348
Cheers for the input looking into Powershell SMO now.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses
Course of the Month18 days, 23 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question