[Info-Ingres] The never ending database name, JDBC and other stories.
martin.bowes at ctsu.ox.ac.uk
martin.bowes at ctsu.ox.ac.uk
Wed Apr 18 03:58:14 CDT 2007
Hi Everyone,
A funny thing happened the other day when I was looking at why a
JDBC connection string was failing...
I can now imagine this conversation had occurred at some point ..
Somene stated:
'A fully qualified database name is: [vnode::]dbname[/class]'
Q. Cool, but whats a dbname?
A. Oh that's just a [vnode::]dbname[/class]
So put that togethor and you get: vnode1::vnode2::dbname
Q. Yeah, but whats a dname?
A. Oh that's just a [vnode::]dbname[/class]
So put that togethor and you get: vnode1::vnode2::vnode3::dbname
etc...Thank God they didn't attempt to graft /class1, /class2... into the
mess.
The staggering thing is that it works, sorta...
As long as all the authorisations and network connections can be
verified the connection to the final database is cool.
But, if a link is broken then the connection can fail silently. This is
particularly annoying if you are connecting to a database like iidbdb that
exists on all hosts. The connection seems to leave you attached to the
iidbdb of the last successful vnode.
Or it can start throwing some really confusing authorisation errors.
The funny thing is that it seems to be common here to use JDBC
connection strings like:
jdbc:edbc://localhost:II7/inharp::dune_cp::cp_smsq
Which seem to work, whereas connection strings like the following fail.
jdbc:ingres://inharp:II7/dune_cp::cp_smsq;user=...,etc
The vnode 'inharp' defined on the localhost accesses the host inharp,
with the username defined for the 2nd URL.
The vnode 'dune_cp' defined on inharp is global, it uses the installation
password for the host on which the database cp_smsq is defined and
the username from inharp is an ingres username on the 2nd host.
It all works when I log into the hosts in question and use standard sql
connections.
With JDBC I get invalid username authorisation errors.
Anyone got any ideas or suggestions?
Marty
--
Random Titus Quote #2:
I don't fail. I succeed at finding what doesn't work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.kettleriverconsulting.com/mailman/private/info-ingres/attachments/20070418/260f584b/attachment.html
More information about the Info-Ingres
mailing list