Question concerning unixODBC

Jeffrey Garmon

Question concerning unixODBC
We've got an installation where a PHP application is accessing DB2 v9.7
Express C databases (everything is on the same hardware - nothing remote)
using standard odbc functions and everything seems to be working. Simply
update the unixODBC.ini to point to the appropriate driver, add the data
source to the odbc.ini, and we're running.

However; I'm curious if there is a way to configure unixODBC this so I don't
have to manually enter each database name into odbc.ini before it can be
used by the application? I've verified the databases are cataloged as
expected using LIST DATABASE... etc, and everything seems to be fine. Admit
it's not a big deal, was just curious if there was a way to prevent the
manual step from the DSN source side?

Thanks
Jeff

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Jorg Lueke

Re: Question concerning unixODBC
(in response to Jeffrey Garmon)
Hi Jeff,

Are you looking for something different than the odbcinst command?

On Tue, 12 Jan 2010 18:24:11 +0000, Jeff G <[login to unmask email]> wrote:

>We've got an installation where a PHP application is accessing DB2 v9.7
>Express C databases (everything is on the same hardware - nothing
remote)
>using standard odbc functions and everything seems to be working. Simply
>update the unixODBC.ini to point to the appropriate driver, add the data
>source to the odbc.ini, and we're running.
>
>However; I'm curious if there is a way to configure unixODBC this so I don't
>have to manually enter each database name into odbc.ini before it can be
>used by the application? I've verified the databases are cataloged as
>expected using LIST DATABASE... etc, and everything seems to be fine.
Admit
>it's not a big deal, was just curious if there was a way to prevent the
>manual step from the DSN source side?
>
>Thanks
>Jeff
>
>__________________________________________________________
___________
>
>* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
>__________________________________________________________
___________
>
>http://www.idug.org/db2-videos.html has hundreds of video presentations!
>Did you miss out on attending an IDUG conference?
>Many of the presentations were recorded and are available on our website!
>__________________________________________________________
___________
>
>If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/events/index.html is your DB2 Events calendar! RUG meetings,
Webcasts, Conferences- what is going on next?
RUG leaders- get your events on the calendar today!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Jeffrey Garmon

Re: Question concerning unixODBC
(in response to Jorg Lueke)
No, was just wondering if there was a way for unixODBC to find/register the
db2 database names dynamically instead of having to enter them into the .ini.

Thanks
Jeff

On Wed, 13 Jan 2010 16:12:46 +0000, Jorg Lueke
<[login to unmask email]> wrote:

>Hi Jeff,
>
>Are you looking for something different than the odbcinst command?
>
>On Tue, 12 Jan 2010 18:24:11 +0000, Jeff G <[login to unmask email]> wrote:
>
>>We've got an installation where a PHP application is accessing DB2 v9.7
>>Express C databases (everything is on the same hardware - nothing
>remote)
>>using standard odbc functions and everything seems to be working.
Simply
>>update the unixODBC.ini to point to the appropriate driver, add the data
>>source to the odbc.ini, and we're running.
>>
>>However; I'm curious if there is a way to configure unixODBC this so I don't
>>have to manually enter each database name into odbc.ini before it can be
>>used by the application? I've verified the databases are cataloged as
>>expected using LIST DATABASE... etc, and everything seems to be fine.
>Admit
>>it's not a big deal, was just curious if there was a way to prevent the
>>manual step from the DSN source side?
>>
>>Thanks
>>Jeff
>>
>>________________________________________________________
__
>___________
>>
>>* IDUG North America * Tampa, Florida, * May 10-14 2010 *
>http://IDUG.ORG/NA *
>>________________________________________________________
__
>___________
>>
>>http://www.idug.org/db2-videos.html has hundreds of video presentations!
>>Did you miss out on attending an IDUG conference?
>>Many of the presentations were recorded and are available on our
website!
>>________________________________________________________
__
>___________
>>
>>If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is
>the home of IDUG's DB2-L
>
>_________________________________________________________
____________
>
>* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
>_________________________________________________________
____________
>
>http://www.idug.org/events/index.html is your DB2 Events calendar! RUG
meetings,
>Webcasts, Conferences- what is going on next?
>RUG leaders- get your events on the calendar today!
>_________________________________________________________
____________
>
>If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Jorg Lueke

Re: Question concerning unixODBC
(in response to Jeffrey Garmon)
Kind of like the register as a system datasource on Windows?

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Ian Bjorhovde

Re: Question concerning unixODBC
(in response to Jorg Lueke)
Maybe this is a silly question, by why not just use the native DB2 driver
for PHP (i.e., ibm_db2) instead of using unixODBC? Then you wouldn't have
to set up the DSNs in odbc.ini at all.


Ian Bjorhovde

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L