[20180424]打开表空flashback on.txt

[20180424]打开表空flashback on.txt

--//昨天测试完成,链接http://blog.itpub.net/267265/viewspace-2153207/,忘记设置flashback on;.
--//今天设置回来,顺便做一个笔记.

1.环境:
SYS@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SYS@book> select open_mode from v$database ;
OPEN_MODE
--------------------
READ WRITE

SYS@book> alter tablespace tea flashback on;
alter tablespace tea flashback on
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any instance

--//竟然不能在open状态设置flashback on;.
$ oerr ora 01126
01126, 00000, "database must be mounted in this instance and not open in any instance"
// *Cause:  Obvious
// *Action:

2.测试在表空间offline下是否可行.

SYS@book> alter tablespace tea offline;
Tablespace altered.

SYS@book> alter tablespace tea flashback on;
alter tablespace tea flashback on
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any instance

SYS@book> alter tablespace tea online;
Tablespace altered.

--//看来必须在mount状态下调整.

SYS@book> startup mount
ORACLE instance started.
Total System Global Area  634732544 bytes
Fixed Size                  2255792 bytes
Variable Size             197133392 bytes
Database Buffers          427819008 bytes
Redo Buffers                7524352 bytes
Database mounted.
SYS@book> alter tablespace tea flashback off;

Tablespace altered.

SYS@book> alter tablespace tea flashback on;

Tablespace altered.

SYS@book> select * from v$tablespace;
       TS# NAME     INC BIG FLA ENC
---------- -------- --- --- --- ---
         0 SYSTEM   YES NO  YES
         1 SYSAUX   YES NO  YES
         2 UNDOTBS1 YES NO  YES
         4 USERS    YES NO  YES
         3 TEMP     NO  NO  YES
         6 EXAMPLE  YES NO  YES
         7 TEA      YES NO  YES
7 rows selected.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2153275/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/267265/viewspace-2153275/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值