视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
oracle只读模式
2020-11-09 07:17:28 责编:小采
文档


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

数据库关闭的情况下

[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 1383808 bytes
Fixed Size 1340104 bytes
Variable Size 658509112 bytes
Database Buffers 2292416 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 1383808 bytesFixed Size 1340104 bytesVariable Size 658509112 bytesDatabase Buffers 2292416 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 1383808 bytes
Fixed Size 1340104 bytes
Variable Size 658509112 bytes
Database Buffers 2292416 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 1383808 bytesFixed Size 1340104 bytesVariable Size 658509112 bytesDatabase Buffers 2292416 bytesRedo Buffers 5042176 bytesDatabase mounted.idle> alter database open read write;

Database altered.

下载本文
显示全文
专题