Open mlk87 opened 4 years ago
Did you include Oracle JDBC driver in /lib folder? See step 2 of this documentation that describe how to do it, you will need to restart JIRA in order to the changes be applied.
Also, what is the output of your script? Can you attach a screenshot?
The driver is correct, in reading with the SELECT I can get the result. Testing the script on the MyGroovy console, but it returns a generic error
import groovy.sql.Sql
import java.sql.Driver
def driver = Class.forName('oracle.jdbc.OracleDriver').newInstance() as Driver
def props = new Properties()
props.setProperty("user", "USER")
props.setProperty("password", "PWD")
def conn = driver.connect("jdbc:oracle:thin:@SERVER:PORT:ISTANCE", props)
def sql = new Sql(conn)
def results = sql.executeUpdate("MY UPDATE QUERY")
return results
The result is: null and the log is not compiled
Hi, can you check Jira log for error?
Good morning, I'm trying to create a script to be able to perform updates on the Oracle DB, but currently it doesn't work. At the moment it works perfectly in reading. The script for reading is as follows:
In update I replaced sql.rows with sql.execute, but to no avail:
sql.execute "MY UPDATE QUERY"
can you help me?