From: Stephen on


Problem:

I have 5 systems located around the world with db2 data bases
containing customer data that i support. i have telnet access to each
system. the db2 servers do not have working versions of emacs or
xemacs.

the system i use everyday is a linux system running redhat and has
both emacs and xemacs but no db2 client. adding db2 client is not a
option.

what i have been able to do is bring up xemacs / emacs on my local
system, M-x telnet and log into one of my db2 servers and run db2 in
my telnet buffer inside of emacs. i split the window and bring up my
sql in the new buffer in sql-mode. problem is when i try to connect my
sql buffer to my db2 running in the telnet buffer i get --> There is
no suitable SQLi buffer.

any ideas on how to make a sql-mode buffer in emacs on my linux system
interact with a telnet buffer running db2 running on another system.
the telnet buffer is in emacs running on my linux system.

thank you for your help

stephen
From: Ian on
On 12/17/09 6:48 AM, Stephen wrote:

> any ideas on how to make a sql-mode buffer in emacs on my linux system
> interact with a telnet buffer running db2 running on another system.
> the telnet buffer is in emacs running on my linux system.

I don't think you can do it with telnet, but you can definitely do
it with ssh.

You can hack this by setting sql-db2-command and sql-db2-options in
your .emacs:

(setq sql-db2-program "ssh")
(setq sql-db2-options
'("db2server" ". /home/db2inst1/sqllib/db2profile; db2 -tv"))

Obviously modify the parameters in sql-db2-options to use the
correct hostname and path to your db2profile.

Now, this will just be a gateway to the one db2 server, so
hopefully you can have all your databases cataloged from that
one server; If you want (need) to ssh to each DB2 server
individually then you'll have to modify the sql-db2-options
setting every time you want to connect to a different server.


Good luck,



From: Stephen on
On Dec 17, 7:57 pm, Ian <ianb...(a)mobileaudio.com> wrote:
> On 12/17/09 6:48 AM, Stephen wrote:
>
> > any ideas on how to make a sql-mode buffer in emacs on my linux system
> > interact with a telnet buffer running db2 running on another system.
> > the telnet buffer is in emacs running on my linux system.
>
> I don't think you can do it with telnet, but you can definitely do
> it with ssh.
>
> You can hack this by setting sql-db2-command and sql-db2-options in
> your .emacs:
>
> (setq sql-db2-program "ssh")
> (setq sql-db2-options
>     '("db2server" ". /home/db2inst1/sqllib/db2profile; db2 -tv"))
>
> Obviously modify the parameters in sql-db2-options to use the
> correct hostname and path to your db2profile.
>
> Now, this will just be a gateway to the one db2 server, so
> hopefully you can have all your databases cataloged from that
> one server;  If you want (need) to ssh to each DB2 server
> individually then you'll have to modify the sql-db2-options
> setting every time you want to connect to a different server.
>
> Good luck,


works like a charm, thank you!
 | 
Pages: 1
Prev: Everything iSeries
Next: db2 restoration