好久没打开笔记本上的数据库了,今天要测试一个东西竟然打不开了。错误提示如下:
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247876 bytes
Variable Size 79693180 bytes
Database Buffers 79691776 bytes
Redo Buffers 7139328 bytes
Database mounted.
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file: 'E:\ORACLE\TRACE.LOG'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 5) 拒绝访问。
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) 系统找不到指定的文件。
tracking file: 'E:\ORACLE\TRACE.LOG'确实不在了。查了一下资料tracking file是优化增量备份的。那么我们可以不用这个功能。
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
Database altered.
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247876 bytes
Variable Size 79693180 bytes
Database Buffers 79691776 bytes
Redo Buffers 7139328 bytes
Database mounted.
Database opened.
SQL>
顺便复习一下tracking file的几个知识点。
1. 通过位图跟踪两次备份间变化的数据块;
2. 每次备份前进行位图切换;
3. 开发增量备份策略时,要考虑到8个位图的限制;
4. 在RAC环境中,change tracking file需要放在共享存储上;
5. Change tracking file的大小和数据库的大小和enabled的redo thread的个数成正比;
6. Change tracking file的大小和数据更新的频率无关;
7. 在mount或open状态下enable change tracking;
8.Enable change tracking
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/rman_change_track.f' REUSE;
9.Disable change tracking
ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
10. 检查change tracking状态
SELECT STATUS, FILENAME FROM V$BLOCK_CHANGE_TRACKING;
11. 改变change tracking file的位置
1) 不关闭数据库的方式
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE 'new_location';
注意:这种方式会丢失change tracking file的内容
2) 关闭数据库的方式
SQL> SELECT FILENAME FROM V$BLOCK_CHANGE_TRACKING;(确定当前的文件名)
SQL> SHUTDOWN IMMEDIATE
用操作系统命令将文件move到新路径
SQL> ALTER DATABASE RENAME FILE
'/disk1/changetracking/o1_mf_2f71np5j_.chg' TO
'/disk2/changetracking/o1_mf_2f71np5j_.chg';
SQL> ALTER DATABASE OPEN;
阅读(9052) | 评论(0) | 转发(0) |