Unable to execute Oracle SQL scripts from jenkins

1,527 views
Skip to first unread message

pradeep palem

unread,
Oct 6, 2016, 7:13:33 AM10/6/16
to Jenkins Users
Hi All,

I am trying to run the oracle sql script which sits in aws rds from  jenkins server(AWS linux).I have instlled sql*plus on my jenkins server .
I can able to connect database and execute quires manually from my command prompt .i,e Jenkins server.

When i am trying to execute thru Jenkins am facing errors but the build got success.

I configured SQLPlus Script Runner Plugin  and followed the same instructions plugin installation page.


I tried below approaches:

username:abc
pwd:123
hostname::qa.xx.xx..amazonaws.com
portno:1521
SID:QA

1. when i configured sql plus running plugin with 
hostaname:qa.xx.xx..amazonaws.com
user:abc
pwd:123
script to run :/var/jenkins/workspace/db/scripts/test/sql

ERROR:

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

 

SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus

Finished: SUCCESS


2.when i configured sql plus running plugin with 
hostaname:QA
user:abc
pwd:123
script to run :/var/jenkins/workspace/db/scripts/test/sql

ERROR:

ORA-12154: TNS:could not resolve the connect identifier specified


3. when i configured sql plus running plugin with 
hostaname:qa.xx.xx..amazonaws.com:1521:QA
user:abc
pwd:123
script to run :/var/jenkins/workspace/db/scripts/test/sql

 ERROR:

ORA-12545: Connect failed because target host or object does not exist

 
Please correct me if i am missing any where or help me out .

Please find the attachment for more info.

Thanks in advance

Regards,
Pradeep

Error log.docx

pradeep palem

unread,
Oct 7, 2016, 1:46:20 AM10/7/16
to Jenkins Users
Can anyone help on this .Unable to resolve this issue ..


Regards
Pradeep Goud

manu...@gmail.com

unread,
Apr 26, 2017, 1:59:56 PM4/26/17
to Jenkins Users
export ORACLE_SID in /etc/profiles


On Thursday, October 6, 2016 at 4:43:33 PM UTC+5:30, pradeep palem wrote:
Reply all
Reply to author
Forward
0 new messages