Run Query Securely(DB)
This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to run the specified query on the Database defined in the input field, with the encrypted password. The result is stored in the given dynamic variable for further use during test execution
Syntax
Input Value: <DB IP/instance name/DB file path>;<DB port>;<DB username>;<encrypted DB password>;<DB name>;<Query>;<DB Number/DB Tags>;<querytype/warehouse>(Optional);<schema>(Optional)
<DB IP/instance name/DB file path> (Required)
Provide the Database server location, instance name, or DB file path which you want to use.
<DB port> (Required)
Provide the port number which you want to use to connect to the Database.
<DB username> (Required)
Provide the username credential which you want to use for Database access.
<encrypted DB password> (Required)
Provide the encrypted password associated with the username.
<DB name> (Required)
Provide the Database name which you want to connect to.
<Query> (Required)
Provide the SQL or Non-SQL query which you want to execute.
<DB Number/DB Tags> (Required)
Provide the Database identifier which you want to use for the connection.
<querytype/warehouse> (Optional)
Provide the data container you want to target within the Database.
<schema> (Optional)
Provide the schema you want to use.
To learn more about supported Database and there respective Database Numbers and Tags, click here.
Output Value: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
Both dynamic variable stores the status as True or False.
Example: Executing a Database Query
In this example, we explain how to execute a Database query using the provided connection details.
Action: Run Query Securely(DB)
Input Value: 12.83.4.57;1433;John;FbSveCI31T0LIRLTdqsw==;Student;SELECT * from PQRS;4
The first argument (12.83.4.57) specifies the Database server IP address.
The second argument (1433) specifies the port number used to establish the Database connection.
The third argument (John) specifies the Database username.
The fourth argument (FbSveCI31T0LIRLTdqsw==) specifies the Database password.
The fifth argument (Student) specifies the Database name.
The sixth argument (SELECT * from PQRS) contains the SQL query to be executed.
The seventh argument (4) specifies the Database number used for execution.
Output Value: {Status}
The query execution result is stored in the {Status} dynamic variable with the following possible values:
True: If the query is executed successfully.
False: If the query is not executed successfully.
Logical Explanation: The Run Query(DB) action reads the connection details and SQL query from the Input Value column (12.83.4.57;1433;John;FbSveCI31T0LIRLTdqsw==;Student;SELECT * from PQRS;4). The action connects to the specified Database and runs the given SQL query. The execution result (True) is stored in the {Status} variable.

Last updated
Was this helpful?