Unix Technical Forum

Ingres JDBC

This is a discussion on Ingres JDBC within the Ingres forums, part of the Database Server Software category; --> Hello, After installing Ingres database I'm trying to connect to it from Netbeans IDE using JDBC. On my computer ...


Go Back   Unix Technical Forum > Database Server Software > Ingres

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 10:29 PM
tytus
 
Posts: n/a
Default Ingres JDBC

Hello,

After installing Ingres database I'm trying to connect to it from
Netbeans IDE using JDBC. On my computer I run netutil and create vnode:
Name: <my_machine_name>
Login: *
Password: <any_password>

When I added jdbc driver to Netbeans IDE (I tried both: edbc.jar ->
ca.edbc.jdbc.EdbcDriver and iijdbc.jar -> ca.ingres.jdbc.IngresDriver

I put address:
jdbc:edbc://localhost:II7/<vnode_name>::test
or
jdbc:ingres://localhost:II7/<vnode_name>::test

As a login I enter my login name (tytus). As a password I put:
1) <any_password> (installation password - set while creating vnode) -
I get error: Login failure: Invalid username / password.
2) my system password - I get error: Your user identifier was not known
to this installation - Contact your system manager fo further
assistance. If I try to login as ingres user / root - everything goes
OK...

If I enter * as a login, and pass installation password - I get error:
Installation passwords may only be used in vnodes...
I ran mkvalidpw... But I still cannot connect to my db...

Can anyone tell me what I am doing wrong? I have added user tytus in
accessdb... Maybe I should set some privileges?

Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 10:29 PM
izena@mixmail.com
 
Posts: n/a
Default Re: Ingres JDBC


Hi,

I think it should have worked at some moment with the things you have
mentioned. Just as a checklist, if Ingres is on the same machine it
should work with:

-edbc.jar
-jdbc:edbc://localhost:II7/test (remove vnode, not needed at the same
machine)
-user tytus must be a OS user and must be in the accessdb list.
-The passwd should be the tytus OS passwd (unless you have changed the
security opts or used the jdbc properties to use user's db passwd
instead)

If you have run mkvalidpwd correctly the above should work. Just in
case, take a second glance at accessdb. The installation passwd is only
used at netutil and it does not interfere with the user auth used in
jdbc.

If ingres is on another server, "sremote", the rules change a bit:

-jdbc:edbc://sremote:II7/test or
jdbc:edbc://localhost:II7/sremote::test (the later need an ingres
install in your machine and sremote defined in its netutil)
- The passwd is tytus passwd in sremote

(In all cases II could be another install id you have chosen)

Hope it helps

Carlos




tytus ha escrito:

> Hello,
>
> After installing Ingres database I'm trying to connect to it from
> Netbeans IDE using JDBC. On my computer I run netutil and create vnode:
> Name: <my_machine_name>
> Login: *
> Password: <any_password>
>
> When I added jdbc driver to Netbeans IDE (I tried both: edbc.jar ->
> ca.edbc.jdbc.EdbcDriver and iijdbc.jar -> ca.ingres.jdbc.IngresDriver
>
> I put address:
> jdbc:edbc://localhost:II7/<vnode_name>::test
> or
> jdbc:ingres://localhost:II7/<vnode_name>::test
>
> As a login I enter my login name (tytus). As a password I put:
> 1) <any_password> (installation password - set while creating vnode) -
> I get error: Login failure: Invalid username / password.
> 2) my system password - I get error: Your user identifier was not known
> to this installation - Contact your system manager fo further
> assistance. If I try to login as ingres user / root - everything goes
> OK...
>
> If I enter * as a login, and pass installation password - I get error:
> Installation passwords may only be used in vnodes...
> I ran mkvalidpw... But I still cannot connect to my db...
>
> Can anyone tell me what I am doing wrong? I have added user tytus in
> accessdb... Maybe I should set some privileges?
>
> Best regards,
> tytus


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 10:29 PM
Paul Mason
 
Posts: n/a
Default Re: [Info-ingres] Ingres JDBC

On 27 Nov 2006 15:56:13 -0800, tytus <t.tytus@wp.pl> wrote:
>
> Hello,
>
> After installing Ingres database I'm trying to connect to it from
> Netbeans IDE using JDBC. On my computer I run netutil and create vnode:
> Name: <my_machine_name>
> Login: *
> Password: <any_password>
>
> When I added jdbc driver to Netbeans IDE (I tried both: edbc.jar ->
> ca.edbc.jdbc.EdbcDriver and iijdbc.jar -> ca.ingres.jdbc.IngresDriver
>
> I put address:
> jdbc:edbc://localhost:II7/<vnode_name>::test
> or
> jdbc:ingres://localhost:II7/<vnode_name>::test
>
> As a login I enter my login name (tytus). As a password I put:
> 1) <any_password> (installation password - set while creating vnode) -
> I get error: Login failure: Invalid username / password.
> 2) my system password - I get error: Your user identifier was not known
> to this installation - Contact your system manager fo further
> assistance. If I try to login as ingres user / root - everything goes
> OK...
>
> If I enter * as a login, and pass installation password - I get error:
> Installation passwords may only be used in vnodes...
> I ran mkvalidpw... But I still cannot connect to my db...
>
> Can anyone tell me what I am doing wrong? I have added user tytus in
> accessdb... Maybe I should set some privileges?
>
> Best regards,
> tytus



