Pages: 1/46 First page 1 2 3 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]

Oracle Block Change Tracking

[不指定 2010/03/16 17:27 | by askwan ]
Oracle Block Change Tracking is a new feather in oracle 10g ,it can improve RMAN incremental backup proformance by recording changed blocks in each datafile use a change tracking file.If change tracking is enabled, RMAN uses the change tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan every block in the datafile.
Identify current database enable block change tracking feather or not:
SQL> select filename,status,bytes from v$block_change_tracking;

FILENAME
--------------------------------------------------------------------------------
STATUS          BYTES
---------- ----------

DISABLED

Enabling and Disabling Change Tracking:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
*
ERROR at line 1:
ORA-19773: must specify change tracking file name

ENABLE BCT:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
  2  USING FILE '/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f' REUSE;

Database altered.

SQL> select filename,status,bytes from v$block_change_tracking;

FILENAME
--------------------------------------------------------------------------------
STATUS          BYTES
---------- ----------
/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f
ENABLED      11599872




DISABLE BCT:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

Database altered.

SQL> select filename,status,bytes from v$block_change_tracking;

FILENAME
--------------------------------------------------------------------------------
STATUS          BYTES
---------- ----------

DISABLED



Moving the Change Tracking File:
    step 1 :
  
SQL> SELECT filename FROM V$BLOCK_CHANGE_TRACKING;
FILENAME
--------------------------------------------------------------------------------
/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f


   step 2 :
   shutdown database

   step 3:
cp /opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f /tmp/


   step 4 :
mount database and do :
alter database rename file '/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f' to '/tmp/rman_change_track.f'


   step 5 : open database
     alter database open


referrence :《Oracle® Database Backup and Recovery Basics》
Tags: , , , ,
今年的“两会”就要开完了,再听听《走向共和》中国父的演讲……


“革命尚未成功 同志仍需努力”
“Revolution does not succeed yet,  comrades still need to struggle!”
                                       ------国父 孙中山
OS: CentOS 5.4 x86_64
Oracle: Oracle 10.2.0.1 64bit for linux
  
题外话:有些东西长时间不接触,而理解又不深刻的话,慢慢就淡忘了。。。
这个笔记是边参考文档oracle 10g《Data Guard Concepts and Administration》,边验证记录下的
仅供参考

单机环境配置oracle 10g dataguard (physical standby)
IP:192.168.0.21
预期规划如下:

主库:
db_name=dg1
sid=dg1  
db_unique_name=primary  
network_service_name=primary_21

ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
数据文件路径=/u01/oracle/oradata/dg1
归档日志路径=/u01/oracle/oradata/dg1/archive
警告跟踪等日志文件路径=/u01/oracle/admin/dg1/

从库:
dg_name=dg1
sid=standby  
db_unique_name=standby  
network_service_name=standby_21

ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
数据文件路径=/u01/oracle/oradata/standby
归档日志路径=/u01/oracle/oradata/standby/archive
警告跟踪等日志文件路径=/u01/oracle/admin/standby



1 准备工作
Tags: ,
System has been restarted everything seemed normal, the application starts normally! View the system boot log, there is no exception, the specific reasons for this situation also unknown now! It seems  need to continue to observe.

However, open system, found that swap partition 0
Swap:        0k total,        0k used,        0k free,   300496k cached

Is it did not installed the system swap partition?
[root@youke2 log]# cat /proc/swaps

output Nothing, there is no swap partition indeed !
this System has 4G mem, so additional 8G swap space manually
[root@youke2 log]# dd if=/dev/zero of=/tmp/swapfree bs=1024K count=8192
8192+0 records in 8192+0 records out 8589934592 bytes (8.6 GB) copied, 111.247 seconds, 77.2 MB/s


[root@youke2 log]# mkswap /tmp/swapfree
Setting up swapspace version 1, size = 8589930 kB

[root@youke2 log]# swapon /tmp/swapfree

Re-examine swap partition:

[root@youke2 log]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/tmp/swapfree                           file            8388600 0       -1

USE top TO CHECK  
Tasks: 145 total,   1 running, 144 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.2%sy,  0.0%ni, 94.4%id,  5.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4138172k total,  3834908k used,   303264k free,    28220k buffers
Swap:  8388600k total,        0k used,  8388600k free,  3605544k cached

OK! write this to fstab file,so it can valid at system start time !
/tmp/swapfree           swap                    swap    defaults        0 0
Pages: 1/46 First page 1 2 3 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]