Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Changing the Staus of a Database to Read Only

RE: Changing the Staus of a Database to Read Only

From: Johnston, Tim <TJohnston_at_quallaby.com>
Date: Fri, 27 Sep 2002 10:03:24 -0800
Message-ID: <F001.004DB5B9.20020927100324@fatcity.com>


Hi Ian...

  I can tell you how it works in 8.1.7...

You can alter a tablespace to read only with transactions in the database and the steps are as follows:

You issue the alter to read only command and it will wait for EVERY transaction in the database that started BEFORE you issued the command to finish before the alter is completed. Any transaction that starts after you issue the command is cleanly handled. If it is on the tablespace you are attempting to alter it will fail. If it is on another tablespace it will not have impact on your alter command.

i.e.

Trans 1 on Tablespace X
Trans 2 on Tablespace Y
Alter Tablespace Y to read only ( it waits ) End Trans 2
Notice Alter is still waiting
Attempt to start Trans 3 on Tablespace Y ( You will get an error ) Start Trans 4 on Tablespace X
End Trans 1
Notice Alter completes

HTH
Tim

-----Original Message-----
Sent: Friday, September 27, 2002 1:09 PM To: Multiple recipients of list ORACLE-L

I tried to post this in response to the "Best Practices" thread, but for unkown reasons it didn't seem to make it. My apologies if this is a repeat.

It had been stated that placing each partition in a separate tablespace allowed one to make a tablespace read only once that partition would no longer be used for insert/update/delete operations. I have not tried to switch a database from online to read only after 8.1.6, but as of that release doing so was difficult in an active database. Oracle required not only that there be no active transactions against the tablspace to be converted but no such transactions against the entire database.

If this has changed, when did it happen? We have a system where the ability to make a tablespace read only while the database is actively processing transactions bound for other tablespaces would be extremely useful.

Ian MacGregor
Stanford Linear Accelerator Center
ian_at_SLAC.Stanford.edu
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: MacGregor, Ian A.
  INET: ian_at_SLAC.Stanford.EDU

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Johnston, Tim
  INET: TJohnston_at_quallaby.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Sep 27 2002 - 13:03:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US