Query OCUM6 Database using PowerShell

by Frequent Contributor on ‎2014-12-09 09:50 AM

Hi All,

Thought i'd share an example of how to query the OCUM6 database using PowerShell from a remote windows server using the MySQL .NET connector (see attached code). Download the MySQL Connector here:

http://dev.mysql.com/downloads/connector/net/

NOTE: this assumes you have added a database user to OCUM matching the $username and $password variables.

Hope that helps

Cheers Matt

P.S...also you might find the following free app useful for connecting to the OCUM6 database, browsing the views and writing SQL queries

http://www.heidisql.com/

Comments

Great information, works well. I unlocked the root user and now have access to additioanl DBs from OCUM.

can you share how you unlocked the root user?

 Matt,

 

Thanks for sharing! We now have OCUM v7.0, jumped from v5.2. Suddenly, I can not get most of my reports ( from DFM Operations Manager->Reports; from DFM CLI : dfm volume/aggr get/set ...), so, as you know, are those limited canned reports in OCUM 7.0 ( such as capacity report for storage summary, aggregates,etc.) available in the ocum_report database, I browsed the views (with DBVisualizer, not HeidiSQL) and could not find any.

 

Or, are there any other databases other than ocum_report? like mentioned above by 

 

 

Timothy,

 

Have you looked into creating custom reports using eclipse/BIRT?  You can find how to setup that up in the OCUM 7.x admin guide.  But to be honest i found the learning curve's ROI to be little more than i bargained for, so i went with what im familiar with which is sql queries to ocum and manipulating in python(powershell might be better since you could combine with the netapp powershell cmdlets) rather than attempting to create something in eclipse.

Hi 

 

 

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.