Beruflich Dokumente
Kultur Dokumente
| ORACLE 10g
: sham
= /u01/app/oracle/oradata/sham/
(OEL5.SERVER1.COM) SERVER1
PRODUCTION
(OEL5.SERVER2.COM) SERVER2
DEVELOPMENT
SOURCE SERVER
| ORACLE 10g
SERVER 2 :
DBID
--------- ---------SHAM
926116387
TYPE
VALUE
string
server1-oel5.com
TYPE
VALUE
--------- -----------------------------------------------------string
/u01/app/oracle/product/10.2.0/db_1/dbs/spfilesham.ora
| ORACLE 10g
(CONNECT_DATA =
(SERVER=DEDICATED)
(SERVICE_NAME=sham)
)
)
SHAMDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST=192.168.241.131)(PORT=1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sham.server1-oel5.com)
)
)
| ORACLE 10g
| ORACLE 10g
sham.__db_cache_size=260046848
sham.__java_pool_size=4194304
sham.__large_pool_size=4194304
sham.__shared_pool_size=100663296
sham.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/sham/adump'
*.background_dump_dest='/u01/app/oracle/admin/sham/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/u01/app/oracle/oradata/sham/control01.ctl',
'/u01/app/oracle/oradata/sham/control02.ctl','
/u01/app/oracle/oradata/sham/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/sham/cdump'
*.db_block_size=8192
*.db_domain='server1-oel5.com'
*.db_file_multiblock_read_count=16
*.db_name='sham'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4194304000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=shamXDB)'
*.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/sham/udump'
| ORACLE 10g
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AUXILIARY DATABASE PFILE
sham.__db_cache_size=260046848
sham.__java_pool_size=4194304
sham.__large_pool_size=4194304
sham.__shared_pool_size=100663296
sham.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/sham/adump'
*.background_dump_dest='/u01/app/oracle/admin/sham/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/u01/app/oracle/oradata/sham/control01.ctl',
/u01/app/oracle/oradata/sham/control02.ctl',
'/u01/app/oracle/oradata/sham/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/sham/cdump'
*.db_block_size=8192
*.db_domain='server2-oel5.com'
*.db_file_multiblock_read_count=16
*.db_name='sham'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4194304000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=shamXDB)'
*.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/sham/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/sham)
# log_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u01/app/oracle/oradata/sham')
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.
| ORACLE 10g
| ORACLE 10g
list bkp.txt
Now i copied all my backup(which was taken by rman) from target server to auxiliary server.
| ORACLE 10g
480540;
1 to
"/u01/app/oracle/oradata/sham/system01.dbf";
set newname for datafile
2 to
"/u01/app/oracle/oradata/sham/undotbs01.dbf";
set newname for datafile
3 to
"/u01/app/oracle/oradata/sham/sysaux01.dbf";
set newname for datafile
4 to
"/u01/app/oracle/oradata/sham/users01.dbf";
set newname for datafile
5 to
"/u01/app/oracle/oradata/sham/sample01.dbf";
restore
check readonly
clone database
;
| ORACLE 10g
16
MAXLOGMEMBERS
MAXDATAFILES
100
MAXINSTANCES
MAXLOGHISTORY
292
LOGFILE
GROUP
SIZE 50 M ,
GROUP
SIZE 50 M ,
GROUP
SIZE 50 M
DATAFILE
'/u01/app/oracle/oradata/sham/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
| ORACLE 10g
480540;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 11-NOV-14
using channel ORA_AUX_DISK_1
starting media recovery
archive log thread 1 sequence 16 is already on disk as file
/u01/app/oracle/flash_recovery_area/SHAM/archivelog/2014_11_11/o1_mf_1_16_b63kv40v_.arc
archive log
filename=/u01/app/oracle/flash_recovery_area/SHAM/archivelog/2014_11_11/o1_mf_1_16_b63kv40v_.arc
thread=1 sequence=16
media recovery complete, elapsed time: 00:00:03
Finished recover at 11-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
Fixed Size
373293056 bytes
1273780 bytes
Variable Size
113246284 bytes
Database Buffers
255852544 bytes
Redo Buffers
2920448 bytes
| ORACLE 10g
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "SHAM" RESETLOGS ARCHIVELOG
MAXLOGFILES
16
MAXLOGMEMBERS
MAXDATAFILES
100
MAXINSTANCES
MAXLOGHISTORY
292
LOGFILE
GROUP
SIZE 50 M ,
GROUP
SIZE 50 M ,
GROUP
SIZE 50 M
DATAFILE
'/u01/app/oracle/oradata/sham/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
set newname for tempfile
1 to
"/u01/app/oracle/oradata/sham/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy
"/u01/app/oracle/oradata/sham/undotbs01.dbf";
"/u01/app/oracle/oradata/sham/sysaux01.dbf";
"/u01/app/oracle/oradata/sham/users01.dbf";
"/u01/app/oracle/oradata/sham/sample01.dbf";
| ORACLE 10g
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, dbid, open_mode from v$database;
NAME
DBID
OPEN_MODE
--------- ----------
----------
SHAM
READ WRITE
926530381