oracle只读模式

PHPz
풀어 주다: 2018-09-28 17:34:32
원래의
1683명이 탐색했습니다.

在只读模式下,数据文件及联机日志文件都禁止写操作。不过允许执行数据库恢复及其他不会产生回滚的操作。

数据库关闭的情况下

[oracle@prod1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 22 19:07:12 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

idle> startup open read only;
ORACLE instance started.

Total System Global Area  891383808 bytes
Fixed Size                  1340104 bytes
Variable Size             658509112 bytes
Database Buffers          226492416 bytes
Redo Buffers                5042176 bytes
Database mounted.
Database opened.


idle> select open_mode from v$database;OPEN_MODE
--------------------READ ONLY
로그인 후 복사
로그인 후 복사

mount状态下

idle> alter database open read only;

Database altered.
로그인 후 복사
로그인 후 복사

重新恢复到读写状态

idle> shutdown immediate;
Database closed.Database dismounted.ORACLE instance shut down.idle> startup mount;
ORACLE instance started.Total System Global Area  891383808 bytesFixed Size                  1340104 bytesVariable Size             658509112 bytesDatabase Buffers          226492416 bytesRedo Buffers                5042176 bytesDatabase mounted.idle> alter database open read write;

Database altered.
로그인 후 복사
로그인 후 복사

在只读模式下,数据文件及联机日志文件都禁止写操作。不过允许执行数据库恢复及其他不会产生回滚的操作。

数据库关闭的情况下

[oracle@prod1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 22 19:07:12 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

idle> startup open read only;
ORACLE instance started.

Total System Global Area  891383808 bytes
Fixed Size                  1340104 bytes
Variable Size             658509112 bytes
Database Buffers          226492416 bytes
Redo Buffers                5042176 bytes
Database mounted.
Database opened.


idle> select open_mode from v$database;OPEN_MODE
--------------------READ ONLY
로그인 후 복사
로그인 후 복사

mount状态下

idle> alter database open read only;

Database altered.
로그인 후 복사
로그인 후 복사

重新恢复到读写状态

idle> shutdown immediate;
Database closed.Database dismounted.ORACLE instance shut down.idle> startup mount;
ORACLE instance started.Total System Global Area  891383808 bytesFixed Size                  1340104 bytesVariable Size             658509112 bytesDatabase Buffers          226492416 bytesRedo Buffers                5042176 bytesDatabase mounted.idle> alter database open read write;

Database altered.
로그인 후 복사
로그인 후 복사
관련 라벨:
원천:csdn.net
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!