How can I create a simple database connection between user testUser and database testDB?
I have created my database as my test user (not an OS user). But if I try and connect to it using a application it complains of a communication link failure.
Are there any other settings I need to configure?
Thank you
-------------------------
Followup To
Question -
Hello.
I have installed ingres.
I have created the user tester and have created my database under this user.
My problem seems to be when I try connecting to the database as this user. I have used odbc and dotnet and each are complaining of bad username/password.
Do I have to do something in particular to enable me to connect to this database as these users?
Thank you
Andreas
Answer -
Hello Andreas,
First, you must distinct 2 way of working with users : os mode and Ingres mode.
In Ingres world, you do not need a ling 1 for 1 between OS user and Ingres User. The owner of a database must exist in Ingres (cf accessdb) but do not exist necessary on OS (/etc/passwd for Unix and so on).
In your case when you try to access your database via ODBC you are using a node (Ingres/NET, cf netutil).
When Ingres complain about user and password it mean "os user and os password". Your client app (ODBC in fact) use and ingres node (created or updated via netutil) to connect to the remote machine (the machine where Ingres is installed). In this case the user and password mentionned in the node must match with the server definition.
If you are on the same machine (on Windows for example) and Ingre still complain about password it is perhaps because the user (OS level) you are using to connect to is not known by Ingres. For example :
1/ I install Ingres R3 as user "mat" on WNT
2/ logoff and logon with the user "bob"
3/ as "bob" is not known in accessdb, the command "isql iidbdb" will prompt for a password
Hope this help,
Jean-Pierre ZUATE
Answer First, I suppose Ingres/NET is installed and started on your client machine (you can see two processes : iigcn and iigcc).
1/ netutil
2/ Choose the menu "create"
3/ give a name for your node (a name as you want)
4/ choose the menu "ok"
5/ choose global
6/ in login and password give a user and his password as it is declared in the server os (for example the user who install ingre R3)
7/ choose the menu "save"
8/ give the hostname or the IP adress of your server
9/ leave the protocol as his default value (depend on what OS the node is created)
10/ give in "Listen Address" field the value of II_INSTALLATION of the server (issue the command on the OS server : ingprenv II_INSTALLATION)
11/ Choose the menu "save"
12/ choose the menu "test" : it must say it connect successfully.
If not, you might have a problem of :
- ingres is not started on the server
- machine name or ip address incorrect
- listen address is incorrect
- user and/or password is incorrect
Then to connect to a database of this server you must use the following syntax : node::database
Example :
I have an Unix server named ENGLAND. I have created a database named LONDON. I created a node named ENGLAND_NODE on a PC to access my database. To access it via isql (for example), the syntax is as follow :
isql ENGLAND_NODE::LONDON
if I want to be an other user (for example testdb) :
isql ENGLAND_NODE::LONDON -utestdb
note : the notation node::database and -uuser is allowed for any native connection to Ingres, via any tools.
Via DOTNET, you must install the DAS (Data Access Server) on the server side and client side. The you can use the native ways of DOTNET to connect to a remote database.