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?
Asked
Active
Viewed 2.8k times
40
-
You can try this open source tool http://sourceforge.net/projects/jdbcsql/ – MZaragoza May 08 '15 at 14:49
3 Answers
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:

lreeder
- 12,047
- 2
- 56
- 65
-
nice, but cackspace command does not work in linux machine. I can remove wronly typed commands by Delete command – Ahmet Karakaya Dec 26 '14 at 07:47
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
-
3Yes, but jdbctool supports only one db type: "Currently, only HSQLDB is supported." Even if apropriate driver is in classpath, jdbctool is in no help. – Illarion Kovalchuk Jun 22 '12 at 05:48
-
-
Seems that henplus moved onto [github](https://github.com/neurolabs/henplus). Wish it was more active – sandeepkunkunuru Feb 16 '13 at 02:18