- https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/flashback.html#GUID-28F62D88-B5DF-4A09-9D72-6605F9A56308">https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/flashback.html#GUID-28F62D88-B5DF-4A09-9D72-6605F9A56308
- https://www.yuque.com/yongle-okrsc/kb/ti9m0a">https://www.yuque.com/yongle-okrsc/kb/ti9m0a
- 1.创建闪回归档
- 2.修改默认闪回归档
- 3.添加表空间到指定闪回归档并限制配额
- 4.添加表空间到指定闪回归档
- 5.修改指定闪回归档对指定表空间的空间配额
- 6.修改闪回归档的表空间属性
- 7.修改闪回归档的保留时间
- 8.从闪回归档移除特定表空间
- 9.删除特定闪回归档的全部日志
- 10.删除特定时间点之后的闪回归档日志
- 11.删除特定scn之后的闪回归档日志
- 12.删除特定闪回归档
https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/flashback.html#GUID-28F62D88-B5DF-4A09-9D72-6605F9A56308
https://www.yuque.com/yongle-okrsc/kb/ti9m0a
1.创建闪回归档
By default, the system has no default Flashback Data Archive. If you are logged on as SYSDBA, you can specify default Flashback Data Archive in either of these ways:
####创建默认闪回#######
CREATE FLASHBACK ARCHIVE DEFAULT fla1 TABLESPACE users
QUOTA 10G RETENTION 1 YEAR;
#####创建普通闪回############
CREATE FLASHBACK ARCHIVE fla2 TABLESPACE tbs2 RETENTION 2 YEAR;
2.修改默认闪回归档
ALTER FLASHBACK ARCHIVE fla1 SET DEFAULT;
3.添加表空间到指定闪回归档并限制配额
ALTER FLASHBACK ARCHIVE fla1 ADD TABLESPACE tbs3 QUOTA 5G;
4.添加表空间到指定闪回归档
ALTER FLASHBACK ARCHIVE fla1 ADD TABLESPACE tbs4;
-
5.修改指定闪回归档对指定表空间的空间配额
ALTER FLASHBACK ARCHIVE fla1 MODIFY TABLESPACE tbs3 QUOTA 20G;
-
6.修改闪回归档的表空间属性
ALTER FLASHBACK ARCHIVE fla1 MODIFY TABLESPACE tbs1;
-
7.修改闪回归档的保留时间
opy
ALTER FLASHBACK ARCHIVE fla1 MODIFY RETENTION 2 YEAR;
8.从闪回归档移除特定表空间
ALTER FLASHBACK ARCHIVE fla1 REMOVE TABLESPACE tbs2;
(Tablespace tbs2 is not dropped.)
9.删除特定闪回归档的全部日志
ALTER FLASHBACK ARCHIVE fla1 PURGE ALL;
10.删除特定时间点之后的闪回归档日志
ALTER FLASHBACK ARCHIVE fla1 PURGE BEFORE TIMESTAMP (SYSTIMESTAMP - INTERVAL '1' DAY);
11.删除特定scn之后的闪回归档日志
ALTER FLASHBACK ARCHIVE fla1 PURGE BEFORE SCN 728969;
12.删除特定闪回归档
``` DROP FLASHBACK ARCHIVE fla1;
<a name="EZ7bK"></a>
#### 13.建表使用默认闪回归档
CREATE TABLE employee (EMPNO NUMBER(4) NOT NULL, ENAME VARCHAR2(10), JOB VARCHAR2(9), MGR NUMBER(4)) FLASHBACK ARCHIVE;
<a name="qZt9O"></a>
#### 14.建表使用指定闪回归档
CREATE TABLE employee (EMPNO NUMBER(4) NOT NULL, ENAME VARCHAR2(10), JOB VARCHAR2(9), MGR NUMBER(4)) FLASHBACK ARCHIVE fla1;
<a name="Cw27C"></a>
#### 15.表启用默认闪回归档
ALTER TABLE employee FLASHBACK ARCHIVE;
<a name="a2xzh"></a>
#### 16.表指定闪回归档
ALTER TABLE employee FLASHBACK ARCHIVE fla1;
<a name="JPis9"></a>
#### 17.表禁用默认闪回归档
ALTER TABLE employee NO FLASHBACK ARCHIVE; ```