Execute SQL Statement on Oracle DB Server(JDBC ACTIVITY)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-18-2022 11:14 PM
Hi i have configured test jdbc connections to execute the sql statement on the oracle db server and to capture the output
1) In the jdbc connection for the fields *Host:- given the IP of the db server and credentials are validated.
2)coming to custom jdbc activity from the workflow the below sql statement should execute on the input (Ip of the different db servers) we give. But it's executing on the Host name we give on point 1 in credentials
So my requirement is it should execute on the whatever input (IP OF ORACLE DB SERVER) we give for the activityinput.input1.
How to fix this or any other suggestions please share.
Thanks in advance
Sravani C
- Labels:
-
Orchestration (ITOM)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-19-2022 12:26 AM
Hi Sravani,
I would recommend you to go with the OOTB JDBC activity in the flow design, instead of going with a custom JDBC activity in the workflow.
The configuration in the flow design is much easier and time saving.
Note: you will need integration hub plugin active for this.
Please mark the answer correct if this helps. š
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-19-2022 03:26 AM
Hi Sravani
May i know the Problem Statement Not in terms of Service Now , In terms of what the end goal you want to do?
What i understood briefly is - You have 1 Fixed SQL and you have n of Oracle DBs running on host1..host2 ...Hostn. You need to execute the same SQL on all oracle DB servers?
Regards
RP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-19-2022 11:45 AM
Hi Rahul,
I want to Execute this sql statement(SELECT * FROM sys.DBA_USERS ORDER BY USERNAME) on each oracle db server, however this custom workflow is attached to the catalog item and get the output to the worknotes of the requested item(as below) .
In the catalog item we have a field called IP Address where the oracle db server ip is populated on change of servers. we want to take this IP From the catalog variable as a input and execute sql statement on the server selected.
and as you said I need to execute same SQL on all DB servers, this is what i require a solution for as i have n number of oracle DBs.
Thanks and Regards
Sravani C

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-19-2022 08:11 PM
Let me think but Its not going to work Using JDBC when Oracle HostName/IP will vary.
In my view on Mid server you keep an Oracle SQL Client.
send your Inpute parameters for DB connection to Mid server ..
Make a Silent session using parameter on mid using Oracle sqlclient
Store output locally in file on mid server
Read output and update in work-notes.
Regards
RP