單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(2)

aaqwsh發表於2010-12-15

 

3        rman 備份主庫

run

{

allocate channel d1 type disk;

allocate channel d2 type disk;

allocate channel d3 type disk;

allocate channel d4 type disk;

backup incremental level 0 as compressed backupset database format '/data/backup/hellodb_%d_%T_%U.bak';

release channel d1;

release channel d2;

release channel d3;

release channel d4;

}

 

backup current controlfile for standby format '/data/backup/stdctl_hellodb.ctl';

 

把備份好的檔案傳到備庫上,包括備份、控制檔案、密碼檔案

scp * 192.168.1.2:/data/backup/

scp * 192.168.1.21:/data/backup/

 

4       建立02 Lgstdby

A 引數:

control_files = /data/oracle/oradata/hellodb/control1.ctl

undo_management = AUTO

undo_tablespace = UNDOTBS1

db_name = hellodb

db_block_size = 8192

processes=500

sessions=500

sga_max_size=4G

sga_target=4G

large_pool_size=1G

background_dump_dest=/data/oracle/oradata/hellodb/bdump

user_dump_dest=/data/oracle/oradata/hellodb/udump

core_dump_dest=/data/oracle/oradata/hellodb/cdump

*.DB_UNIQUE_NAME='db02'

*.FAL_CLIENT='tns02'

*.fal_server='tnsrac', 'tns52'

*.log_archive_config='DG_CONFIG=(testrac,db52,db02)'

*.log_archive_dest_1='LOCATION=/data/oracle/oradata/hellodb/arch'

*.log_archive_dest_2='SERVICE=tnsrac LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testrac'

*.log_archive_dest_3='SERVICE=tns02 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=db02'

*.log_archive_dest_state_1='enable'

*.log_archive_dest_state_2='DEFER'

*.log_archive_dest_state_3='DEFER'

*.standby_file_management='AUTO'

*.compatible=10.2.0.1.0

*.log_file_name_convert='+ARCH','/data/oracle/oradata/hellodb'

*.db_create_file_dest='/data/oracle/oradata/hellodb'

*.db_file_name_convert='+DATA/testrac/datafile','/data/oracle/oradata/hellodb','+DATA/testrac/tempfile','/data/oracle/oradata/hellodb'

*._in_memory_undo=FALSE

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-681929/,如需轉載,請註明出處,否則將追究法律責任。

相關文章