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

Home -> Community -> Usenet -> c.d.o.server -> Re: read only database

Re: read only database

From: Mladen Gogala <mgogala.SPAM_ME.NOT_at_verizon.net>
Date: Sat, 24 Feb 2007 21:23:04 GMT
Message-ID: <Y02Eh.3946$Xe1.3224@trndny01>


On Thu, 22 Feb 2007 17:27:59 -0800, joel garry wrote:

> On Feb 22, 3:34 pm, leobo..._at_gmail.com wrote:

>> Can any body give full information about read only databases.

>
> Ain't no such thing. Anything you try can be overridden by someone
> with a clue.
>
> You can bring up standby database in read-only mode, though. You need
> to be more specific about what you really want to know.
>
> jg

SQL> startup mount
ORACLE instance started.

Total System Global Area 239075328 bytes

Fixed Size                  1261080 bytes
Variable Size             130023912 bytes
Database Buffers          100663296 bytes
Redo Buffers                7127040 bytes
Database mounted.
SQL> alter database open read only;

Database altered.

SQL>
SQL> connect scott/tiger
Connected.
SQL> select count(*) from emp;

  COUNT(*)


        14

SQL> delete from emp;
delete from emp

            *
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'USERS'

SQL> create table emp1 as select * from emp; create table emp1 as select * from emp

                                   *

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1 ORA-16000: database open for read-only access

SQL> connect sys as sysdba
Enter password:
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 239075328 bytes

Fixed Size                  1261080 bytes
Variable Size             130023912 bytes
Database Buffers          100663296 bytes
Redo Buffers                7127040 bytes
Database mounted.
Database opened.
SQL> connect scott/tiger
Connected.
SQL> create table emp1 as select * from emp;

Table created.

This is not a standby database. Any database can be open in read-only mode.

-- 
http://www.mladen-gogala.com
Received on Sat Feb 24 2007 - 15:23:04 CST

Original text of this message

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