How to change database instance name
Posted in 2010
Asked how to rename a database server instance on Linux, since Windows has the instmgr tool. Answers agreed it's straightforward on UNIX/Linux: bring the instance offline, edit DBSERVERNAME (and DBSERVERALIASES) in the ONCONFIG file, update the matching entries in the sqlhosts file, restart the instance, then update INFORMIXSERVER in users' environment scripts/.profiles. Jonathan Leffler noted the edits can be made before shutdown to cut downtime, and an IBM technote link was supplied. Poster was satisfied.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
Hello, I have done a search on this and I can find how to change the name of the database engine in Windows (theres even a tool to help), but how do you change the database instance name on a Linux setup? Thanks for your time and help. Sorry if this is already elsewhere.
Shut it down, modify the ONCONFIG file's SERVERNAME and/or DBSERVERALIASES parameters, and modify the sqlhosts file to reflect the new name(s). Then you only have to modify whatever environment scripts or .profiles the users are using to connect to the instance. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Nov 22, 2010 at 9:40 AM, ANDREW LEMIN <a_lemin@hotmail.com> wrote: > Hello, > I have done a search on this and I can find how to change the name of the > database engine in Windows (theres even a tool to help), but how do you > change > the database instance name on a Linux setup? > > Thanks for your time and help. > > Sorry if this is already elsewhere. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --20cf3054a7196164d50495a5590b
OK, no coffee yet. In case it's not obvious, you also have to restart the instance. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Nov 22, 2010 at 9:48 AM, Art Kagel <art.kagel@gmail.com> wrote: > Shut it down, modify the ONCONFIG file's SERVERNAME and/or DBSERVERALIASES > parameters, and modify the sqlhosts file to reflect the new name(s). Then > you only have to modify whatever environment scripts or .profiles the users > are using to connect to the instance. > > Art > > Art S. Kagel > Advanced DataTools (www.advancedatatools.com) > IIUG Board of Directors (art@iiug.org) > Blog: http://informix-myview.blogspot.com/ > > Disclaimer: Please keep in mind that my own opinions are my own opinions > and do not reflect on my employer, Advanced DataTools, the IIUG, nor any > other organization with which I am associated either explicitly, implicitly, > or by inference. Neither do those opinions reflect those of other > individuals affiliated with any entity with which I am affiliated nor those > of the entities themselves. > > > > > On Mon, Nov 22, 2010 at 9:40 AM, ANDREW LEMIN <a_lemin@hotmail.com> wrote: > >> Hello, >> I have done a search on this and I can find how to change the name of the >> database engine in Windows (theres even a tool to help), but how do you >> change >> the database instance name on a Linux setup? >> >> Thanks for your time and help. >> >> Sorry if this is already elsewhere. >> >> >> >> ******************************************************************************* >> Forum Note: Use "Reply" to post a response in the discussion forum. >> >> > --20cf3054a64d0aec230495a55bb6
Hello, You must change onconfig file (DBSERVERNAME parameter), and also change your $INFORMIXDIR/etc/sqlhosts file, in order to change your instance name. Regards. Em 22/11/2010 10:40, ANDREW LEMIN escreveu: > Hello, > I have done a search on this and I can find how to change the name of the > database engine in Windows (theres even a tool to help), but how do you change > the database instance name on a Linux setup? > > Thanks for your time and help. > > Sorry if this is already elsewhere. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Alexandre Marini Tecnologia da Informação - DBA SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix Cert-Info-Mgmt_color <Cert-Info-Mgmt_color.jpg> IBM Informix Dynamic Server Certified Professional V10 / V11
Thanks :) Thought it would be easy but wanted to make sure there wasn't anything else. Cheers.
Hello, There's a tool on Windows (instmgr) because its more complex due to instance dependant registry entries and filenames. On UNIX/Linux you can change DBSERVERNAME in your onconfig file, the INFORMIXSERVER environment variable, and corresponding entry(s) in your SQLHOSTS file. Regards Guy ________________________________ From: ANDREW LEMIN <a_lemin@hotmail.com> To: ids@iiug.org Sent: Mon, November 22, 2010 6:40:44 AM Subject: How to change database instance name [22007] Hello, I have done a search on this and I can find how to change the name of the database engine in Windows (theres even a tool to help), but how do you change the database instance name on a Linux setup? Thanks for your time and help. Sorry if this is already elsewhere. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
and http://www-01.ibm.com/support/docview.wss?uid=swg21156613 - this is kind of old and wrong for Windows, but valid for UNIX. ________________________________ From: Guy . <gbowerman@yahoo.com> To: ids@iiug.org Sent: Mon, November 22, 2010 12:16:35 PM Subject: Re: How to change database instance name [22007] Hello, There's a tool on Windows (instmgr) because its more complex due to instance dependant registry entries and filenames. On UNIX/Linux you can change DBSERVERNAME in your onconfig file, the INFORMIXSERVER environment variable, and corresponding entry(s) in your SQLHOSTS file. Regards Guy ________________________________ From: ANDREW LEMIN <a_lemin@hotmail.com> To: ids@iiug.org Sent: Mon, November 22, 2010 6:40:44 AM Subject: How to change database instance name [22007] Hello, I have done a search on this and I can find how to change the name of the database engine in Windows (theres even a tool to help), but how do you change the database instance name on a Linux setup? Thanks for your time and help. Sorry if this is already elsewhere. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
On Mon, Nov 22, 2010 at 06:40, ANDREW LEMIN <a_lemin@hotmail.com> wrote: > I have done a search on this and I can find how to change the name of the > database engine in Windows (there's even a tool to help), but how do you > change > the database instance name on a Linux setup? > AFAIK: * Take the server offline. * Edit $ONCONFIG - the DBSERVERNAME and DBSERVERALIASES entries * Edit $INFORMIXSQLHOSTS * Set $INFORMIXSERVER to the new value in all contexts where it is used * Restart You might be safe editing the ONCONFIG file while the server is up; the sqlhosts probably could be set up with the new names. The hard part is 'set $INFORMIXSERVER', but that could (probably would) be done piecemeal after the restart. So, you could rework that sequence as: * Edit $ONCONFIG - the DBSERVERNAME and DBSERVERALIASES entries * Edit $INFORMIXSQLHOSTS * Take the server offline. * Restart * Set $INFORMIXSERVER to the new value in all contexts where it is used This reduces the downtime for the server - not necessarily for the applications using it. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even. --00221504810341c5c40495b90c19