Running SQL Query from within Excel using OTA?

All,

 

I have some monitoring SQL queries to run against SiteAdmin and/or individual ALM project databases. Management is now asking for a way to run these queries from within Excel. Looked around and noticed everyone using OTA APIs for reporting when it comes to Excel but my problem is different as it has to be SQL query so I am looking for direction how to run SQL query from within Excel. It will be like user having TDAdmin privileges clicking on a button for SQL to run and pull data in same or new spreadsheet

 

PS: I'll be using TDAdmin account to run queries as I dont have a DB account so direct connectivity to DB via ODBC is a no go unfortunately. Any sample code or high level view is highly appreciated. All I need to know is how to execute SQL and save results in Excel assuming TDConnection is used for connection.

 

Thanks!

Tags:

Parents
  • You need to access the Command object of the OTA API to run a SQL query.

     

    Sample code is available in the OTA API reference document.

     

    Carefully review the Remarks given for the Command object. You will have to set a Site Configuration parameter to enable use of the Command object, and once enabled it is accessible to all users. It can't be restricted on a per user basis.

Reply
  • You need to access the Command object of the OTA API to run a SQL query.

     

    Sample code is available in the OTA API reference document.

     

    Carefully review the Remarks given for the Command object. You will have to set a Site Configuration parameter to enable use of the Command object, and once enabled it is accessible to all users. It can't be restricted on a per user basis.

Children