JIRA CLI runfromsql error

I am running the below query from JIRA CLI.  I am getting result of the query along with some error.

I am using JIRA 6.3.11, CLI 3.0.0 and oracle database.

Below is the CLI command I am running.

jira --action runFromSql --sql "select count(*) from jiraissue" --host "hostname" --driver "oracle" --database "databasename" --dbUser "username" --dbPassword "password"

I am getting the result of the query along with the error message.

Run: --cOUNT(*) "169347"

Error: Unknown flag 'cOUNT(*)'.
Error: Unexpected argument: 169347
Error: Parameter 'action' is required.

Client error: 1 actions failed

Please help me to fix this error.

1 answer

runFromSql is used to run a specific CLI action for each row from the result set. What action where you intending to run for your scenario? Your query isn't producing a valid action and so your are getting an error trying run it. Examples as a simply example.

Hi Bob Swift, I am trying to get the count of the issues in my jira instance and I am trying to run query in DB to get the count. Please let me know how do I change the command ??

I don't want to run any CLI action for the value returned by the query, My query just retuns the number of tickets (169347 in my case) and I dont want to run any CLI actions on this value.

You don't need the CLI to run a query :)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,110 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot