Plugin Information |
---|
View SQLPlus Script Runner on the plugin site for more information. |
Releases
- 1.x - For Jenkins 1.x
- 2.x - For mainly Jenkins 2.x, credentials plugins implemented and pipeline support
Migration Guide
To migrate your workspace from version 2 is very simple, all you need to do is:
- Create a credential for your user and password;
- Edit you job configuration and select one credential;
- Save your changes and you are good to go!
Summary
This plugin enables you run Oracle SQL*Plus scripts on your Jenkins jobs ( Oracle SQL*Plus installation required! ).
Configuration
Global
All you have to do is check the auto detect ORACLE_HOME option ( or a valid ORACLE_HOME ) and you are in business:
If you are having problems try to enable Debug info to see what is going on.
By Job
You can run a script inside your workspace or a user defined for every job:
Version 1.x:
Version 2.x :
Environment variables
Pay attention to what version you are using in order to work with variables:
variable | Version 1.x | Version 2.x |
---|---|---|
user | ok | replaced by credentials |
password | ok | replaced by credentials |
instance | ok | ok |
You can use global variables for user and instance, first creating it in Jenkins→ configuration :
You user global variable can hold username and password as well like this (username/password):
And then using it:
Running
You can check later all SQL*Plus output inside your build output:
Pipeline
User defined script
node { echo 'SQLPlusRunner running user define script for system@xe' step([$class: 'SQLPlusRunnerBuilder',credentialsId:'system', instance:'xe',scriptType:'userDefined', script: '',scriptContent: 'select * from v$version']) }
File script
node { echo 'SQLPlusRunner running file script for system@xe' step([$class: 'SQLPlusRunnerBuilder',credentialsId:'system', instance:'xe',scriptType:'file', script: 'start.sql',scriptContent: '']) }
Optional pipeline parameters
- customOracleHome
- customSQLPlusHome
- customTNSAdmin
Download the last release and give it a try!
Reported problems
my script takes forever to execute...
Windows users sometimes get a running script stuck on build, even though they run everything on Oracle.
In that case you should use Build Time Out plugin together to get everything working fine.
I have an error ORA-????
You should try running manually SQL*Plus before use Jenkins.
Sometimes on Linux Jenkins has his own Operation System user with his own variables.
Every time I get this error: cannot find sqlplus
Jenkins plugin can't find SQL*Plus executable file.
You should do in this order:
- Stop Jenkins;
- Find where are sqlplus executable file (usually at $ORACLE_HOME);
- Check if they have proper permissions (chmod 755 *);
Create a global environment variable ORACLE_HOME like this:
export ORACLE_HOME=/oracle/app/oracle/product/12.1.0/dbhome_1/ or export ORACLE_HOME=<your-sqlplus-directory>Test your environment with: sqlplus -v , should return SQL*Plus version like SQL*Plus: Release 12.1.0.1.0 Production
Start Jenkins;
Use the try to detect ORACLE_HOME option;
Retry your SQL*Plus operation.
Every time I get this error: libsqlplus.so: cannot open shared object file: No such file or directory or SP2-0667: Message file sp1.msb not found
SQL*Plus need its library and its message file to work properly.
You should do in this order:
- Stop Jenkins;
- Find where are libsqlplus.so files (usually at $ORACLE_HOME\lib );
- Check if they have proper permissions (chmod 755 *);
Create a global environment variable LD_LIBRARY_PATH like this:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH or export LD_LIBRARY_PATH=<your-libsqlplus-directory>:$LD_LIBRARY_PATHTest your environment with: sqlplus -v , should return SQL*Plus version like SQL*Plus: Release 12.1.0.1.0 Production
Start Jenkins;
Use the try to detect ORACLE_HOME option;
Retry your SQL*Plus operation.
I want to hide my user / password from Console Output
Install Mask Passwords Plugin;
Setup to hide everything you want.
I have a bug to report
Please open a new issue and inform:
- Jenkins server Operation System;
- Jenkins version ;
- Where SQLPlus Script Runner is running (local machine or slave machine);
- Slave machine Operation System (if applicable);
- Oracle Database version;
- Oracle SQL*Plus version;
- Build log with debug info enabled.
73 Comments
Joe FitzGerald
This seems to assume the jobs will run on the master, which I wouldn't think is a common implementation approach. Am I wrong? I just don't see any way change the directory that the plugin seems to be using when executing the job -- it isn't the workspace directory on the slave, it is assuming the job path on the master. I'll peek at the code and see if I can suggest/make the change but maybe I'm just missing something.
I really like the idea though as my current approach of piping in SQL statements via a shell script is ugly -- this plugin will make the scripts much easier to understand.
Larry Koutsavlis
Have you had any luck with your research? I've just installed this plugin and noticed that same dilemma.
Fernando Boaglio
Hi, the release 1.0.2 run scripts on slave too.
Uday Ketkar
How do you do that in 1.0.2?
Fernando Boaglio
You can try with this plugin: https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin
Uday Ketkar
This works like a charm. Thanks.
alex chan
Is there a way to pull in a build parameter for the file script?
Fernando Boaglio
Sorry, no.
Arif Basri
My workaround for this is to use Ant's replacetoken function.
Max Rodkin
hi!
how to manipulate exit code of plugin?
for example, i need:
SELECT * FROM MENU
EXCEPTION WHEN NO_DATA_FOUND THEN exit 1;
exit;
This script returned 0, but must return 1 for Failed job status
Fernando Boaglio
Sorry, no way to manipulate exit code of plugin
Max Rodkin
Hi Fernando, thank you for your answer!
so, what is appropriate way to know the result of sql request in the job status?
Fernando Boaglio
Maybe print some stuff with prompt and use a Groovy plugin to read the result and fail the job.
Hao La
Hi,
Sorry, is it me or this plugin is not available from Jenkins "Manage Plugins -->Available" for me to install it?
thanks
H.
Fernando Boaglio
This plugin is 1.625.2 based, maybe if you have an older version of Jenkins that could explain it.
Jaimin Gandhi
Hi,
If I want to execute sql scripts filtered from bitbucket/git, can I use this plugin for it? If yes, how?
Also, can I use this plugin just for Oracle or any Database like Teradata too?
Thanks and Regards,
Jaimin Gandhi.
Fernando Boaglio
Yes you can execute scripts from any version-control system (SVN,Git,Github,Bitbucket...) , just use a relative path to inform your script directory. You can use sql\update.sql and then put your scripts inside this directory in your VCS.
This plugin is Oracle only.
A Nigam
How can we pass the Jenkins Parameters to SqlPlus section?
I have various choice parameters that I need to pass as variable to sqlplus and I am using "User Defined Script".
Thanks,
Anoop
Fernando Boaglio
I don't follow, please give me a couple of examples of what you need.
A Nigam
I have a parameterized build, in which I am passing few paraters in Jenkins job run ( mostly drop-down/choice parameters). In the job, I need to use these parameter values in the "where" clause of the "select" query.
E.g. I have a drop-down called Country with values UK, USA, INDIA, Belgium.
The query I need to run in "SQLPlus Script Runner" section is "select cities from my_table where country = <option selected from the drop-down while triggering build>"
How can I get this value captured in "SQLPlus Script Runner" section?
Thanks & Regards,
Anoop
Fernando Boaglio
Ok, I understand it, but using a parameter probably won't work, sorry.
Rene Sch
I have an SQL script that spools around 500KB of data. While it works if I run the the tmp-script that SQLPlus Script Runner generates manually by calling sqlplus from a command line, it does not work when running through Script Runner. The Job console Screen hangs forever and the spool file stops at exactly 72KB all the time. If I kill the slave JRE process it'll spool the rest of the data. Is there a reason why Script Runner waits at 72KB? Should I create a JIRA issue for that?
Fernando Boaglio
please use new version 1.0.11
Arpit Khandelwal
when I am trying to run a select statement using this plugin the build keeps on running for infinite amount of time.
the logs shows:
then the select query is printed to one of the file in C:\Windows\Temp folder and it never gives a result.
Any help if I am configuration the plugin correctly?
Fernando Boaglio
Have you tested running your script directly with SQL*Plus ?
Maybe some statement got an error and the SQL*Plus hangs.
Arpit Khandelwal
Yes, I tested with SQL*Plus and it is giving expected output I am just running a select query to start with
Please find below the logs from Jenkins, it is not moving ahead this point:
Started by user Arpit Khandelwal
Building in workspace E:\workspace\ST01 Row Count
--------------------------------------------------------------------------
Getting ORACLE_HOME...
--------------------------------------------------------------------------
Using global ORACLE_HOME
--------------------------------------------------------------------------
Using ORACLE_HOME =C:\Oracle\11\product\11.2.0\clientx64
--------------------------------------------------------------------------
Getting SQLPlus version
Process exited with status 0
SQL*Plus: Release 11.2.0.4.0 Production
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Using ORACLE_HOME =C:\Oracle\11\product\11.2.0\clientx64
--------------------------------------------------------------------------
Running defined script on z869365[ALFACP]/********@alfapft.world
Temp script:C:\WINDOWS\TEMP\temp-script-14937180968032921288542573770985.sql
--------------------------------------------------------------------------
Fernando Boaglio
Maybe there is something about your password.
This plugin uses this syntax: sqlplus user/password@database script.sql
You should try running a user defined script as well.
Arpit Khandelwal
I am able to run user defined script now, but when I run file based script it is not showing any results and build keeps on running forever. Logs:
Fernando Boaglio
Arpit Khandelwal I don't know what is going on , please open a ticket providing all required info:
https://github.com/jenkinsci/sqlplus-script-runner-plugin/issues/new
Christian Maury
Hello
I have a problem, when I run " select sysdate from dual" the log says:
So my question is, why the tool is searching in
If I put "
Fernando Boaglio
Christian Maury
ORACLE_HOME is the PATH where Oracle Client is installed, you should inform only C:\oracle\product\11.2.0\client_1\
Christian Maury
Hi Fernando Boaglio
Thank's for your reply, I tried again but I have this message
Because, in my PC the sqlplus.exe is in "C:\oracle\product\11.2.0\client_1\" not in "C:\oracle\product\11.2.0\client_1\bin\", what can I do?
Fernando Boaglio
Well, doesn't look like a standard Oracle Installation ...
Can you create a directory C:\oracle\product\11.2.0\client_1\bin\ and copy sqlplus.exe inside it ?
Christian Maury
Hi Fernando Boaglio, sorry for the delay
Now I have this message
r
Christian Maury
Oh my bad, I should choose "User defined script", and with that, it works!!!! =D
thank's Fernando Boaglio
Tiffany Bassett
I'm having the same problem. It's standard for Oracle client to not put sqlplus under bin. I tried copying everything under the client directory to bin, but now I'm getting this error.
I've tried various ways to set LD_LIBRARY_PATH, but the variable appears to get wiped when this plugin runs.
Fernando Boaglio
Hi Tiffany,
Maybe your Jenkins is running on a different user that you are testing on.
LD_LIBRARY_PATH it should be $ORACLE_HOME\lib , where have files like libsqlplus.so .
Can you please give me a list of all your files inside
/opt/app/oracle/product/
12.1
.
0.2
/client
?Tiffany Bassett
The file is present. The plugin just can't seem to find it.
Pedro Carvalho
Hi Fernando Boaglio,
I have the same issue as Tiffany:
error
while
loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
Files in correct place, correct user, correct permissions...
Can you please help?
Fernando Boaglio
Please take a look at our updated Reported Problems guide at the top.
andreina sarmiento
As I rescued the results of the script I run through the function file script, since when I run jenkins tells me that I worked perfectly but internally the script gave me error
Fernando Boaglio
Jenkins tells you what Oracle SQL*Plus tells him, that your script was executed successfully.
sameek mishra
I have to run sql script in remote oracle database using jenkins.I have install jenkins plugin "SQLPlus Script Runner(1.0.9)" and configured. it work well when script file contains less line of sql statement but on my case it's 12000+ line of script to run. it executed few table script then running forever nothing is happening on database.
Console Log:
Configuration
Also i have added "exit;" at the end of sql file but thing is not work.please suggest.
Mrinal Sannyasi
Dear Team,
I am trying to execute PL/SQL procedure using SQLPlus Script runner , while the same script is getting executed it is going into long running session and it is never coming out.
Please find below the Script Details is
------------------------------------------------------------------
CREATE OR REPLACE PROCEDURE PR_TRUNCATE_DRA (P_TAB IN VARCHAR2) IS P_SQL_CODE VARCHAR2 (30); P_SQL_ERRM VARCHAR2 (1000); V_QUERY VARCHAR2 (1000); BEGIN V_QUERY := 'truncate table ' || 'ORBIT_DRA.' || P_TAB || ' DROP STORAGE';
EXECUTE IMMEDIATE 'truncate table ' || 'ORBIT_DRA.' || P_TAB || ' DROP STORAGE';
DBMS_OUTPUT.PUT_LINE (V_QUERY || ' is truncated.'); EXCEPTION WHEN OTHERS THEN RAISE; END PR_TRUNCATE_DRA
----------------------------------------------------------------------------
Please can you suggest how we can execute / deploy pl/sql package,procedure / function using Jenkins...
Thanks,
Mrinal Sannyasi
Mrinal Sannyasi
Please Can you help to resolve my problem...
Thanks,
Mrinal
Fernando Boaglio
I think it's fixed, please use new version 1.0.11.
If you are in a hurry, you can always pay for CloudBees support.
Mrinal Sannyasi
Thank you very much for your response..
Currently my Jenkins version is Jenkins ver. 2.103 so will this work in the same version (Jenkins ver. 2.103)..
Or you are talking about any else version here..
Please respond, Thanks again..
Mrinal
Fernando Boaglio
Yes, it will work fine. I was talking about the new SQLPlus Script Runner Plugin version, not the Jenkins version.
Mrinal Sannyasi
Dear Fernando,
After upgradation of SQLPlus Cript Runner Plugin (1.0.11) , we are getting the below error
It was running fine with older version , please can you suggest what is the reason here...
Is it because of Java version , IF yes then what is required java version (we are using java version "1.8.0_141")
===============================================================
Getting ORACLE_HOME...
Using custom SQL*Plus location
SQL*Plus >>>
Using custom TNS_ADMIN location
TNS_ADMIN >>>
[DEBUG] Global ORACLE_HOME selected
--------------------------------------------------------------------------
Using global ORACLE_HOME
detected host = cbl06698dat02
slave machine ? false
--------------------------------------------------------------------------
Using ORACLE_HOME =/dboracle/orabase/product/10.2.0/
--------------------------------------------------------------------------
Getting SQLPlus version
[DEBUG] ORACLE_HOME = /dboracle/orabase/product/10.2.0/
[DEBUG] LD_LIBRARY_PATH = /dboracle/orabase/product/10.2.0//lib
SQL*Plus exec file = sqlplus
--------------------------------------------------------------------------
[DEBUG] Statement:
-v
--------------------------------------------------------------------------
[Orbit] $ -v
Error:Cannot run program "" (in directory "/orbit_serial/jenkins/home/workspace/Orbit"): error=2, No such file or directory
java.lang.RuntimeException: java.io.IOException: Cannot run program "" (in directory "/orbit_serial/jenkins/home/workspace/Orbit"): error=2, No such file or directory
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.runGetSQLPLusVersion(SQLPlusRunner.java:486)
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.run(SQLPlusRunner.java:188)
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:112)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1727)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: Cannot run program "" (in directory "/orbit_serial/jenkins/home/workspace/Orbit"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:249)
at hudson.Proc$LocalProc.<init>(Proc.java:218)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
at hudson.Launcher$ProcStarter.start(Launcher.java:449)
at hudson.Launcher$ProcStarter.join(Launcher.java:460)
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.runGetSQLPLusVersion(SQLPlusRunner.java:477)
... 11 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 17 more
ERROR: java.io.IOException: Cannot run program "" (in directory "/orbit_serial/jenkins/home/workspace/Orbit"): error=2, No such file or directory
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE
==========================================================================
Mrinal Sannyasi
Dear Fernando Boaglio,
After getting this error, I have updated custom oracle home , sqlplus location and TNS_ADMIN path ...
Then I am getting below error, it is unable to find the Oracle Home path though it is provided... While earlier version was running smoothly...
PFB the error details...
========================================================
-------------------------------------------------------------------------- Getting ORACLE_HOME... Using custom SQL*Plus location SQL*Plus >>> /dboracle/orabase/product/10.2.0/bin/sqlplus Using custom TNS_ADMIN location TNS_ADMIN >>> /dboracle/orabase/product/10.2.0/network/admin [DEBUG] Using custom ORACLE_HOME -------------------------------------------------------------------------- Using custom ORACLE_HOME detected host = cbl06698dat02 slave machine ? false -------------------------------------------------------------------------- Using ORACLE_HOME =/dboracle/orabase/product/10.2.0 -------------------------------------------------------------------------- Getting SQLPlus version [DEBUG] ORACLE_HOME = /dboracle/orabase/product/10.2.0 [DEBUG] LD_LIBRARY_PATH = /dboracle/orabase/product/10.2.0/lib SQL*Plus exec file = sqlplus -------------------------------------------------------------------------- [DEBUG] Statement: /dboracle/orabase/product/10.2.0/bin/sqlplus -v -------------------------------------------------------------------------- [Orbit] $ /dboracle/orabase/product/10.2.0/bin/sqlplus -v Error 6 initializing SQL*Plus Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory Process exited with status 1 -------------------------------------------------------------------------- detected host = cbl06698dat02 -------------------------------------------------------------------------- Using ORACLE_HOME =/dboracle/orabase/product/10.2.0 -------------------------------------------------------------------------- Running defined script on silbxx/********@orbdw_any_scan Temp script: file:/orbit_serial/jenkins/home/workspace/Orbit/temp-script-15180746804457289186717442500254.sql -------------------------------------------------------------------------- [DEBUG] ORACLE_HOME = /dboracle/orabase/product/10.2.0 [DEBUG] LD_LIBRARY_PATH = /dboracle/orabase/product/10.2.0/lib:/dboracle/orabase/product/10.2.0 Work Directory = /orbit_serial/jenkins/home/workspace/Orbit [DEBUG] Statement: -------------------------------------------------------------------------- /dboracle/orabase/product/10.2.0/bin/sqlplus -L silbxx/Jas0N_B0u4n3@orbdw_any_scan @/orbit_serial/jenkins/home/workspace/Orbit/temp-script-15180746804457289186717442500254.sql -------------------------------------------------------------------------- [Orbit] $ /dboracle/orabase/product/10.2.0/bin/sqlplus -L silbxx/Jas0N_B0u4n3@orbdw_any_scan @/orbit_serial/jenkins/home/workspace/Orbit/temp-script-15180746804457289186717442500254.sql Error 6 initializing SQL*Plus Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory Process exited with status 1 -------------------------------------------------------------------------- Exit code: 1 -------------------------------------------------------------------------- java.lang.RuntimeException: Process exited with error at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.run(SQLPlusRunner.java:385) at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:112) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1727) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) ERROR: Process exited with error SSH: Current build result is [FAILURE], not going to run. Finished: FAILURE
==================================================================
Please can you guide what details needs to be updated in this latest plugin and where it would be.
Thanks,
Mrinal
Fernando Boaglio
Your initial setup before upgrade should work.
Is your Oracle installed on the same machine of Jenkins ?
This directory exists /dboracle/orabase/product/10.2.0/lib ?
Mrinal Sannyasi
Thanks for your response .....
Your initial setup before upgrade should work.
Answer– Yes it was working fine
Is your Oracle installed on the same machine of Jenkins ?
Answer – Yes both are one same machine ...cbl06698dat02
This directory exists /dboracle/orabase/product/10.2.0/lib ?
Answer – Yes that directory exists in cbl06698dat02
prod@cbl06698dat02>cd /dboracle/orabase/product/10.2.0/lib prod@cbl06698dat02>pwd /dboracle/orabase/product/10.2.0/lib prod@cbl06698dat02>
Thanks,
Mrinal
Mrinal Sannyasi
Please can you guide us ...
Fernando Boaglio
Mrinal Sannyasi
Many Thanks Boagilo,
This solution is working , now we are able to oracle database from Jenkins..
But Unfortunately Jenkins is not transferring the actual scipt (which I am trying to execute ) .sql file ...
Jenkins is converting the .sql file into only one semicolon...
PFB actual script and transferred one...
Actual .sql file : test.sql
select sysdate from dual
/
show user
/
Jenkins Transferred:
prod@cbl06698dat02>pwd
/orbit_serial/jenkins/home/workspace/Orbit/Code_Base/DB_Scripts/Schema
prod@cbl06698dat02>ls -lrt
total 0 -rw-r----- 1 prod release 8 Mar 8 13:25 test.sql prod@cbl06698dat02>cat test.sql
; exit;
prod@cbl06698dat02>
Fernando Boaglio
Your file is missing, that's why this is happening.
The transfer responsibility is not handled by my SQLPlus script runner plugin, it should be Git or something else you are using.
Mrinal Sannyasi
Hi ,
I have cross-checked file is in place and I am using SVN..
While script is executing from SVN then Jenkins is unable to read the actual lines inside the script..
Thanks,
Mrinal
Mrinal Sannyasi
Can I go for a screen share session with you ..
Many thanks ..
Mrinal Sannyasi
Please can you help us?
Fernando Boaglio
"While script is executing from SVN then Jenkins is unable to read the actual lines inside the script.."
I don't get this.... you handle SVN outside Jenkins ?
Mrinal Sannyasi
I am using Subversion which is being access by Jenkins and same Subversion is working fine for shell script (using Publish over ssh).
Here Jenkins is unable to read .sql file from Subversion, Jenkins is taking whole script as a semi colon only ...
Please can you give me 5 mins to show you the problem or a quick call will be fine ..
Many thanks ,
Mrinal Sannyasi
Mob : 0091 8336900905
Mrinal Sannyasi
Hi ,
Please can you help me out ..
Thanks..
Fernando Boaglio
Have you tried to run with user defined script?
Mrinal Sannyasi
Yes , User defined Script is working fine..
Mrinal Sannyasi
Hi Fernando,
We are able to execute DDL script (Create Table ) successfully using SQL Plus Script runner plugin .
It happened by putting an "exit" at very last of script..
But we are unable to execute stored procedure , it is going into hung state...
What should we use at very last of stored procedure...
Thanks,
Mrinal
Fernando Boaglio
If your script has a problem, you should test it from command line before running on Jenkins.
If a script doesn't exit from SQL*Plus, it will hung.
Fernando Boaglio
If you are in a hurry you should contact for Commercial Support , this is an open source project which is coded in spare time. If your company uses Oracle, probably has enough money to pay for it.
Krishna Chand
Hi Fernando Boaglio,
I have a requirement to compile pl/sql code through Jenkins. The triggering point would be as soon as pl/sql code is pushed to Github it should be compiled through Jenkins.
I have been able to integrate Github with Jenkins and build jenkins job as soon as a code is pushed (after commit) to Github.
Do you know if I can use SQLPlus Script Runner plugin to achieve that? If yes can you pls let me know how?
Thanks,
Krishna
Fernando Boaglio
I think you do, just create one script (run.sql) that call all other scripts and call run.sql from your Jenkins job.
Krishna Chand
How would run.sql know which package has been pushed to github? Let say package A has been pushed to one of the branch (Development Branch) in Git, I want that package to compile in Development Instance.
Fernando Boaglio
In this scenario you should have a run.sql like this:
If anyone commits a new A2.sql file you should change run.sql to:
@ A.sql
@ A2.sql
Maybe you can create a script to build a new run.sql for every commit.
nagapraveen G
Please help what is the approach followed for this requirement. Many Thanks!
nagapraveen G
Krishna Chandwe have got the similar requirement, could you pls how you have implemented the approach that Fernando Boagliohad proposed. Many Thanks!