dbTalk Databases Forums  

emacs sql-ingres mode

comp.databases.ingres comp.databases.ingres


Discuss emacs sql-ingres mode in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AndreLTR
 
Posts: n/a

Default emacs sql-ingres mode - 05-01-2011 , 11:02 AM






Hello,

Iḿ trying to use the sql-ingres mode to no avail. The sequence is
events I follow is below,

M-x sql-ingres - works
Database: test - the database exists and ingres works in the command
line.

The error occurs after:

Searching for a program: no such file or directory, sql.

My .basrc is,

PATH=$PATH:/opt/gams:/opt/cmucl/bin:/opt/MagicDraw_UML/bin:/opt/
CPNTools:/opt/MATLAB_2009/bin:/opt/Ingres/IngresII/ingres/bin:/opt/
Ingres/IngresII/ingres/lib:/opt/Ingres/IngresII/ingres/utility
export PATH

PYTHONPATH=$PYTHONPATH:/usr/share/python-support/python-simpy/SimPy/
export PYTHONPATH

# ingres variables

II_SYSTEM=/opt/Ingres/IngresII
II_LIB_PATH=/opt/Ingres/IngresII/ingres/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Ingres/IngresII/ingres/lib
export II_SYSTEM
export II_LIB_PATH
export LD_LIBRARY_PATH

My .emacs is,

;; SQL mode customization

;; SQL indent mode when in SQL mode
(eval-after-load "sql"
(load-library "sql-indent"))

;; SQL with placeholders
(eval-after-load "sql"
'(load-library "sql-with-placeholders"))

(add-hook 'sql-mode-hook (lambda nil
(local-set-key [(control c) (control b)]
'sql-send-buffer-with-placeholders)
(local-set-key [(control c) (control c)]
'sql-send-paragraph-with-placeholders)
(local-set-key [(control c) (control r)]
'sql-send-region-with-placeholders)))

;; ingres mode
(add-to-list 'load-path "/opt/Ingres/IngresII/ingres/bin")

How to solve this please?

Thanks in advance,

Andre Luiz

Reply With Quote
  #2  
Old   
Chris
 
Posts: n/a

Default Re: emacs sql-ingres mode - 05-02-2011 , 10:54 AM






On May 1, 9:02Â*am, AndreLTR <andreltra... (AT) gmail (DOT) com> wrote:
Quote:
Iḿ trying to use the sql-ingres mode to no avail. Â*The sequence is
events I follow is below,

M-x sql-ingres - works
Database: test - the database exists and ingres works in the command
line.

The error occurs after:

Searching for a program: no such file or directory, sql.
I ought to preface my reply with, "I don't use emacs" so any help I
offer is gong to be pretty limited :-(

My guess is that there is something going on with the path/
environment. The easiest way to prove this is to try and use "sql"
outside of emacs.

What does the following return?

which sql
sql iidbdb

If neither of the above work or return Ingres "stuff" there is a path
issue. If they work, does launching emacs from the same shell that the
above tests were ran work?

Failing that we should check the emacs setup, which may require an
email to an emacs mailing list or the sql-mode maintainer:

Is it really emacs or xemacs?

How is emacs being launched?

What version of emacs are you using?

What version of sql-mode are you using and where is it from?

I just tried an old Ubuntu install with command line version of an old
emacs 21:

sudo apt-get install emacs21-nox

And it worked for me with Ingres 9.2.

Chris

Reply With Quote
  #3  
Old   
AndreLTR
 
Posts: n/a

Default Re: emacs sql-ingres mode - 05-02-2011 , 10:39 PM



Hello Chris,

Thanks very mush for the useful response! Read below please,

On May 2, 12:54*pm, Chris <Chris.Cl... (AT) ingres (DOT) com> wrote:

Quote:
I ought to preface my reply with, "I don't use emacs" so any help I
offer is gong to be pretty limited :-(

On the other hand, it spark a plug!

Quote:
My guess is that there is something going on with the path/
environment. The easiest way to prove this is to try and use "sql"
outside of emacs.

What does the following return?

* *which sql
* *sql iidbdb

sigmatech@stech:~$ which sql
/opt/Ingres/IngresII/ingres/bin/sql
sigmatech@stech:~$ sql iidbdb
INGRES TERMINAL MONITOR Copyright 2011 Ingres Corporation
E_LC0001 GCA protocol service (GCA_REQUEST) failure.
Internal service status E_GCfe05 -- Unable to make outgoing
connection.
- System communication error: Transport endpoint is not
connected..

E_LQ0001 Failed to connect to DBMS session.

sigmatech@stech:~$

Quote:
If neither of the above work or return Ingres "stuff" there is a path
issue.
I have my the same PATH settings in both .bashrc and .profile. What
kind of path setting setup do you mean?

Thanks,

André Luiz

Reply With Quote
  #4  
Old   
Chris
 
Posts: n/a

Default Re: emacs sql-ingres mode - 05-03-2011 , 01:17 PM



On May 2, 8:39*pm, AndreLTR <andreltra... (AT) gmail (DOT) com> wrote:
Quote:
On May 2, 12:54*pm, Chris <Chris.Cl... (AT) ingres (DOT) com> wrote:
My guess is that there is something going on with the path/
environment. The easiest way to prove this is to try and use "sql"
outside of emacs.

What does the following return?

* *which sql
* *sql iidbdb

sigmatech@stech:~$ which sql
/opt/Ingres/IngresII/ingres/bin/sql
sigmatech@stech:~$ sql iidbdb
INGRES TERMINAL MONITOR Copyright 2011 Ingres Corporation
E_LC0001 GCA protocol service (GCA_REQUEST) failure.
* * Internal service status E_GCfe05 -- Unable to make outgoing
connection.
* * - System communication error: Transport endpoint is not
connected..

E_LQ0001 Failed to connect to DBMS session.
OK, so the path looks good :-) based on the exe launching but
something else in the environment isn't :-(

Lets deal with the non-emacs problems first, once those are dealt with
we can then try sql-mode again.

The important error from above is:

E_GCfe05 -- Unable to make outgoing connection.

For some reason the tcp connection is failing. The above test is for
connecting to a local Ingres installation, if the DBMS wasn't running
or client pieces were not running you would get a different error. For
example:

DBMS not running (client installation)

INGRES TERMINAL MONITOR Copyright 2010 Ingres Corporation
E_LC0001 GCA protocol service (GCA_REQUEST) failure.
Internal service status E_GC0139 -- No DBMS servers (for the
specified
database) are running in the target installation..

E_LQ0001 Failed to connect to DBMS session.

Nothing running:

INGRES TERMINAL MONITOR Copyright 2010 Ingres Corporation
E_LC0001 GCA protocol service (GCA_REQUEST) failure.
Internal service status E_GC0025 -- Unable to connect to Name
Server:
Blank or incorrect Name Server ID.
The Name Server may not be running. Check the status of your
installation..

E_LQ0001 Failed to connect to DBMS session.

It is tricky to say what is going wrong here, it could be anything
from;

* bad environment (e.g. pointing at wrong II_SYSTEM)
* SE Linux
* conflict with PostgresSQL binaries (this is less likely) in path
* chroot with disabled tcp/ip
* through to corrupted installation (see below).

If you have a support contract I'd recommend logging a support issue
with the local support office. They can connect to the machine and see
what is going, e.g. check task list, iinamu output, etc.

With the error above it may be that the installation failed to
install, the install.log would be a good starting point. You could
also try the "which/sql" test as the user who installed the
installation.

Chris

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.