单例转rac笔记

 

*.cluster_database=true
test1.instance_number=1
test2.instance_number=2
test2.thread=2
test1.thread=1
test1.undo_tablespace='UNDOTBS1'
test2.undo_tablespace='UNDOTBS2'

 

 


*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+ASMDG/orcl/controlfile/current.265.936626557','+UDEVDG/orcl/controlfile/current.256.936626557'
*.db_block_size=8192
*.db_create_file_dest='+ASMDG'
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='+UDEVDG'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
orcl1.instance_number=1
orcl2.instance_number=2
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=6737100800
*.processes=1500
*.remote_listener='rac-cluster:1521'
*.remote_login_passwordfile='exclusive'
*.sessions=1655
*.sga_target=20211302400
orcl2.thread=2
orcl1.thread=1
orcl1.undo_tablespace='UNDOTBS1'
orcl2.undo_tablespace='UNDOTBS2'

 

 


duplicate target database to orcl from active database;


connect target sys/oracle@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=target_vip1)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test)))

 

connect auxiliary sys/oracle@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dest_vip1)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)(UR=A)))

 

 

 

alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;

 

alter database add logfile thread 1 group 1 size 50M;
alter database add logfile thread 1 group 2 size 50M;
alter database add logfile thread 1 group 3 size 50M;

 

alter database add logfile thread 2 group 4 size 50M;
alter database add logfile thread 2 group 5 size 50M;
alter database add logfile thread 2 group 6 size 50M;

 

create undo tablespace undotbs2 datafile '+ASMDG/ORCL/DATAFILE/undotbs02.dbf' size 30M;

create undo tablespace undotbs2 '+ASMDG' size 30M autoextend on;


alter database enable thread 2;



create spfile='+ASMDG/ORCL/PARAMETERFILE/spfileorcl.ora' from pfile='initorcl.ora';




alter system set 'control_files='+ASMDG/orcl/controlfile/current.273.937043835','+UDEVDG/orcl/controlfile/current.386.937043835';
ALTER SYSTEM SET control_files='+ASMDG/orcl/controlfile/current.273.937043835','+UDEVDG/orcl/controlfile/current.386.937043835' scope=spfile;



ls -l +UDEVDG/orcl/controlfile/*



+ASMDG/orcl/controlfile/current.273.937043835


+UDEVDG/orcl/controlfile/current.386.937043835


mkdir -p /u01/app/oracle/admin/orcl2/{adump,dpdump,hdump,pfile}




srvctl add database -d orcl -o $ORACLE_HOME -p +ASMDG/ORCL/PARAMETERFILE/spfileorcl.ora
srvctl add instance -d orcl -i orcl1 -n p648
srvctl add instance -d orcl -i orcl2 -n p647
srvctl stop database -d orcl -o immediate
srvctl start database -d orcl

 

 


select file_id,file_name,AUTOEXTENSIBLE,bytes/1024/1024 m,MAXBYTES/1024/1024 m from dba_data_files order by 1
select * from gv$dba_temp_files
select name from v$fixed_table where lower(name) like '%temp%';

select * from GV$LOG;

select * from GV$TEMPFILE;
select INST_ID,FILE#,name from GV$datafile;

 

select name from v$datafile
union
select member from v$logfile
union
select file_name from dba_temp_files

 

posted on 2017-02-27 13:05  zhaobin022  阅读(120)  评论(0编辑  收藏  举报