Reputation: 1336
Our university runs an Oracle database server. We log in using campus username/password over SSH, then rlwrap sqlplus
is automatically started and we have to log in again, to the database application, using another username and password.
I would like to use Emacs on Windows to edit and run simple SQL scripts on this server. I am already able to edit files on other SSH servers using Tramp, but for some reason (most likely the automatic launch of sqlplus
) I'm not able to do that on the database server. Emacs hangs with Tramp: Waiting for prompts from remote shell
.
I would also like to run an interactive SQL session in a buffer, so I inserted the code at https://stackoverflow.com/a/17277015/1813487 to my .emacs
with appropriate modifications (namely, change all occurrences of mysql
to oracle
). When I do M-x sql-oracle
, Emacs hangs with Tramp: Sending Password
.
Is there a way to fix/configure all this, or the only way is to convince the admin to disable the automatic launch of sqlplus
?
It may or may not be important that I could only make Tramp work by re-compiling tramp.el
as suggested here. I have little to no knowledge of Emacs Lisp.
Upvotes: 1
Views: 449
Reputation: 1336
The solution was to edit the .bashrc
file on the server so that SQLPlus does not automatically start.
Upvotes: 0
Reputation: 28531
Tramp-over-SSH works by starting an SSH session and then sending it shell commands. So if your SSH sessions can't run a shell, you won't be able to use Tramp-over-SSH to access your remote files.
As for starting SQL from Emacs, the way to do that is to set sql-oracle-program
to some script that performs the necessary commands, in your case probably something like ssh <oracle-server>
.
Upvotes: 0