jueves, 15 de octubre de 2009

RMAN Duplicate Windows

sc delete OracleServiceAUXPOWER

SQL> STARTUP mount PFILE=D:\oracle\product\10.2.0\admin\POWER\pfile\INITaux.ora;

SQL> create pfile = 'D:\oracle\product\10.2.0\admin\POWER\pfile\INITaux.ora' fro
m spfile;

Crear password

D:\oracle\product\10.2.0\admin\POWER\pfile>orapwd file=d:\oracle\product\10.2.0\
admin\POWER\pfile\pwdauxpower.ora password=oracle entries=5

Crear servicio

D:\oracle\product\10.2.0\admin\POWER\pfile>oradim -new -sid auxpower -startmode m -pfile D:\oracle\product\10.2.0\admin\POWER\pfile\INITaux.ora
Instance created.


SET ORACLE_SID=AUXPOWER

sqlplus "/as sysdba"

SQL>startup mount;

SQL>startup mount force;

SQL>select * from v$instance;

RMAN> rman target /@power auxiliary /

RMAN> duplicate target database to auxpower;


SQL> alter database open resetlogs;


File created.

RMAN
CONNECT AUXILIARY SYS/ORACLE@AUX.WORLD
CONNECT TARGET SYS/ORACLE@ORCL.WORLD
STARTUP CLONE NOMOUNT FORCE;
DUPLICATE TARGET DATABASE TO AUX;

*.control_files='D:\oracle\product\10.2.0\oradata\AUXPOWER\control01.ctl','D:\oracle\product\10.2.0\oradata\AUXPOWER\control02.ctl','D:\oracle\product\10.2.0\oradata\AUXPOWER\control03.ctl'


DUPLICATE TARGET DATABASE to auxpower UNTIL TIME “TO_DATE(’09/18/2008',’MM/DD/YYYY’)”;

DUPLICATE TARGET DATABASE TO auxpower NOFILENAMECHECK UNTIL TIME 'SYSDATE-7';