Documente Academic
Documente Profesional
Documente Cultură
Source
database name
: sham
: rose
TYPE
VALUE
--------- -----------------------------------------------------string
/u01/app/oracle/product/10.2.0/db_1/dbs/spfilesham.ora
$ORACLE_HOME/dbs/
6 15:38 orapwrose
5 16:11 orapwsham
rose.__db_cache_size=260046848
rose.__java_pool_size=4194304
rose.__large_pool_size=4194304
rose.__shared_pool_size=100663296
rose.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/rose/adump'
*.background_dump_dest='/u01/app/oracle/admin/rose/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/u01/app/oracle/oradata/rose/control01.ctl',
/u01/app/oracle/oradata/rose/control02.ctl',
'/u01/app/oracle/oradata/rose/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/rose/cdump'
*.db_block_size=8192
*.db_domain='server2.com'
*.db_file_multiblock_read_count=16
*.db_name='rose'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4194304000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=roseXDB)'
*.job_queue_processes=10
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=123731968
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=372244480
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/rose/udump'
# Below parameters are used for from where to where the DATAFILES & LOGFILES will be cloned
db_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u01/app/oracle/oradata/rose')
log_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u01/app/oracle/oradata/rose')
POINTS TO NOTE
If the source database directory structure & clone database directory structure differs, then only
you need to use db_file_name_convert & log_file_name_convert parameters.
TO_SHAMDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.241.131)(PORT=1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sham.server1-oel5.com)
)
)
$ export ORACLE_SID=sham
$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 15:52:44 2014
Copyright (c) 1982, 2007, Oracle.
420627;
1 to
"/u01/app/oracle/oradata/rose/system01.dbf";
set newname for datafile
2 to
"/u01/app/oracle/oradata/rose/undotbs01.dbf";
set newname for datafile
3 to
"/u01/app/oracle/oradata/rose/sysaux01.dbf";
set newname for datafile
4 to
"/u01/app/oracle/oradata/rose/users01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 07-NOV-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
16
3
MAXDATAFILES
100
MAXINSTANCES
MAXLOGHISTORY
292
LOGFILE
GROUP
1 ( '/u01/app/oracle/oradata/rose/redo01.log' ) SIZE 50 M
REUSE,
GROUP
2 ( '/u01/app/oracle/oradata/rose/redo02.log' ) SIZE 50 M
REUSE,
GROUP
3 ( '/u01/app/oracle/oradata/rose/redo03.log' ) SIZE 50 M
REUSE
DATAFILE
'/u01/app/oracle/oradata/rose/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=862965521 filename=/u01/app/oracle/oradata/rose/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=862965521 filename=/u01/app/oracle/oradata/rose/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=862965521 filename=/u01/app/oracle/oradata/rose/users01.dbf
contents of Memory Script:
{
set until scn
420627;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 07-NOV-14
using channel ORA_AUX_DISK_1
starting media recovery
archive log thread 1 sequence 9 is already on disk as file
/u01/app/oracle/flash_recovery_area/SHAM/archivelog/2014_11_06/o1_mf_1_9_b5qdt0fv_.arc
archive log
filename=/u01/app/oracle/flash_recovery_area/SHAM/archivelog/2014_11_06/o1_mf_1_9_b5qdt0fv_.arc
thread=1 sequence=9
media recovery complete, elapsed time: 00:00:02
Finished recover at 07-NOV-14
contents of Memory Script:
{
shutdown clone;
startup clone nomount ;
}
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area
.
..
...
373293056 bytes
[Trimmed]
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ROSE" RESETLOGS ARCHIVELOG
MAXLOGFILES
MAXLOGMEMBERS
16
3
MAXDATAFILES
100
MAXINSTANCES
MAXLOGHISTORY
292
LOGFILE
GROUP
1 ( '/u01/app/oracle/oradata/rose/redo01.log' ) SIZE 50 M
REUSE,
GROUP
2 ( '/u01/app/oracle/oradata/rose/redo02.log' ) SIZE 50 M
REUSE,
GROUP
3 ( '/u01/app/oracle/oradata/rose/redo03.log' ) SIZE 50 M
REUSE
DATAFILE
'/u01/app/oracle/oradata/rose/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
set newname for tempfile
1 to
"/u01/app/oracle/oradata/rose/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy
"/u01/app/oracle/oradata/rose/undotbs01.dbf";
"/u01/app/oracle/oradata/rose/sysaux01.dbf";
"/u01/app/oracle/oradata/rose/users01.dbf";
7520
0 Nov06 ?
00:00:00 ora_pmon_sham
oracle
12772
0 00:38 ?
00:00:00 ora_pmon_rose
oracle
13231
5723
0 00:58 pts/2
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS>select name, log mode, dbid, created from v$database;
NAME
LOG_MODE
DBID
CREATED
ARCHIVELOG
1411007070 07-NOV-14