I have installed ingres on Linux Red Hat.I have developed a
powerbuilder application that has to connect to Ingres database.
The application can reside on the Linux server or on
windows.Can you please help me connecting ingres database through windows client.
Note: I am using putty to ftp to the Linux server as
of now.
Thanks
Ann.
ANSWER: Hello,
To connect to Ingres thru a PC with Windows and Linux you can use one of the following :
- native connection (via Ingres/Net)
- ODBC (both Linux & Windows)
- Java
It depend on the way Powerbuilder can connect to databases.
For a native connection or ODBC you must have the Ingres client on your client machine (ie Ingres/Net).
With Windows, you must :
- download the Ingres Windows version
- install Ingres/Net
- define a node to your database
With ODBC, you must :
- define an ODBC connection string that use the node created before
Take care of one thing with Ingres/Net on Windows : as far as I know the Ingres Community Windows version come with only the readonly ODBC driver. I think you can find the correct file somewhere in the Enterprise edition. It mean you must install it somewhere, find the file needed by ODBC to update databases and copy it in your target Ingres/Net installation. I hope this is clear ...
If you choose to connect thru Java then the Ingres DAS component (Data Access Server) must be installed in your Ingres server installation. Then you must copy on the client machine the iijdbc.jar (see in $II_SYSTEM/ingres/lib). The connection string for Java is :
jdbc:ingres://host:port/[dbname|vnode::dbname/class];attr=value
where :
- host is the hostname or his IP address
- port is by default the Ingres server variable II_INSTALLATION followed by 7. For example if II_INSTALLATION is "II" the port is "II7"
- vnode (optional) a vnode defined on the server to connect to and other machine (imagine you want to connect to older Ingres version, you can use this mechanism)
- dbname, the name of your DB
- class (optional) mean the Ingres class server. By default it is INGRES (see the parameter server_class in cbf).
I don't know the Powerbuilder syntax to connect somewhere and how you can use native connection in this environment. As far as I know JDBC is a good way to connect to Ingres.
I have checked the comp.databases.ingres newsgroup archive (see http://groups.google.com/group/comp.databases.ingres/topics) and search for "Powerbuilder" word and there are no relevant information here (all messages talk about openingres 1.1 or Ingres 6.4, some Jurassik Ingres Version ;-)) but you can post here a question. This group is active and duplicated in 2 others maillist with many Ingres gurus connected all over the world.
I hope this is clear and helpfull for you. Do not hesitate to ask more questions, if I can help I will do it with pleasure.
Best regards,
Jean-Pierre Zuate
---------- FOLLOW-UP ----------
QUESTION: Can you please help me in loading the .xls file data to
ingres database which resides on Linux box ?
Thanks
Ann.
ANSWER: Hello,
If I can help you ? Well I will try ;-)
I suppose your database is on Linux Box and your .xls file is in a windows platform. The easyest way is :
1/ Save your .xls in .csv
2/ Take care in your .csv your have one row per line (no carriage return into a field for example)
3/ On windows, download and install the Ingres Windows version. You do not need all components, just Ingres/Net
4/ Declare a node from your windows to your Linux box (see later what is a node)
5/ Use Ingres Import Assistant to put your .csv file in a table or create a new table. Use the node define before to address your server, choose your db, and so on
What is a node and how to create it ?
A node mean 5 informations :
- name of the node
- user and password to use to connect to the target Ingres Server. Basicly this user must be declared on your Linux box and you must provide here the Linux password of the user
- machine name or IP address of your Linux box
- Listen address of your Linux box (run ingprenv II_INSTALLATION to determine the listen address)
- protocol (often tcp_ip
I hope this is clear and helpfull for you ;-)
Kind regards,
Jean-Pierre Zuate
---------- FOLLOW-UP ----------
QUESTION: Jean,
As I said I am using putty to connect to my Linux box
I connected, executed netutil command and tried to
create a vnode but when I press the required key to
create the vnode nothing happens.Even when I try to
exit out of that tool nothing happens am I doing something
wrong or you think I have to get into that box locally only
then I can create a vnode.
I tried to create a node from windows client but gives
test connection failed message.
Thanks
Ann
Answer Hello Ann,
Next time try to reach me directly with Gmail : jpzuate@gmail.com :-)
For putty you can try something :
- In your PuTTY Keyboard Configuration check the VT100+
- before invoking any Ingres command try to run : export TERM_INGRES=vt100f
Then you will access to the bottom menu by typing on "Escape". You can select the item you want by typing all the letters of the item or the beginning (for example if you want to "save" type "save" or "sav" or "sa". If there is only one word starting with "sa" it will find "save" label).
But in your context I think you must declare the node on the windows box. When you said windows netutil say "connection fail", it can come from one of the following :
- the Linux box IP address or machine name you provide is wrong (try ping from windows)
- the user is unknown to the linux box
- password of this user do not match
- listen address is not good (run ingprenv II_INSTALLATION on your linux box to know it)
- your protocol (wintcp, tcp_ip, etc) is not good for your network
- Ingres is down on your linux box
- Ingres/Net is down on your linux box (check for a process named iigcn)
- Your server need the II_SHADOW_PWD variable. Try to run "mkvalidpw" as root, ingstop & ingstart Ingres