Beruflich Dokumente
Kultur Dokumente
Mohamed Azar.
Oracle DBA
http://mohamedazar.wordpress.com
NAME
---------
AZARDB
RMAN> run{
2> allocate channel d1 type disk;
3> backup format '/backups/df_t%t_s%s_p%p' database;
4> sql 'alter system archive log current';
5> backup format '/backups/al_t%t_s%s_p%p' archivelog all;
6> release channel d1;
7> }
released channel: d1
RMAN>
File created.
SQL>
Edit& Save
*.audit_file_dest =/u01/app/oracle/AUX/adump
*.core_dump_dest =/u01/app/oracle/AUX/cdump
*.db_name ="AUX"
*.instance_name =AUX
*.control_files =/u01/app/oracle/AUX/control01.ctl
*.db_file_name_convert =("+DATA","/u01/app/oracle/AUX","+SPTEST","/u01/app/oracle/AUX")
*.log_file_name_convert =("+DATA","/u01/app/oracle/AUX")
*.undo_management =AUTO
*.undo_retention =10800
*.undo_tablespace='UNDOTBS1'
*.db_block_size=8192
*.compatible='11.2.0.0.0'
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> run{
2> allocate auxiliary channel C1 device type disk;
3> duplicate target database to AUX;
4> }
sql statement: alter system set db_name = ''AZARDB'' comment= ''Modified by RMAN duplicate''
scope=spfile
sql statement: alter system set db_unique_name = ''AUX'' comment= ''Modified by RMAN
duplicate'' scope=spfile
database mounted
database dismounted
Oracle instance shut down
sql statement: alter system set db_name = ''AUX'' comment= ''Reset to original value by
RMAN'' scope=spfile
database opened
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
NAME
---------
AUX
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/AUX/azardb/datafile/system.256.736179685
/u01/app/oracle/AUX/azardb/datafile/sysaux.257.736179685
/u01/app/oracle/AUX/azardb/datafile/undotbs1.258.736179685
/u01/app/oracle/AUX/azardb/datafile/users.256.737964169
/u01/app/oracle/AUX/azardb/datafile/example.269.736179971
SQL>
Possible Errors:
You can get some errors , cann't restore datafile & onlineredo log files, in this case you need to create
directory ,It should be indicate.
azardb/datafile
azardb/onlinelog