There are no command line tools provided with TSCO to query the database. What is your final goal?
If you need to create custom reports, the typical way to query the TSCO database is by using Data Marts.
- Managing data marts for custom views, reports, and report templates - Documentation for BMC TrueSight Capacity Optimizat… ).
- Accessing data using public views - Documentation for BMC TrueSight Capacity Optimization 20.02 - BMC Documentation
If you need instead a command-line tool for debugging purposes (i.e. to test the database connectivity) or to run SQL scripts, you can use tools like SQLPlus (for Oracle) or psql (for Postgres):
Just for maintenance purpose.
for instance deleting wrong version of ETL deployed,
I have to run the statement :
delete from deployment_activity where deplactivityid = XXXX;
here XXXX is the ID of the ETL.
It should not be difficult to create one as there is already jdbc connection used with the database.
If I had this embedded utility present using the current connection and its credential to the data base regardless whether it's Oracle DB or postgress.
I just have to run
runjava util "delete from deployment_log where deplactivityid = XXXX"
runjava util "delete from depl_activity_props where deplactivityid = xxxxx"
runjava util "delete from deployment_activity where deplactivityid = xxxxx"
runjava util "commit"
I see. At the moment you should use SQLPlus/psql tools or even a desktop tool (like SQLDeveloper, DBeaver) that allow to create and store connections to the DB for quick access.
By the way feel to open an Idea on this community if you think a command line tool could help for maintenance purpose.
yeah the pb with those tools is that you have to find all the connection details and sometime I don't know what is the database, schema, user password ... etc whereas with a java tool you can use current jdbc connection.
If you know where are those information stored with the encrypted password, that will help to create my own tool.
The types of queries you have shared assumes some knowledge about tables that are not publicly exposed, and an understanding of all the tables that need to updated in order to complete the delete action.
In general, you should be using a documented interface in order to interact with the TSCO (e.g. public views or API). Having said this, clearly in the example you shared, you are attempting to use some utility to perform a type of maintenance activity in TSCO, and there isn't an equivalent API that would support this type of activity. Perhaps you are trying to automate this process.
My recommendation in case you are considering to create an Idea is to request for additional API support to assist in the maintenance activity you want to automate in TSCO, and provide list activities of or examples thereof that you want to automate for consideration.
Michael D. West
I would like to reformulate my question :
Is there a file in BCO which contains the username, encrypted password and hostname of the database, so can use them with java tool ?
2 of 2 people found this helpful
Some DB-related info are available in the TSCO Console UI itself. Administration tab >System>Global Configuration > Advanced > Console panel (see the screenshot below).
For passowrds of DB owner you should be asking about that to the people that did the installation in your environment.
In case they have used the defaults, the default schema owner user is BCO_OWN. The default passwords for the TrueSight Capacity Optimization database default users are documented at: Configuring the Application Server - Documentation for BMC TrueSight Capacity Optimization 20.02 - BMC Documentation
I hope it helps,
Thanks Maria !