Hi Tytus,

Where is your database? Is it on the localhost? If so the connection string
would be

jdbc:edbc://localhost:II7/test

If you use

jdbc:edbc://localhost:II7/
>
> <vnode_name>::test



Then you are using JDBC to connect to the JDBC server and Ingres Net to
connect to the database. I'd only expect to use this where the database was
on another server and the version of Ingres didn't have the JDBC server.

Anyway, that's not to say you couldn't have a vnode that points back to the
local machine, and uses installation password, but the JDBC server itself
needs authentication and it sounds like it's that that's failing. The
username, password you need for the JDBC server is the OS user/password.

HTH
--
Paul Mason

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 10:29 PM
tytus
 
Posts: n/a
Default Re: Ingres JDBC

izena@mixmail.com napisal(a):
> Hi,
>
> I think it should have worked at some moment with the things you have
> mentioned. Just as a checklist, if Ingres is on the same machine it
> should work with:
>
> -edbc.jar


OK - I'm using edbc.jar

> -jdbc:edbc://localhost:II7/test (remove vnode, not needed at the same
> machine)


I removed vnode as You suggested... I use address
jdbc:edbc://localhost:II7/test

> -user tytus must be a OS user and must be in the accessdb list.


tytus is an OS user and he also exists on accessdb list (Users)

> -The passwd should be the tytus OS passwd (unless you have changed the
> security opts or used the jdbc properties to use user's db passwd
> instead)


I'm using OS password... What properties You think about?

>
> If you have run mkvalidpwd correctly the above should work. Just in
> case, take a second glance at accessdb. The installation passwd is only
> used at netutil and it does not interfere with the user auth used in
> jdbc.


I think I ran mkvalidpwd correctly... I've checked accessdb many times
but I cannot see nothing wrong there...

Despite doing everything that way I still get an error saying:
Your user identifier was not known to this installation - Contact your
system manager fo further assistance.


Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 10:30 PM
tytus
 
Posts: n/a
Default Re: Ingres JDBC

Paul Mason napisal(a):
> Hi Tytus,
>
> Where is your database? Is it on the localhost? If so the connection string
> would be
>
> jdbc:edbc://localhost:II7/test
>
> If you use
>
> jdbc:edbc://localhost:II7/
> >
> > <vnode_name>::test

>
>
> Then you are using JDBC to connect to the JDBC server and Ingres Net to
> connect to the database. I'd only expect to use this where the database was
> on another server and the version of Ingres didn't have the JDBC server.
>
> Anyway, that's not to say you couldn't have a vnode that points back to the
> local machine, and uses installation password, but the JDBC server itself
> needs authentication and it sounds like it's that that's failing. The
> username, password you need for the JDBC server is the OS user/password.
>
> HTH
> --
> Paul Mason


Hello,

I'm using my (tytus) OS account data (login/password) but still get an
error...

I have a question: can I connect via JDBC if the JDBC server is not
running, but I have 1 Data Access server active? My ingstatus gives:
Ingres II name server (iigcn) - running
Ingres II recovery server (dmfrcp) - running
Ingres II DBMS server (iidbms) - 1 running
Ingres II Star server (iistar) - 1 running
Ingres II Net server (iigcc) - 1 running
Ingres II Data Access server (iigcd) - 1 running
Ingres II JDBC server (iijdbc) - not active
Ingres II RMCMD process (rmcmd) - running
Ingres II archiver process (dmfacp) - running

Is that OK? I must still be doing something wrong, because I get the
error "User authorization check failed. Your user identifier was not
known to this installation. Contact your system manager for further
assisntance." all the time...

The strange thing is that I can connect using ingres and root accounts,
but it's not possible with tytus...

I can log to database with tytus account using isql, but JDBC
connection fails...

Any idea what I'm doing wrong?

Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 10:30 PM
Paul Mason
 
Posts: n/a
Default Re: [Info-ingres] Re: Ingres JDBC

On 28 Nov 2006 10:18:08 -0800, tytus <t.tytus@wp.pl> wrote:


> Hello,
>
> I'm using my (tytus) OS account data (login/password) but still get an
> error...
>
> I have a question: can I connect via JDBC if the JDBC server is not
> running, but I have 1 Data Access server active?


