Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dump the result set as a table into a file and refresh "the file" in a browser?

Having 2 windows open is about the same as having 2 panels in one of the DB "Monties". http://catb.org/jargon/html/M/monty.html



That said, the sql*pro CLI that Oracle provides for their DB SUCKS (!!!) rotten eggs, and gives people the impression that a CLI is useless for database work.


Yes the CLI for sql*plus does suck. When I am using it (pretty rare these days) I use rlwrap to make it suck less. Command history is pretty convenient too.

Here's my ~/bin/sqlplus shell script pointing to the Oracle instant client install:

    #!/bin/sh

    OIC_DIR=$HOME/opt/oracle-instant-client
    export LD_LIBRARY_PATH="${OIC_DIR}:$LD_LIBRARY_PATH"
    export TNS_ADMIN="${OIC_DIR}"
    rlwrap "${OIC_DIR}/sqlplus" "$@"
Bonus: You can use a tnsnames.ora file with the instant client if you put it in the instant client directory and export the environment variable in the script above.


That's right, it's been a while. "pro" was the C preprocessor, "plus" was the gawdhawful CLI.

Thanks for the tip on rlwrap, in case I have to use that thing again. I'm assuming it provides GNU readline support on top of the base tool.


Yes, rlwrap provides GNU readline atop just about anything. When I write my REPL tools (test utilities, etc) I usually wrap them for local use in rlwrap as 99% of the time it's what you want.


Even if you're not an Emacs guy you may want to consider using it with the sqlplus.el module. It adds a nice table formatter and other features to make SQL*Plus more palatable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: