PHP code: [oracle@test51 bin]$ ./rman target / Recovery Manager: Release 11.1.0.6.0 - Production on Thu Aug 16 15:51:22 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ORA11G (DBID=4026454982) RMAN> backup database format '/home/oracle/liuyun/%U.bak'; Starting backup at 16-AUG-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=121 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00004 name=/home/oracle/opt/oradata/ora11g/users01.dbf input datafile file number=00002 name=/home/oracle/opt/oradata/ora11g/sysaux01.dbf input datafile file number=00001 name=/home/oracle/opt/oradata/ora11g/system01.dbf input datafile file number=00005 name=/home/oracle/opt/oradata/ora11g/example01.dbf input datafile file number=00003 name=/home/oracle/opt/oradata/ora11g/undotbs01.dbf channel ORA_DISK_1: starting piece 1 at 16-AUG-07 channel ORA_DISK_1: finished piece 1 at 16-AUG-07 piece handle=/home/oracle/liuyun/03iphp8l_1_1.bak tag=TAG20070816T155148 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 16-AUG-07 channel ORA_DISK_1: finished piece 1 at 16-AUG-07 piece handle=/home/oracle/liuyun/04iphpc9_1_1.bak tag=TAG20070816T155148 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 16-AUG-07 ..
[oracle@test51 bin]$ ./rman target / Recovery Manager: Release 11.1.0.6.0 - Production on Thu Aug 16 15:51:22 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ORA11G (DBID=4026454982) RMAN> backup database format '/home/oracle/liuyun/%U.bak'; Starting backup at 16-AUG-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=121 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00004 name=/home/oracle/opt/oradata/ora11g/users01.dbf input datafile file number=00002 name=/home/oracle/opt/oradata/ora11g/sysaux01.dbf input datafile file number=00001 name=/home/oracle/opt/oradata/ora11g/system01.dbf input datafile file number=00005 name=/home/oracle/opt/oradata/ora11g/example01.dbf input datafile file number=00003 name=/home/oracle/opt/oradata/ora11g/undotbs01.dbf channel ORA_DISK_1: starting piece 1 at 16-AUG-07 channel ORA_DISK_1: finished piece 1 at 16-AUG-07 piece handle=/home/oracle/liuyun/03iphp8l_1_1.bak tag=TAG20070816T155148 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 16-AUG-07 channel ORA_DISK_1: finished piece 1 at 16-AUG-07 piece handle=/home/oracle/liuyun/04iphpc9_1_1.bak tag=TAG20070816T155148 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 16-AUG-07 ..
PHP code: [oracle@test51 standby]$ export ORACLE_SID=standby [oracle@test51 standby]$ sql SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 16 16:27:08 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. idle> startup nomount pfile='$ORACLE_BASE/admin/standby/pfile/init.ora' ORACLE instance started. Total System Global Area 836976640 bytes Fixed Size 1303132 bytes Variable Size 595594660 bytes Database Buffers 234881024 bytes Redo Buffers 5197824 bytes idle> alter database mount standby database; Database altered. [oracle@test51 bin]$ ./rman target / Recovery Manager: Release 11.1.0.6.0 - Production on Thu Aug 16 16:30:11 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ORA11G (DBID=4026454982, not open) RMAN> restore database; Starting restore at 16-AUG-07 Starting implicit crosscheck backup at 16-AUG-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=147 device type=DISK Crosschecked 4 objects Finished implicit crosscheck backup at 16-AUG-07 Starting implicit crosscheck copy at 16-AUG-07 using channel ORA_DISK_1 Crosschecked 2 objects Finished implicit crosscheck copy at 16-AUG-07 searching for all files in the recovery area cataloging files... no files cataloged using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to /home/oracle/opt/oradata/standby/system01.dbf channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/opt/oradata/standby/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00003 to /home/oracle/opt/oradata/standby/undotbs01.dbf channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/opt/oradata/standby/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /home/oracle/opt/oradata/standby/example01.dbf channel ORA_DISK_1: reading from backup piece /home/oracle/liuyun/03iphp8l_1_1.bak channel ORA_DISK_1: piece handle=/home/oracle/liuyun/03iphp8l_1_1.bak tag=TAG20070816T155148 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:02:05 Finished restore at 16-AUG-07 ..
[oracle@test51 standby]$ export ORACLE_SID=standby [oracle@test51 standby]$ sql SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 16 16:27:08 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. idle> startup nomount pfile='$ORACLE_BASE/admin/standby/pfile/init.ora' ORACLE instance started. Total System Global Area 836976640 bytes Fixed Size 1303132 bytes Variable Size 595594660 bytes Database Buffers 234881024 bytes Redo Buffers 5197824 bytes idle> alter database mount standby database; Database altered. [oracle@test51 bin]$ ./rman target / Recovery Manager: Release 11.1.0.6.0 - Production on Thu Aug 16 16:30:11 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: ORA11G (DBID=4026454982, not open) RMAN> restore database; Starting restore at 16-AUG-07 Starting implicit crosscheck backup at 16-AUG-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=147 device type=DISK Crosschecked 4 objects Finished implicit crosscheck backup at 16-AUG-07 Starting implicit crosscheck copy at 16-AUG-07 using channel ORA_DISK_1 Crosschecked 2 objects Finished implicit crosscheck copy at 16-AUG-07 searching for all files in the recovery area cataloging files... no files cataloged using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00001 to /home/oracle/opt/oradata/standby/system01.dbf channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/opt/oradata/standby/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00003 to /home/oracle/opt/oradata/standby/undotbs01.dbf channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/opt/oradata/standby/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /home/oracle/opt/oradata/standby/example01.dbf channel ORA_DISK_1: reading from backup piece /home/oracle/liuyun/03iphp8l_1_1.bak channel ORA_DISK_1: piece handle=/home/oracle/liuyun/03iphp8l_1_1.bak tag=TAG20070816T155148 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:02:05 Finished restore at 16-AUG-07 ..