This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Running the sql files against database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Running the sql files against database" Watch "Running the sql files against database" New topic
Author

Running the sql files against database

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
Hi all
I am having a n number of sql files which i need to execute against database.

Is there any easier way to execute all those sql files against database.

something like bat file or java class to invoke.

Any pointer will be greatly appreciated.

The database is DB2
OS: windows
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32636
    
216

Parameswaran,
You can write a bat file that uses the db2 command line to run each file. I think the option is "-f" to run the sql in a file.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running the sql files against database
 
jQuery in Action, 3rd edition