Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: problems with sql*plus buffer
TurkBear <john.greco_at_dot.state.mn.us> wrote in
news:3mk8qu0aig9pno27u00m7t1ko94832ifph_at_4ax.com:
>
> SqlPlus is not a scripting too ( as you have discovered)l..Try
> SqlPlus Worksheet - It has editing and command history features..
For the emacs-savvy, the can download xemacs to their windows
machines
and open a shell to start a sql*plus session. Once within the emacs
session, you can do what you please: cut 'n paste, walk through
history, etc.
For those seeking an example of what the init.el ought to look like ... word wrap might screw things up so beware ... :)
(defun sqlplus-shell-exec (my-buffer-name login-string)
(require 'shell)
(start-process-shell-command "sqlplus" my-buffer-name "sqlplus"
login-string)
(switch-to-buffer-other-window my-buffer-name)
(shell-mode)
)
(defun sqlplus-shell (my-buffer-name login-string)
(cond ((eq nil (get-buffer my-buffer-name)) ;; first time invocation (sqlplus-shell-exec my-buffer-name login-string)) ((not (eq nil (get-buffer-process my-buffer-name))) ;; process is running (switch-to-buffer-other-window my-buffer-name)) (t ;; process doesn't exist, buffer does (erase-buffer my-buffer-name) (sqlplus-shell-exec my-buffer-name login-string)) )
;; Bind a sql*plus session to F1
(global-set-key [f1] '(lambda () (interactive) (sqlplus-shell
"*chickadee*" "scott/tiger_at_chickadee")))
-- Pablo Sanchez, High-Performance Database Engineering http://www.hpdbe.comReceived on Wed Oct 09 2002 - 11:06:53 CDT
![]() |
![]() |