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: joel garry <joel-garry_at_home.com>
Date: 25 Feb 2007 18:35:59 -0800
Message-ID: <1172457359.283072.20500@q2g2000cwa.googlegroups.com>


On Feb 24, 1:23 pm, Mladen Gogala <mgogala.SPAM_ME...._at_verizon.net> wrote:
> 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

Thanks Mladen, I didn't mean to imply a read-only had to be a standby. But I can see where it looks like I meant that.

My real problem was it was such a broad question that it brought out weird old things people have wanted to do from the deep dark recesses of my mind. This thread is nowhere near "full information about read only databases."

Now let's see you run an _entire_ database off a read-only medium :-) (Actually, I think it could be done with operating systems that let you create an in-memory filesystem, simply create a redo/undo directory there as part of db startup and copy what is needed. I have a vague memory of doing stuff like that decades ago.)

jg

--
@home.com is bogus.
Received on Sun Feb 25 2007 - 20:35:59 CST

Original text of this message

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