quick way to make standby of small database is to make backup, copy it to destination and create standby
backup on source:
run {ALLOCATE CHANNEL DISK_1 DEVICE TYPE DISK MAXPIECESIZE 80G; BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/oracle/oradata/backup/full_%d_%T_%s_%p_db.bak' ; } run {ALLOCATE CHANNEL DISK_1 DEVICE TYPE DISK MAXPIECESIZE 80G; backup ARCHIVELOG FROM TIME 'SYSDATE -1/24' FORMAT '/oracle/oradata/backup/full_%d_%T_%s_%p_db.bak' ;} run {ALLOCATE CHANNEL DISK_1 DEVICE TYPE DISK MAXPIECESIZE 80G; backup as copy current controlfile for standby format '/oracle/oradata/backup/sby_%d_%T_%s_%p_control01.ctl';}
param file:
SYS@xxxxx> create pfile='/tmp/pfile.ora' from spfile;
copy to standby,modify audit dest and create spfile:
[oracle@xxxxx ~]$scp /tmp/pfile.ora 192.168.0.10:/tmp/ SQL> create spfile from pfile='//tmp/pfile.ora';
restore database:
SQL> shutdown abort; SQL> startup nomount pfile='/tmp/pfile.ora'; SQL> create spfile from pfile='/tmp/pfile.ora'; ASMCMD> mkdir +DATA/s00xxxx/ RMAN> restore controlfile from '/oracle/distr/backup/sby_P00TSMEV_20151025_32133_1_control01.ctl'; RMAN> alter database mount; RMAN> catalog start with '/oracle/distr/backup/‘; RMAN> run { allocate channel ch1 device type disk; crosscheck backup; } RMAN> run { allocate channel ch1 device type disk;set newname for database to '+DATA'; restore database;switch datafile all; recover database; }
configure standby:
SQL> alter system set dg_broker_start=true; DGMGRL> create configuration tsmevp_cfg as primary database is p00xxxxx connect identifier is p00xxxxx; DGMGRL> add database s00xxxxx as connect identifier is s00xxxxx maintained as physical; Database "s00tsmevr1" added DGMGRL> enable configuration;
DGMGRL> show configuration;
1 комментарий
привет! поиск/навигация неудобно организована в блоге. мне нравится как сделано в конфле :) тем более это больше похоже на базу знаний. не находил шаблончик?