search cancel

Functionality of Database operator

book

Article ID: 239510

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

I am working on automating a activity which requires to log on to different Oracle Databases and run certain queries. for which the Connection Url which is used to connect with DB needed to be passed dynamically. Is it possible to do that as i am unable to make it work.

Environment

Release : 4.3

Component :

Resolution

I found that by using a dataset I was able to change the connection string at runtime by using a dataset.

1. In my \Test folder, created a dataset named “DS_ConnectString”.  My dataset contains one variable named “Var_0” and will hold the connect string I want to use.


 
2. In my \Test folder created my process named “TestVariableConnectString”.  I added my “Query_Database_1” operator and set up the properties as I normally would.  In the Database Server Login area, I referenced the dataset rather than putting in an actual value:


 
3. I tested to ensure the process worked as expected.


  
4. I then set up a pre-execution Javascript for my “Query_Database_1” operator to substitute in the connect string from the dataset:


 
5. And testing again, the resulting value changed, so it worked.  

So, dynamically updating a dataset at runtime, and then using that value in the properties should accomplish what you need.

 

Attachments