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