JDBC Connection fails with SE 7.24
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Java & JDBC Development, Versions, Editions & End-of-Life
Hello
Problem #1
===========
I was wondering if anybody has seen something similar before.
When I try to connect to my Informix SE database (version 7.24)
using a Java program and the Informix JDBC driver (1.40.JC2)
it fails with a
-329: Database not found or no system permission.
The same program works fine on the same JDBC driver running
IDS 7.30.
My JDBC URL for SE is:
jdbc:informix-sqli//hostname:portnumber//full/path/name:informixserver=$INFORMIXSERVER;user=username;password=password
where /full/path/name refers to a database called name.dbs located
in /full/path, say.
In case of IDS the URL was as follows:
jdbc:informix-sqli//hostname:portnumber/database:informixserver=$INFORMIXSERVER;user=username;password=password
I also noticed my sqlexecd log file while I was trying to connect
using JDBC and while connecting using DBD::Informix and Perl.
They are different. Here is how:
For Java and Informix JDBC driver (for DriverManager.getconnection(url))
1999-06-09 21:38:59.642705 sqlexec avalanche.myhome.net username -Xusername**
For Perl and DBD::Informix (for DBI->connect($db,$user,$pass,"Informix")
1999-06-09 21:38:16.169392 sqlexec avalanche.myhome.net username -Xdatabasename
Is it possible that the connect is not translating correctly for
the sqlexecd daemon, and this is a bug, or am I making some obvious
mistake?
Problem #2
==========
Another question? The JDBC manual says that it uses the sysmaster
database to support the MetaData methods. So does this mean that
I cant use getMetaData() on an SE database? Do we really need the
sysmaster database to get MetaData information, should not the
system catalog tables be used (eg systables, syscolumns, etc)?
I was hoping to try this one out myself before asking the NG but
since I cant even connect to a SE database, I thought I would
just ask if anybody has managed to do it.
TIA
Sujit
-------------------------------------------------------------
Email: sujitpl@ibm.net
URL: http://www.geocities.com/SiliconValley/Horizon/9144
Hello
I had the same problem #1. If you have a SE database elsewhere put
a symbolic link from the home directory of the user to the database
directory. This works fine for me. I was unable to tell JDBC where to
look for the database directory. (On the UNIX level there is an
environment variable DBPATH which has no JDBC eqivalent (to my knowlede)).
I also run into problem #2. No solution at all. On IDS everything
works fine.
best wishes
Bernd
Sujit Pal wrote:
>
> Hello
>
> Problem #1
> ===========
> I was wondering if anybody has seen something similar before.
> When I try to connect to my Informix SE database (version 7.24)
> using a Java program and the Informix JDBC driver (1.40.JC2)
> it fails with a
>
> -329: Database not found or no system permission.>
> The same program works fine on the same JDBC driver running
> IDS 7.30.
>
> My JDBC URL for SE is:
>
> jdbc:informix-sqli//hostname:portnumber//full/path/name:informixserver=$INFORMIXSERVER;user=username;password=password
>
> where /full/path/name refers to a database called name.dbs located
> in /full/path, say.
>
> In case of IDS the URL was as follows:
>
> jdbc:informix-sqli//hostname:portnumber/database:informixserver=$INFORMIXSERVER;user=username;password=password
>
> I also noticed my sqlexecd log file while I was trying to connect
> using JDBC and while connecting using DBD::Informix and Perl.
> They are different. Here is how:
>
> For Java and Informix JDBC driver (for DriverManager.getconnection(url))
> 1999-06-09 21:38:59.642705 sqlexec avalanche.myhome.net username -Xusername**
>
> For Perl and DBD::Informix (for DBI->connect($db,$user,$pass,"Informix")
> 1999-06-09 21:38:16.169392 sqlexec avalanche.myhome.net username -Xdatabasename
>
> Is it possible that the connect is not translating correctly for
> the sqlexecd daemon, and this is a bug, or am I making some obvious
> mistake?
>
> Problem #2
> ==========
> Another question? The JDBC manual says that it uses the sysmaster
> database to support the MetaData methods. So does this mean that
> I cant use getMetaData() on an SE database? Do we really need the
> sysmaster database to get MetaData information, should not the
> system catalog tables be used (eg systables, syscolumns, etc)?
>
> I was hoping to try this one out myself before asking the NG but
> since I cant even connect to a SE database, I thought I would
> just ask if anybody has managed to do it.
>
> TIA
>
> Sujit
>
> -------------------------------------------------------------
> Email: sujitpl@ibm.net
> URL: http://www.geocities.com/SiliconValley/Horizon/9144
--
Prof. Dr. Bernd Müller Tel: 03943/659-240
Hochschule Harz e-mail: bmueller@fh-harz.de
Friedrichstrasse 57-59 oder: bmueller@acm.org
38855 Wernigerode http://www2.fh-harz.de/~bmueller
The correct format for jdbc database connection is:
jdbc:informix-sqli//hostname:portnumber/path-from-your-home-directory/name:
informixserver=informixserver;user=username;password=password
If you want to pass have absolute path, then you have to trick informix jdbc
like this:
jdbc:informix-sqli//hostname:portnumber/ /full-path/name:....
^-note the space
I hope this helps.
In article <376A9D0A.56747573@fh-harz.de>,
Bernd =?iso-8859-1?Q?M=FCller?= <bmueller@fh-harz.de> writes:
>Hello
>
>I had the same problem #1. If you have a SE database elsewhere put
>a symbolic link from the home directory of the user to the database
>directory. This works fine for me. I was unable to tell JDBC where to
>look for the database directory. (On the UNIX level there is an
>environment variable DBPATH which has no JDBC eqivalent (to my knowlede)).
>
>I also run into problem #2. No solution at all. On IDS everything
>works fine.
>
>best wishes
>Bernd
>
>
>Sujit Pal wrote:
>>
>> Hello
>>
>> Problem #1
>> ===========
>> I was wondering if anybody has seen something similar before.
>> When I try to connect to my Informix SE database (version 7.24)
>> using a Java program and the Informix JDBC driver (1.40.JC2)
>> it fails with a
>>
>> -329: Database not found or no system permission.>>
>> The same program works fine on the same JDBC driver running
>> IDS 7.30.
>>
>> My JDBC URL for SE is:
>>
>> jdbc:informix-sqli//hostname:portnumber//full/path/name:informixserver=$INFORMIXSERVER;user=username;password=password
>>
>> where /full/path/name refers to a database called name.dbs located
>> in /full/path, say.
>>
>> In case of IDS the URL was as follows:
>>
>> jdbc:informix-sqli//hostname:portnumber/database:informixserver=$INFORMIXSERVER;user=username;password=password
>>
>> I also noticed my sqlexecd log file while I was trying to connect
>> using JDBC and while connecting using DBD::Informix and Perl.
>> They are different. Here is how:
>>
>> For Java and Informix JDBC driver (for DriverManager.getconnection(url))
>> 1999-06-09 21:38:59.642705 sqlexec avalanche.myhome.net username -Xusername**
>>
>> For Perl and DBD::Informix (for DBI->connect($db,$user,$pass,"Informix")
>> 1999-06-09 21:38:16.169392 sqlexec avalanche.myhome.net username -Xdatabasename
>>
>> Is it possible that the connect is not translating correctly for
>> the sqlexecd daemon, and this is a bug, or am I making some obvious
>> mistake?
>>
>> Problem #2
>> ==========
>> Another question? The JDBC manual says that it uses the sysmaster
>> database to support the MetaData methods. So does this mean that
>> I cant use getMetaData() on an SE database? Do we really need the
>> sysmaster database to get MetaData information, should not the
>> system catalog tables be used (eg systables, syscolumns, etc)?
>>
>> I was hoping to try this one out myself before asking the NG but
>> since I cant even connect to a SE database, I thought I would
>> just ask if anybody has managed to do it.
>>
>> TIA
>>
>> Sujit
>>
>> -------------------------------------------------------------
>> Email: sujitpl@ibm.net
>> URL: http://www.geocities.com/SiliconValley/Horizon/9144
>
>--
>Prof. Dr. Bernd M'ller Tel: 03943/659-240
>Hochschule Harz e-mail: bmueller@fh-harz.de
>Friedrichstrasse 57-59 oder: bmueller@acm.org
>38855 Wernigerode http://www2.fh-harz.de/~bmueller
--
Dari Shirazi | Internet: dshirazi@uhl.uiowa.edu
The University of Iowa - Hygienic Lab | Voice: (319) 335-4500
Oakdale Research Campus, OH-E5B | Fax: (319) 335-4555
Iowa City, IA 52242 |