deactivate a single database
Posted in 2009
Topics: General Discussion
Hi, I'm used to work with DB2 and there is a function "deactivate database" which I'm searching for Informix now. I only found database server modes, but these would lock all databases not just one specific DB. What I want to achieve is to block all application connections to one specific DB (while other DB on the server keep running and open for connections). I need to block the database without dropping it in order to test if the DB is still in use by any applications or can be dropped. Thanks for any help kepos
LOCK DATABASE IN EXCLUSIVE MODE; Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. 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 Tue, May 5, 2009 at 5:58 AM, DAGMAR ULLRICH <ullrichd@hrz.uni-kassel.de>wrote: > Hi, > > I'm used to work with DB2 and there is a function "deactivate database" > which > I'm searching for Informix now. I only found database server modes, but > these > would lock all databases not just one specific DB. What I want to achieve > is > to block all application connections to one specific DB (while other DB on > the > server keep running and open for connections). I need to block the database > without dropping it in order to test if the DB is still in use by any > applications or can be dropped. > > Thanks for any help > kepos > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001636c5a435a84a4e046927761b
On Tue, May 5, 2009 at 03:08, Art Kagel <art.kagel@gmail.com> wrote: > LOCK DATABASE IN EXCLUSIVE MODE; That's probably the best there is in IDS. The trouble is that it requires the process that establishes that lock to hang around indefinitely, doing nothing. I don't see why that lock would start a transaction (and therefore incur the problems of a long transaction that gets rolled back), but there's a chance that it might start a transaction, especially in a MODE ANSI database. It is a reasonable feature request - but not one I've seen before. As such, it is unlikely to make it to the top of the priority list. > On Tue, May 5, 2009 at 5:58 AM, DAGMAR ULLRICH wrote: >> I'm used to work with DB2 and there is a function "deactivate database" >> which >> I'm searching for Informix now. I only found database server modes, but >> these >> would lock all databases not just one specific DB. What I want to achieve >> is >> to block all application connections to one specific DB (while other DB on >> the >> server keep running and open for connections). I need to block the database >> without dropping it in order to test if the DB is still in use by any >> applications or can be dropped. -- 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. Emo Philips - "I got some new underwear the other day. Well, new to me." - http://www.brainyquote.com/quotes/authors/e/emo_philips.html
Perhaps just renaming the database would server your purpose. Rename database "database_name" to "new_name"; -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Jonathan Leffler Sent: Tuesday, May 05, 2009 3:45 PM To: ids@iiug.org Subject: Re: deactivate a single database [15678] On Tue, May 5, 2009 at 03:08, Art Kagel <art.kagel@gmail.com> wrote: > LOCK DATABASE IN EXCLUSIVE MODE; That's probably the best there is in IDS. The trouble is that it requires the process that establishes that lock to hang around indefinitely, doing nothing. I don't see why that lock would start a transaction (and therefore incur the problems of a long transaction that gets rolled back), but there's a chance that it might start a transaction, especially in a MODE ANSI database. It is a reasonable feature request - but not one I've seen before. As such, it is unlikely to make it to the top of the priority list. > On Tue, May 5, 2009 at 5:58 AM, DAGMAR ULLRICH wrote: >> I'm used to work with DB2 and there is a function "deactivate database" >> which >> I'm searching for Informix now. I only found database server modes, but >> these >> would lock all databases not just one specific DB. What I want to achieve >> is >> to block all application connections to one specific DB (while other DB on >> the >> server keep running and open for connections). I need to block the database >> without dropping it in order to test if the DB is still in use by any >> applications or can be dropped. -- 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. Emo Philips - "I got some new underwear the other day. Well, new to me." - http://www.brainyquote.com/quotes/authors/e/emo_philips.html ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
Or revoke connect from all on the database. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Rogers Patterson Sent: Tuesday, May 05, 2009 4:16 PM To: ids@iiug.org Subject: RE: deactivate a single database [15679] Perhaps just renaming the database would server your purpose. Rename database "database_name" to "new_name"; -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Jonathan Leffler Sent: Tuesday, May 05, 2009 3:45 PM To: ids@iiug.org Subject: Re: deactivate a single database [15678] On Tue, May 5, 2009 at 03:08, Art Kagel <art.kagel@gmail.com> wrote: > LOCK DATABASE IN EXCLUSIVE MODE; That's probably the best there is in IDS. The trouble is that it requires the process that establishes that lock to hang around indefinitely, doing nothing. I don't see why that lock would start a transaction (and therefore incur the problems of a long transaction that gets rolled back), but there's a chance that it might start a transaction, especially in a MODE ANSI database. It is a reasonable feature request - but not one I've seen before. As such, it is unlikely to make it to the top of the priority list. > On Tue, May 5, 2009 at 5:58 AM, DAGMAR ULLRICH wrote: >> I'm used to work with DB2 and there is a function "deactivate database" >> which >> I'm searching for Informix now. I only found database server modes, but >> these >> would lock all databases not just one specific DB. What I want to achieve >> is >> to block all application connections to one specific DB (while other DB on >> the >> server keep running and open for connections). I need to block the database >> without dropping it in order to test if the DB is still in use by any >> applications or can be dropped. -- 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. Emo Philips - "I got some new underwear the other day. Well, new to me." - http://www.brainyquote.com/quotes/authors/e/emo_philips.html ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.