Database read only
Posted in 2006
A user on Informix 7.31 (HP-UX) wanted to put a database into read-only mode to block access during a data migration. The reply: there is no read-only mode in that version (IDS 10 added single-user mode). Suggested workarounds were changing the sqlhosts port, or renaming the instance in ONCONFIG (DBSERVERNAME/DBSERVERALIASES, plus INFORMIXSERVER) — both needing an engine restart — or, after kicking users off, opening the database exclusively or renaming it. Jonathan Leffler corrected the exclusive-lock syntax to "DATABASE x EXCLUSIVE;". The original poster never confirmed which option he used.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
Hi, I need to put my database in read-only mode to previne access while we migrate the data to the other database. I'm using Informix 7.31.UD6 on HP-UX. I would like to know to proceed in this case? Thanks. Rodrigo
There is no read-only mode (IDS 10 now has a single user mode) so you can do different things: 1) If your apps connect through the network then an easy way is to change the ports on sqlhosts. You only need to be careful about any scripts that may run locally. 2) If you have many local applications running on the same box or you want a safer option, then change the name of the instance in onconfig DBSERVERNAME and DBSERVERALIASES (don't forget to change INFORMIXSERVER environment variable for your exports to work). Both options require you to bounce the engine. Hope it helps. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Rodrigo Ale.... Sent: 20 May 2006 14:05 To: ids@iiug.org Subject: Database read only [6789] Hi, I need to put my database in read-only mode to previne access while we migrate the data to the other database. I'm using Informix 7.31.UD6 on HP-UX. I would like to know to proceed in this case? Thanks. Rodrigo ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************
A few more options: 3) LOCK DATABASE dbname IN EXCLUSIVE MODE if you can kick everyone out first ;-) 4) RENAME the database, you'll also need to kick everyone out first. I'm assuming there are many applications on the network trying to access the db which aren't easy to stop and restart. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John Macadam Sent: 20 May 2006 23:12 To: ids@iiug.org Subject: RE: Database read only [6790] There is no read-only mode (IDS 10 now has a single user mode) so you can do different things: 1) If your apps connect through the network then an easy way is to change the ports on sqlhosts. You only need to be careful about any scripts that may run locally. 2) If you have many local applications running on the same box or you want a safer option, then change the name of the instance in onconfig DBSERVERNAME and DBSERVERALIASES (don't forget to change INFORMIXSERVER environment variable for your exports to work). Both options require you to bounce the engine. Hope it helps. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Rodrigo Ale.... Sent: 20 May 2006 14:05 To: ids@iiug.org Subject: Database read only [6789] Hi, I need to put my database in read-only mode to previne access while we migrate the data to the other database. I'm using Informix 7.31.UD6 on HP-UX. I would like to know to proceed in this case? Thanks. Rodrigo ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
Forget option 3, it seems I got confused with other db engine :-S (or maybe getting old too). -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John Macadam Sent: 20 May 2006 23:25 To: ids@iiug.org Subject: RE: Database read only [6791] A few more options: 3) LOCK DATABASE dbname IN EXCLUSIVE MODE if you can kick everyone out first ;-) 4) RENAME the database, you'll also need to kick everyone out first. I'm assuming there are many applications on the network trying to access the db which aren't easy to stop and restart. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of John Macadam Sent: 20 May 2006 23:12 To: ids@iiug.org Subject: RE: Database read only [6790] There is no read-only mode (IDS 10 now has a single user mode) so you can do different things: 1) If your apps connect through the network then an easy way is to change the ports on sqlhosts. You only need to be careful about any scripts that may run locally. 2) If you have many local applications running on the same box or you want a safer option, then change the name of the instance in onconfig DBSERVERNAME and DBSERVERALIASES (don't forget to change INFORMIXSERVER environment variable for your exports to work). Both options require you to bounce the engine. Hope it helps. -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Rodrigo Ale.... Sent: 20 May 2006 14:05 To: ids@iiug.org Subject: Database read only [6789] Hi, I need to put my database in read-only mode to previne access while we migrate the data to the other database. I'm using Informix 7.31.UD6 on HP-UX. I would like to know to proceed in this case? Thanks. Rodrigo ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum.
On 5/20/06, John Macadam <jmacadam@lastminute.com> wrote: > > Forget option 3, it seems I got confused with other db engine :-S > (or maybe getting old too). Concept is fine - syntax is off: DATABASE x EXCLUSIVE; > -----Original Message----- [...] > A few more options: > > 3) LOCK DATABASE dbname IN EXCLUSIVE MODE if you can kick everyone out > first ;-) [...] > -----Original Message----- > I need to put my database in read-only mode to previne access > while we migrate the data to the other database. I'm using Informix > 7.31.UD6 on HP-UX. I would like to know to proceed in this case? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Oh well, not so old then ;-) Thx mate! -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Jonathan Le.... Sent: 21 May 2006 13:57 To: ids@iiug.org Subject: Re: Database read only [6793] On 5/20/06, John Macadam <jmacadam@lastminute.com> wrote: > > Forget option 3, it seems I got confused with other db engine :-S (or > maybe getting old too). Concept is fine - syntax is off: DATABASE x EXCLUSIVE; > -----Original Message----- [...] > A few more options: > > 3) LOCK DATABASE dbname IN EXCLUSIVE MODE if you can kick everyone out > first ;-) [...] > -----Original Message----- > I need to put my database in read-only mode to previne access while we > migrate the data to the other database. I'm using Informix > 7.31.UD6 on HP-UX. I would like to know to proceed in this case? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/ ************************************************************************ ******* Forum Note: Use "Reply" to post a response in the discussion forum. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************