Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have a scenario where it is necessary to execute some scripts daily.Is it possible to automate the execution via some tools.?

share|improve this question
    
What kind of scripts are you running? –  Kate Paulk Jun 9 at 20:28
    
How is this related to software quality or testing? Maybe you can elaborate your use case a bit more. –  Niels van Reijmersdal Jun 10 at 10:51

3 Answers 3

Yes, it's possible and in two different ways.

AST

Using the Administrative Task Scheduled (ATS) built inside db2 to execute scheduled operations.


Command Line

the db2 command can also read command from a file specified from the command line

The two solution have both pros and cons: the setup of the AST solution requires administrative privileges on the db while the command line doesn't need changes on the database, on the other side the command line version requires to be scheduled using an external cron daemon while the AST use the scheduling service offered by db2

share|improve this answer

If you would like kind of automated tool which is not only capable of executing queries but also report execution time, perform assertions on returned result set, re-using return values for further queries, etc. I would recommend to look into Apache JMeter which can talk to DB2 instance via JDBC (assuming that you have relevant JDBC driver in JMeter classpath) and execute queries/scripts through JDBC Request Sampler provided.

As an option it'll allow to do performance testing of your DB2 instance by sending concurrent queries and collecting performance metrics.

See The Real Secret to Building a Database Test Plan With JMeter guide for more details.

share|improve this answer

From my side I can suggest you to use SoapUI tool. It allows you to manage your DB tests and extend them with scripting using Groovy. Or you can use Groovy and built in API for SQL handling and implement your own framework.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.