40

I am trying to create a set of test scripts that will perform black-box testing of something that works with database. For that I need to issue SQL commands from standard input or file, which was quite possible with "mysql" client, but now we use other database, which has only jdbc driver. I need the same basic functionality in command line as mysql client has, but for any jdbc powered database. Is that possible without programming my custom java tool?

Illarion Kovalchuk
  • 5,774
  • 8
  • 42
  • 54

3 Answers3

11

This one is pretty commonly used, works with any SQL database, and is pretty well supported: https://github.com/julianhyde/sqlline

Brent
  • 111
  • 1
  • 2
  • normally you shouldn't post links in answers because they could go bad but for this question its the only way to answer it – johnny 5 Feb 09 '16 at 21:25
  • @johnny5, that's true, but it's only because the question itself is off-topic - _"Questions asking us to **recommend or find a book, tool, software library, tutorial or other off-site resource** are off-topic for Stack Overflow"_ – Simon MᶜKenzie Feb 09 '16 at 21:44
  • 1
    @SimonMᶜKenzie yeah I already marked it as that before but i needed to make a comment because i was in the review queues, and you know how tricky their tests are – johnny 5 Feb 09 '16 at 21:46
8

I've had success with jisql for Oracle and Postgres databases, and it appears to support most databases with JDBC drivers:

http://sourceforge.net/projects/jisql/

lreeder
  • 12,047
  • 2
  • 56
  • 65
7

Do you mean something like http://web.quuxo.com/products/jdbctool/ ?

Edit 6/22: How about HenPlus then: http://henplus.sourceforge.net/ ?

Olaf
  • 6,249
  • 1
  • 19
  • 37