Modify the "IBM INFORMIX ODBC DRIVER" Data Source
Posted in 2008
A DBA needed to change the DB_LOCALE of the IBM Informix ODBC DSN from en_US.CP1252 to en_US.CP819 across ~900 Windows servers without editing each DSN by hand. Responders explained the setting lives in the registry under HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)\\\\Software\\\\ODBC\\\\ODBC.INI\\\\<dsn>\\\\DB_LOCALE, and suggested scripting it via a .reg merge file applied with 'regedit /s merge.reg' (noting adequate privileges are needed). A follow-up question about setting DB_LOCALE centrally during a 7.31-to-10 upgrade got no clear answer, beyond a remark that INFORMIXSQLHOSTS on Windows should be set with setnet32.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ODBC / JDBC / .NET, Internationalization & Character Sets
How can I modify the "IBM INFORMIX ODBC DRIVER" Data Source - Database Locale value from en_US.CP1252 to en_US.CP819 via a DOS batch script (preferably) and/or VB script. Thanks, *************************************** Ernie Knox Sears Holding Co. IT Database Administrator Specialist 3333 Beverly Rd., B4-266A Hoffman Estates, IL. 60179 Office: (847) 286-5735 Email: eknox@searshc.com <mailto:eknox@searshc.com> Blackberry: 2244650553@messaging.sprintpcs.com Page via Skytel: 2244650553@sprint.skytel.com " Yes we can make a Change! " " It's always a great day to watch Football - GO LIONS, TIGERS and BEARS! " ***************************************
ids-bounces@iiug.org wrote on 12/12/2008 01:38:51: > How can I modify the "IBM INFORMIX ODBC DRIVER" Data Source - Database > Locale value from en_US.CP1252 to en_US.CP819 via a DOS batch script > (preferably) and/or VB script. > Do you want to change the value of database locale in ODBC DSN? OR do you want your database locale for your database to change which is created with en_US.CP1252 to new locale en_US.CP819? Please clarify. If its about replacing the database locale from en_US.CP1252 to en_US.CP819 in ODBC DSN then you can write DOS batch script to update the registry entry(DB_LOCALE) based on location (i.e. User, System or File DSN) of your DSN. Alternatively you can also go to "ODBC Data Source Admin" from "Control Panel" and change the DB_LOCALE value for your DSN. > Thanks, > > ***************************************
Q: Do you want to change the value of database locale in ODBC DSN? A: Yes I will be writing a .bat script to change the SYSTEM DSN Database Locale from en_US.CP1252 to en_US.CP819. This will be run in over 900 servers. Q: OR do you want your database locale for your database to change which is created with en_US.CP1252 to new locale en_US.CP819? Please clarify. A: How would I change the database server from en_US.CP1252 to new locale en_US.CP819? I can't manually modify every SYSTEM DSN entry, so it has to be via the registry or the database server. Thanks, *************************************** Ernie Knox Sears Holding Co. IT Database Administrator Specialist 3333 Beverly Rd., B4-266A Hoffman Estates, IL. 60179 Office: (847) 286-5735 Email: eknox@searshc.com Blackberry: 2244650553@messaging.sprintpcs.com Page via Skytel: 2244650553@sprint.skytel.com " Yes we can make a Change! " " It's always a great day to watch Football - GO LIONS, TIGERS and BEARS! " *************************************** -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Sheshnarayan Agrawal Sent: Thursday, December 11, 2008 11:31 PM To: ids@iiug.org Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data.... [14281] ids-bounces@iiug.org wrote on 12/12/2008 01:38:51: > How can I modify the "IBM INFORMIX ODBC DRIVER" Data Source - Database > Locale value from en_US.CP1252 to en_US.CP819 via a DOS batch script > (preferably) and/or VB script. > Do you want to change the value of database locale in ODBC DSN? OR do you want your database locale for your database to change which is created with en_US.CP1252 to new locale en_US.CP819? Please clarify. If its about replacing the database locale from en_US.CP1252 to en_US.CP819 in ODBC DSN then you can write DOS batch script to update the registry entry(DB_LOCALE) based on location (i.e. User, System or File DSN) of your DSN. Alternatively you can also go to "ODBC Data Source Admin" from "Control Panel" and change the DB_LOCALE value for your DSN. > Thanks, > > *************************************** ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
ids-bounces@iiug.org wrote on 12/12/2008 11:26:43: > Q: Do you want to change the value of database locale in ODBC DSN? > > A: Yes I will be writing a .bat script to change the SYSTEM DSN Database > Locale from en_US.CP1252 to en_US.CP819. This will be run in over 900 > servers. In "My Computer\\\\HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\ODBC\\\\ODBC.INI\\\\<your respective dsn names>" registry location there would be key called "DB_LOCALE". Your goal should be changing the value to en_US.CP819. I am not the expert in writing registry related scripts! but I presume it would not be hard at all. One more thing you have to take care in your script is that you indeed have access to this registry entry, hence you need to ensure you have necessary privileges to run your script and update the registry entry. > > Q: OR do you want your database locale for your database to change which > is created with en_US.CP1252 to new locale en_US.CP819? Please clarify. > > A: How would I change the database server from en_US.CP1252 to new > locale en_US.CP819? > > I can't manually modify every SYSTEM DSN entry, so it has to be via the > registry or the database server. > > Thanks, > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > Sheshnarayan Agrawal > Sent: Thursday, December 11, 2008 11:31 PM > To: ids@iiug.org > Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data.... [14281] > > ids-bounces@iiug.org wrote on 12/12/2008 01:38:51: > > > How can I modify the "IBM INFORMIX ODBC DRIVER" Data Source - Database > > > Locale value from en_US.CP1252 to en_US.CP819 via a DOS batch script > > (preferably) and/or VB script. > > > > Do you want to change the value of database locale in ODBC DSN? OR do > you > want your database locale for your database to change which is created > with en_US.CP1252 to new locale en_US.CP819? Please clarify. > > If its about replacing the database locale from en_US.CP1252 to > en_US.CP819 in ODBC DSN then you can write DOS batch script to update > the > registry entry(DB_LOCALE) based on location (i.e. User, System or File > DSN) of your DSN. Alternatively you can also go to "ODBC Data Source > Admin" from "Control Panel" and change the DB_LOCALE value for your DSN. > > > Thanks, > > > > *************************************** > > ************************************************************************ > ******* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
Hi Ernie, You can accomplish this using a Registry merge file. Create a file with a .reg extension, say merge.reg. Next, type the text shown below between the dashed lines into the file, replacing HKEY_CURRENT_USER with HKEY_LOCAL_MACHINE and mysource with the name of your actual DSN, if applicable. -------------------- Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\\\\Software\\\\ODBC\\\\ODBC.INI\\\\mysource] "DB_LOCALE"="en_US.819" -------------------- At a command prompt or within a batch file, run the following command to merge the data: regedit /s merge.reg This Microsoft KB article has more info on merge files: http://support.microsoft.com/kb/310516 Hope this helps, PJ To
Thanks for all suggestions with modifying the ODBC data sources. It would be better to change the informix database upgrade DB LOCALE in one place, than the user data sources, which are many on each server. How do I modify the informix software DB LOCALE during an upgrade from 7.31 to 10? Is there a parameter in the silent.ini or a parameter in the ONCONFIG that I must set? This is Win2000. Thanks, *************************************** Ernie Knox Sears Holding Co. IT Database Administrator Specialist 3333 Beverly Rd., B4-266A Hoffman Estates, IL. 60179 Office: (847) 286-5735 Email: eknox@searshc.com Blackberry: 2244650553@messaging.sprintpcs.com Page via Skytel: 2244650553@sprint.skytel.com " Yes we can make a Change! " " It's always a great day to watch Football - GO LIONS, TIGERS and BEARS! " *************************************** -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL-JOHN TO Sent: Friday, December 12, 2008 12:54 AM To: ids@iiug.org Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14284] Hi Ernie, You can accomplish this using a Registry merge file. Create a file with a .reg extension, say merge.reg. Next, type the text shown below between the dashed lines into the file, replacing HKEY_CURRENT_USER with HKEY_LOCAL_MACHINE and mysource with the name of your actual DSN, if applicable. -------------------- Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\\\\Software\\\\ODBC\\\\ODBC.INI\\\\mysource] "DB_LOCALE"="en_US.819" -------------------- At a command prompt or within a batch file, run the following command to merge the data: regedit /s merge.reg This Microsoft KB article has more info on merge files: http://support.microsoft.com/kb/310516 Hope this helps, PJ To ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
These are the environment variables that I set before the upgrade.
set INFORMIXDIR=D:\\\\INFORMIX
set INFORMIXSERVER=olnnnn
set ONCONFIG=ONCONFIG
set PATH=D:\\\\INFORMIX\\\\bin;%PATH%;
set INFORMIXSQLHOSTS=\\\\\\\\STGnnnnS01set DBTEMP=%BKUPDIR%
set CLIENT_LOCALE=EN_US.CP1252
set DB_LOCALE=EN_US.8859-1set SERVER_LOCALE=EN_US.CP1252
set DBLANG=EN_US.CP1252
mode con codepage select=1252
Will these be the settings once I start upgrading the version? Should I
change the DB_LOCALE to match the EN_US.CP1252, which is currently being
used by all the data sources?
Thanks,
***************************************
Ernie Knox
Sears Holding Co.
IT Database Administrator Specialist
3333 Beverly Rd., B4-266A
Hoffman Estates, IL. 60179
Office: (847) 286-5735
Email: eknox@searshc.com
Blackberry: 2244650553@messaging.sprintpcs.com
Page via Skytel: 2244650553@sprint.skytel.com
" Yes we can make a Change! "
" It's always a great day to watch Football - GO LIONS, TIGERS and
BEARS! "
***************************************
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Knox, Ernest
Sent: Friday, December 12, 2008 4:24 PM
To: ids@iiug.org
Subject: RE: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14296]
Thanks for all suggestions with modifying the ODBC data sources.
It would be better to change the informix database upgrade DB LOCALE in
one place, than the user data sources, which are many on each server.
How do I modify the informix software DB LOCALE during an upgrade from
7.31 to 10? Is there a parameter in the silent.ini or a parameter in
the ONCONFIG that I must set?
This is Win2000.
Thanks,
***************************************
Ernie Knox
Sears Holding Co.
IT Database Administrator Specialist
3333 Beverly Rd., B4-266A
Hoffman Estates, IL. 60179
Office: (847) 286-5735
Email: eknox@searshc.com
Blackberry: 2244650553@messaging.sprintpcs.com
Page via Skytel: 2244650553@sprint.skytel.com
" Yes we can make a Change! "
" It's always a great day to watch Football - GO LIONS, TIGERS and
BEARS! "
***************************************
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
PAUL-JOHN TO
Sent: Friday, December 12, 2008 12:54 AM
To: ids@iiug.org
Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14284]
Hi Ernie,
You can accomplish this using a Registry merge file.
Create a file with a .reg extension, say merge.reg. Next, type the text
shown
below between the dashed lines into the file, replacing
HKEY_CURRENT_USER with
HKEY_LOCAL_MACHINE and mysource with the name of your actual DSN, if
applicable.
--------------------
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\\\\Software\\\\ODBC\\\\ODBC.INI\\\\mysource]
"DB_LOCALE"="en_US.819"
--------------------
At a command prompt or within a batch file, run the following command to
merge
the data:
regedit /s merge.reg
This Microsoft KB article has more info on merge files:
http://support.microsoft.com/kb/310516
Hope this helps,
PJ To
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
What !?
> set INFORMIXSQLHOSTS=\\\\\\\\STGnnnnS01
One can do this on windows? and get rid of *damn* windows registry?
Have to look...
J.
2008/12/12 Knox, Ernest <eknox@searshc.com>
> These are the environment variables that I set before the upgrade.
>
> set INFORMIXDIR=D:\\\\INFORMIX
> set INFORMIXSERVER=olnnnn
> set ONCONFIG=ONCONFIG
> set PATH=D:\\\\INFORMIX\\\\bin;%PATH%;
> set INFORMIXSQLHOSTS=\\\\\\\\STGnnnnS01> set DBTEMP=%BKUPDIR%
> set CLIENT_LOCALE=EN_US.CP1252
> set DB_LOCALE=EN_US.8859-1> set SERVER_LOCALE=EN_US.CP1252
> set DBLANG=EN_US.CP1252
> mode con codepage select=1252
>
> Will these be the settings once I start upgrading the version? Should I
> change the DB_LOCALE to match the EN_US.CP1252, which is currently being
> used by all the data sources?
>
> Thanks,
>
> ***************************************
> Ernie Knox
> Sears Holding Co.
> IT Database Administrator Specialist
> 3333 Beverly Rd., B4-266A
> Hoffman Estates, IL. 60179
> Office: (847) 286-5735
> Email: eknox@searshc.com
> Blackberry: 2244650553@messaging.sprintpcs.com
> Page via Skytel: 2244650553@sprint.skytel.com
>
> " Yes we can make a Change! "
>
> " It's always a great day to watch Football - GO LIONS, TIGERS and
> BEARS! "
> ***************************************
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> Knox, Ernest
> Sent: Friday, December 12, 2008 4:24 PM
> To: ids@iiug.org
> Subject: RE: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14296]
>
> Thanks for all suggestions with modifying the ODBC data sources.
>
> It would be better to change the informix database upgrade DB LOCALE in
> one place, than the user data sources, which are many on each server.
>
> How do I modify the informix software DB LOCALE during an upgrade from
> 7.31 to 10? Is there a parameter in the silent.ini or a parameter in
> the ONCONFIG that I must set?
>
> This is Win2000.
>
> Thanks,
>
> ***************************************
> Ernie Knox
> Sears Holding Co.
> IT Database Administrator Specialist
> 3333 Beverly Rd., B4-266A
> Hoffman Estates, IL. 60179
> Office: (847) 286-5735
> Email: eknox@searshc.com
> Blackberry: 2244650553@messaging.sprintpcs.com
> Page via Skytel: 2244650553@sprint.skytel.com
>
> " Yes we can make a Change! "
>
> " It's always a great day to watch Football - GO LIONS, TIGERS and
> BEARS! "
> ***************************************
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> PAUL-JOHN TO
> Sent: Friday, December 12, 2008 12:54 AM
> To: ids@iiug.org
> Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14284]
>
> Hi Ernie,
>
> You can accomplish this using a Registry merge file.
>
> Create a file with a .reg extension, say merge.reg. Next, type the text
> shown
> below between the dashed lines into the file, replacing
> HKEY_CURRENT_USER with
> HKEY_LOCAL_MACHINE and mysource with the name of your actual DSN, if
> applicable.
>
> --------------------
> Windows Registry Editor Version 5.00
>
> [HKEY_CURRENT_USER\\\\Software\\\\ODBC\\\\ODBC.INI\\\\mysource]
> "DB_LOCALE"="en_US.819"
> --------------------
>
> At a command prompt or within a batch file, run the following command to
>
> merge
> the data:
>
> regedit /s merge.reg
>
> This Microsoft KB article has more info on merge files:
> http://support.microsoft.com/kb/310516
>
> Hope this helps,
> PJ To
>
> ************************************************************************
>
> *******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> ************************************************************************
> *******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
ids-bounces@iiug.org wrote on 13/12/2008 04:06:04:
> These are the environment variables that I set before the upgrade.
>
> set INFORMIXDIR=D:\\\\INFORMIX
> set INFORMIXSERVER=olnnnn
> set ONCONFIG=ONCONFIG
> set PATH=D:\\\\INFORMIX\\\\bin;%PATH%;
> set INFORMIXSQLHOSTS=\\\\\\\\STGnnnnS01
You have to use setnet32 utility which is located in %INFORMIXDIR%\\\\bin
directory. I am not aware that on Windows INFORMIXSQLHOSTS env variable
works the way it works on Unix. As far as I know you have to use setnet32
utility to provide INFORMIXSQLHOSTS realted details.
> set DBTEMP=%BKUPDIR%
> set CLIENT_LOCALE=EN_US.CP1252
> set DB_LOCALE=EN_US.8859-1> set SERVER_LOCALE=EN_US.CP1252
> set DBLANG=EN_US.CP1252
> mode con codepage select=1252
>
> Will these be the settings once I start upgrading the version? Should I
> change the DB_LOCALE to match the EN_US.CP1252, which is currently being
> used by all the data sources?
>
> Thanks,
>
> ***************************************
> Ernie Knox
> Sears Holding Co.
> IT Database Administrator Specialist
> 3333 Beverly Rd., B4-266A
> Hoffman Estates, IL. 60179
> Office: (847) 286-5735
> Email: eknox@searshc.com
> Blackberry: 2244650553@messaging.sprintpcs.com
> Page via Skytel: 2244650553@sprint.skytel.com
>
> " Yes we can make a Change! "
>
> " It's always a great day to watch Football - GO LIONS, TIGERS and
> BEARS! "
> ***************************************
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> Knox, Ernest
> Sent: Friday, December 12, 2008 4:24 PM
> To: ids@iiug.org
> Subject: RE: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14296]
>
> Thanks for all suggestions with modifying the ODBC data sources.
>
> It would be better to change the informix database upgrade DB LOCALE in
> one place, than the user data sources, which are many on each server.
>
> How do I modify the informix software DB LOCALE during an upgrade from
> 7.31 to 10? Is there a parameter in the silent.ini or a parameter in
> the ONCONFIG that I must set?
>
> This is Win2000.
>
> Thanks,
>
> ***************************************
> Ernie Knox
> Sears Holding Co.
> IT Database Administrator Specialist
> 3333 Beverly Rd., B4-266A
> Hoffman Estates, IL. 60179
> Office: (847) 286-5735
> Email: eknox@searshc.com
> Blackberry: 2244650553@messaging.sprintpcs.com
> Page via Skytel: 2244650553@sprint.skytel.com
>
> " Yes we can make a Change! "
>
> " It's always a great day to watch Football - GO LIONS, TIGERS and
> BEARS! "
> ***************************************
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> PAUL-JOHN TO
> Sent: Friday, December 12, 2008 12:54 AM
> To: ids@iiug.org
> Subject: Re: Modify the "IBM INFORMIX ODBC DRIVER" Data Sou [14284]
>
> Hi Ernie,
>
> You can accomplish this using a Registry merge file.
>
> Create a file with a .reg extension, say merge.reg. Next, type the text
> shown
> below between the dashed lines into the file, replacing
> HKEY_CURRENT_USER with
> HKEY_LOCAL_MACHINE and mysource with the name of your actual DSN, if
> applicable.
>
> --------------------
> Windows Registry Editor Version 5.00
>
> [HKEY_CURRENT_USER\\\\Software\\\\ODBC\\\\ODBC.INI\\\\mysource]
> "DB_LOCALE"="en_US.819"
> --------------------
>
> At a command prompt or within a batch file, run the following command to
>
> merge
> the data:
>
> regedit /s merge.reg
>
> This Microsoft KB article has more info on merge files:
> http://support.microsoft.com/kb/310516
>
> Hope this helps,
> PJ To
>
> ************************************************************************
>
> *******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> ************************************************************************
> *******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>