Hi.
We are tightening our database permissions for security reasons. Therefore we want to substitute all the selects in the kepler database fields to procedures.
However, when trying to execute a procedure inside a kepler custom fields we get no data and following error pops out in logs:
2014-04-10 12:40:52,809 ajp-bio-8009-exec-85 ERROR ******** 760x1549579x1 1ip0t0b ******** /secure/QuickEditIssue!default.jspa [databasecf.querydb.impl.QueryDatabaseImpl] Could not execute SQL query >>EXEC procedurename<< on database DATABASENAME. java.sql.SQLException: Could not find stored procedure 'procedurename'.
When we execute the same procedure in management studio, using the same user that jira has defined in context.xml to connect to the database, we get all the data from the procedure.
When we use select in kepler, eveything works fine.
What may be wrong? Does Kepler supports exec sql command?
Hi,
You cannot use directly the result of the stored procedure.
You have to use a temporary table in your sql query for the dbcf field:
CREATE TABLE #temp(COLUMN_NAME varchar(50)); INSERT INTO #temp EXEC procedurename; SELECT * FROM #temp; DROP table #temp;
You will put COLUMN_NAME as column for the dbcf field.
You can find more details on using temporary table in MS Sql Server here:
http://www.sqlteam.com/article/temporary-tables
If you have less than 100 rows in your table you can also use table variables, as described in the same link.
Hope this helps.
Thank you very much, we will try this asap!
PS.
Keep up the great work with all the Kepler plugins! They're awesome, I can't imagine Jira without them :)
----edit----
Temp table works like a charm :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Temp table works like a charm :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.