Yes because the DAS server provides the same connectivity, the JDBC
server is there for backwards compatibility.

>My ingstatus gives:
> Ingres II name server (iigcn) - running
> Ingres II recovery server (dmfrcp) - running
> Ingres II DBMS server (iidbms) - 1 running
> Ingres II Star server (iistar) - 1 running
> Ingres II Net server (iigcc) - 1 running
> Ingres II Data Access server (iigcd) - 1 running
> Ingres II JDBC server (iijdbc) - not active
> Ingres II RMCMD process (rmcmd) - running
> Ingres II archiver process (dmfacp) - running
>
> Is that OK?


Looks OK

>I must still be doing something wrong, because I get the
> error "User authorization check failed. Your user identifier was not
> known to this installation. Contact your system manager for further
> assisntance." all the time...
>
> The strange thing is that I can connect using ingres and root accounts,
> but it's not possible with tytus...
>
> I can log to database with tytus account using isql, but JDBC
> connection fails...
>


OK, that tells us that your tytus account is a valid Ingres account.
And ingvalidpw must be working if ingres and root can connect. It is
worth double-checking that you've got the right password for tytus.

Are there any other parameters being set on the JDBC connection? Have
you tried giving tytus Security Administrator privilege in accessdb?
On possibility is that the JDBC program is doing the equivalent of a
-u flag and ingres and root are allowed to do that but an ordinary
user wouldn't be.


--
Paul Mason
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 10:30 PM
tytus
 
Posts: n/a
Default Re: Ingres JDBC

Paul Mason napisal(a):
> On 28 Nov 2006 10:18:08 -0800, tytus <t.tytus@wp.pl> wrote:
>
>
> > Hello,
> >
> > I'm using my (tytus) OS account data (login/password) but still get an
> > error...
> >
> > I have a question: can I connect via JDBC if the JDBC server is not
> > running, but I have 1 Data Access server active?

>
> Yes because the DAS server provides the same connectivity, the JDBC
> server is there for backwards compatibility.
>
> >My ingstatus gives:
> > Ingres II name server (iigcn) - running
> > Ingres II recovery server (dmfrcp) - running
> > Ingres II DBMS server (iidbms) - 1 running
> > Ingres II Star server (iistar) - 1 running
> > Ingres II Net server (iigcc) - 1 running
> > Ingres II Data Access server (iigcd) - 1 running
> > Ingres II JDBC server (iijdbc) - not active
> > Ingres II RMCMD process (rmcmd) - running
> > Ingres II archiver process (dmfacp) - running
> >
> > Is that OK?

>
> Looks OK
>
> >I must still be doing something wrong, because I get the
> > error "User authorization check failed. Your user identifier was not
> > known to this installation. Contact your system manager for further
> > assisntance." all the time...
> >
> > The strange thing is that I can connect using ingres and root accounts,
> > but it's not possible with tytus...
> >
> > I can log to database with tytus account using isql, but JDBC
> > connection fails...
> >

>
> OK, that tells us that your tytus account is a valid Ingres account.
> And ingvalidpw must be working if ingres and root can connect. It is
> worth double-checking that you've got the right password for tytus.
>
> Are there any other parameters being set on the JDBC connection? Have
> you tried giving tytus Security Administrator privilege in accessdb?
> On possibility is that the JDBC program is doing the equivalent of a
> -u flag and ingres and root are allowed to do that but an ordinary
> user wouldn't be.
>

I've set all the privileges to tytus account but it's still impossible
to connect using JDBC (same error all the time)...

Btw: After changing privileges do I have to restart Ingres Server
(ingstop, ingstart)? I'm doing this each time I change privileges, but
I'm not sure if I need to do this?

Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-20-2008, 10:30 PM
tytus
 
Posts: n/a
Default Re: Ingres JDBC

Hello,

It's unbelievable but... IT'S WORKING... I'm not quit sure what makes
JDBC working... The only thing I've changed is that I set password to
"no" for tytus (in accessdb)... Now I don't even need any extra
privileges (I have only createdb for tytus)... Can anyone explain me
what influence has password set to "yes" in accessdb to JDBC
connectivity?

Btw:
1) Is it possible to write in 4GL with opensource Ingres?
2) Can someone give me a link to 4GL tutorial?
3) Can someone give me a link to tutorial about writing C/C++ programs
connecting to Ingres?

Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-20-2008, 10:30 PM
tytus
 
Posts: n/a
Default Re: Ingres JDBC

Hello,

I would like to thank You all (Carlos and Paul Mason) for help... I'm
very grateful for any idea provided here... I would like to extend my
knowledge about Ingres, so if You have any links/tutorials about Ingres
- please post it here or send me them by e-mail (if it's possible to
share them of course)...

!!! THANK YOU ONE MORE TIME !!!

Best regards,
tytus

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com