rman cloning directory structure is different - server to server (10g).pdf

Upload: grthiyagu-oracle-dba

Post on 02-Jun-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    1/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    DUPLICATE ORACLE DATABASE ( DIFFERENT DIRECTURE STRUCTURE )

    The process of duplicating the entire database is called CLONING. I am using same SIDfor source

    and clone database as sham for duplication the oracle database from one server to another server.

    Source database name : sham

    Auxiliary database name : rose

    Source database path = /u01/app/oracle/oradata/sham/

    Auxiliary database path = /u02/app/oracle/oradata/rose/

    SOURCE SERVER 192.168.241.131 (OEL5.SERVER1.COM) SERVER1 PRODUCTION

    AUXILIARY SERVER 192.168.241.132 (OEL5.SERVER2.COM) SERVER2 DEVELOPMENT

    CHECK NETWORK AVAILABILITY BETWEEN TWO SERVERS

    SERVER 1 :

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    2/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    SERVER 2 :

    CREATE DIRECTORY STRUCTURE FOR AUXILIARY DATABASE

    $ mkdir -p /u02/app/oracle/oradata/rose/

    $mkdir -p /u02/app/oracle/admin/rose/adump/

    $ mkdir -p /u02/app/oracle/admin/rose/bdump/

    $mkdir -p /u02/app/oracle/admin/rose/cdump/

    $mkdir -p /u02/app/oracle/admin/rose/udump/

    CONNECTING SOURCE DATABASE

    SYS>select name, dbid from v$database;

    NAME DBID

    --------- ----------

    SHAM 926462179

    SYS>show parameter db_domain;

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------db_domain string server1-oel5.com

    SYS>show parameter service_names;

    NAME TYPE VALUE

    ------------------------------------ ----------- ----------------------

    service_names string sham.server1-oel5.com

    PARAMETER FILE BACKUP FOR AUXILIARY DATABASE

    SYS>show parameter pfile;

    NAME TYPE VALUE

    ------- --------- ------------------------------------------------------

    spfile string /u01/app/oracle/product/10.2.0/db_1/dbs/spfilesham.ora

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    3/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    SENDING PFILE TO AUXILIARY SERVER

    TNSNAMES.ORA ON TARGET SERVER 192.168.241.131

    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

    TO_ROSEDB =

    (DESCRIPTION=

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL=TCP)(HOST=192.168.241.132)(PORT=1521))

    ) FOR AUXILIARY SERVER

    (CONNECT_DATA =

    (SERVER=DEDICATED)

    (SERVICE_NAME=rose)

    )

    )

    SHAMDB=

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST=192.168.241.131)(PORT=1521))

    (CONNECT_DATA = FOR TARGET SERVER

    (SERVER = DEDICATED)

    (SERVICE_NAME = sham.server1-oel5.com)

    )

    )

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    4/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    LISTENER.ORA ON AUXILIARY SERVER 192.168.241.132

    # listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME=rose)

    (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)

    (GLOBAL_DBNAME=rose)

    )

    )

    LISTENER =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL=TCP)(HOST=192.168.241.132)(PORT=1521))

    )

    )

    CHECKING TNS CONNECTIVITY ON TARGET SEVER

    [oracle@oel5 admin]$ tnsping shamdb

    TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 13-NOV-2014 14:49:48

    Copyright (c) 1997, 2010, Oracle. All rights reserved.

    Used parameter files:

    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

    (HOST = 192.168.241.131)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED)

    (SERVICE_NAME = sham.server1-oel5.com)))OK (10 msec)

    [oracle@oel5 admin] $ tnsping to_rosedb

    TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 13-NOV-2014 14:49:40

    Copyright (c) 1997, 2010, Oracle. All rights reserved.

    Used parameter files:

    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

    (HOST = 192.168.241.132)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED)

    (SERVICE_NAME = rose.server2-oel5.com))) OK (20 msec)

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    5/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    CONFIGURE PASSWORD FILE ON TARGET &AUXILIARY SERVER

    ON TARGET SERVER 191.168.241.131

    $cd $ORACLE_HOME/dbs

    $export ORACLE_SID=sham

    [oracle@oel5 dbs]$ orapwd file=orapwsham password=dba entries=3 force=y

    ON AUXILIARY SERVER2 191.168.241.132

    $cd $ORACLE_HOME/dbs

    $ export ORACLE_SID=rose

    [oracle@oel5 dbs]$ orapwd file=orapwrose password=dba entries=3 force=y

    ** Note : Database Password must be same on Target and Auxiliary server. **

    TARGET 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='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

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    6/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    *.remote_login_passwordfile='EXCLUSIVE'

    *.sga_target=372244480

    *.undo_management='AUTO'

    *.undo_tablespace='UNDOTBS1'

    *.user_dump_dest='/u01/app/oracle/admin/sham/udump'

    AUXILIARY DATABASE PFILE

    *.audit_file_dest='/u02/app/oracle/admin/rose/adump'

    *.background_dump_dest='/u02/app/oracle/admin/rose/bdump'

    *.compatible='10.2.0.5.0'

    *.control_files='/u02/app/oracle/oradata/rose/control01.ctl',

    /u02/app/oracle/oradata/rose/control02.ctl',

    '/u02/app/oracle/oradata/rose/control03.ctl'

    *.core_dump_dest='/u02/app/oracle/admin/rose/cdump'

    *.db_block_size=8192

    *.db_domain='server2-oel5.com'

    *.db_file_multiblock_read_count=16

    *.db_name='rose'

    *.db_recovery_file_dest='/u02/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='/u02/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/', '/u02/app/oracle/oradata/rose/)

    log_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u02/app/oracle/oradata/rose/')

    If the source database directory structure &clone database directory structure differs, then only

    you need to use db_file_name_convert&log_file_name_convertparameters. In my case, i am using

    different mount point, so need to add above two parameters in pfile for auxiliary database.

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    7/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    STARTUP AUXILIARY DATABASE AT NOMOUNT STAGE & EXIT

    $ export ORACLE_SID=rose

    $ sqlplus "/as sysdba"

    SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 13 22:05:27 2014

    Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

    Connected to an idle instance.

    SYS>startup nomount;

    ORACLE instance started.

    .

    ..

    [Trimmed]

    SYS>exit

    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production

    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    POINTS TO NOTE :

    Once I started my auxiliary instance in NOMOUNT state, i have disconnected SYS as NO SESSION

    before duplicating a database. It is must and should.

    $ export ORACLE_SID=sham

    $ rman target /

    Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 13 22:20:17 2014

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    connected to target database: SHAM (DBID=926462179)

    RMAN>backup database plus archivelog;

    Starting backup at 13-NOV-14

    current log archived

    using channel ORA_DISK_1

    channel ORA_DISK_1: starting archive log backupset

    channel ORA_DISK_1: specifying archive log(s) in backup set

    ...

    ...

    [Trimmed]

    input archive log thread=1 sequence=30 recid=30 stamp=863563379

    input archive log thread=1 sequence=31 recid=31 stamp=863563423

    input archive log thread=1 sequence=32 recid=32 stamp=863563463

    channel ORA_DISK_1: starting piece 1 at 13-NOV-14

    channel ORA_DISK_1: finished piece 1 at 13-NOV-14

    piece

    handle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_13/o1_mf_annnn_TAG20141113T224

    423_b69sqk08_.bkp tag=TAG20141113T224423 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:05

    Finished backup at 13-NOV-14

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    8/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    Starting backup at 13-NOV-14

    using channel ORA_DISK_1

    channel ORA_DISK_1: starting full datafile backupset

    channel ORA_DISK_1: specifying datafile(s) in backupset

    input datafile fno=00001 name=/u01/app/oracle/oradata/sham/system01.dbf

    input datafile fno=00003 name=/u01/app/oracle/oradata/sham/sysaux01.dbf

    input datafile fno=00002 name=/u01/app/oracle/oradata/sham/undotbs01.dbf

    input datafile fno=00005 name=/u01/app/oracle/oradata/sham/sample01.dbf

    input datafile fno=00004 name=/u01/app/oracle/oradata/sham/users01.dbf

    channel ORA_DISK_1: starting piece 1 at 13-NOV-14

    channel ORA_DISK_1: finished piece 1 at 13-NOV-14

    piece

    handle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_13/o1_mf_nnndf_TAG20141113T224

    428_b69sqnnl_.bkp tag=TAG20141113T224428 comment=NONE

    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35channel ORA_DISK_1: starting full datafile backupset

    channel ORA_DISK_1: specifying datafile(s) in backupset

    including current control file in backupset

    including current SPFILE in backupset

    channel ORA_DISK_1: starting piece 1 at 13-NOV-14

    channel ORA_DISK_1: finished piece 1 at 13-NOV-14

    piece

    handle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_13/o1_mf_ncsnf_TAG20141113T224

    428_b69srspm_.bkp tag=TAG20141113T224428 comment=NONE

    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

    Finished backup at 13-NOV-14

    Starting backup at 13-NOV-14

    current log archived

    using channel ORA_DISK_1

    channel ORA_DISK_1: starting archive log backupset

    channel ORA_DISK_1: specifying archive log(s) in backup set

    input archive log thread=1 sequence=33 recid=33 stamp=863563507

    channel ORA_DISK_1: starting piece 1 at 13-NOV-14

    channel ORA_DISK_1: finished piece 1 at 13-NOV-14

    piece

    handle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_13/o1_mf_annnn_TAG20141113T224

    507_b69srwk9_.bkp tag=TAG20141113T224507 comment=NONE

    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

    Finished backup at 13-NOV-14

    BACKUP DETAILS USING LIST BACKUP COMMAND

    list bkp.txt

    Now i copied all my backup(which was taken by rman) from target server to auxiliary server.

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    9/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    SENDING ALL BACKUPSETS TO AUXILIARY SERVER

    ON AUXILIARY SERVER (RECEIVED ALL BACKUPS)

    START THE CLONING PROCESS IN TARGET SERVER

    Start RMAN, make SHAM as target and ROSE as auxiliary.

    $ export ORACLE_SID=sham

    $ rman target / auxiliary sys/dba@to_rosedb

    Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 13 23:40:32 2014

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    connected to target database: SHAM (DBID=926462179)

    connected to auxiliary database: ROSE (not mounted)

    ISSUE DUPLICATE TARGET DATABASE COMAMND

    RMAN> duplicate target database to 'rose;

    Starting Duplicate Db at 14-NOV-14

    using target database control file instead of recovery catalog

    allocated channel: ORA_AUX_DISK_1

    channel ORA_AUX_DISK_1: sid=156 devtype=DISK

    contents of Memory Script:

    {

    set until scn 565451;

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    10/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    set newname for datafile 1 to

    "/u02/app/oracle/oradata/rose/system01.dbf";

    set newname for datafile 2 to

    "/u02/app/oracle/oradata/rose/undotbs01.dbf";

    set newname for datafile 3 to"/u02/app/oracle/oradata/rose/sysaux01.dbf";

    set newname for datafile 4 to

    "/u02/app/oracle/oradata/rose/users01.dbf";

    set newname for datafile 5 to

    "/u02/app/oracle/oradata/rose/sample01.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

    executing command: SET NEWNAME

    Starting restore at 14-NOV-14

    using channel ORA_AUX_DISK_1

    channel ORA_AUX_DISK_1: starting datafile backupset restore

    channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

    restoring datafile 00001 to /u02/app/oracle/oradata/rose/system01.dbf

    restoring datafile 00002 to /u02/app/oracle/oradata/rose/undotbs01.dbf

    restoring datafile 00003 to /u02/app/oracle/oradata/rose/sysaux01.dbf

    restoring datafile 00004 to /u02/app/oracle/oradata/rose/users01.dbf

    restoring datafile 00005 to /u02/app/oracle/oradata/rose/sample01.dbf

    channel ORA_AUX_DISK_1: reading from backup piece

    /u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_14/o1_mf_nnndf_TAG20141114T030028_b6b

    8qnrf_.bkp

    channel ORA_AUX_DISK_1: restored backup piece 1

    piece

    handle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_14/o1_mf_nnndf_TAG20141114T030

    028_b6b8qnrf_.bkp tag=TAG20141114T030028channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45

    Finished restore at 14-NOV-14

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    11/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ROSE" RESETLOGS ARCHIVELOG

    MAXLOGFILES 16

    MAXLOGMEMBERS 3

    MAXDATAFILES 100

    MAXINSTANCES 8MAXLOGHISTORY 292

    LOGFILE

    GROUP 1 ( '/u02/app/oracle/oradata/rose/redo01.log' ) SIZE 50 M REUSE,

    GROUP 2 ( '/u02/app/oracle/oradata/rose/redo02.log' ) SIZE 50 M REUSE,

    GROUP 3 ( '/u02/app/oracle/oradata/rose/redo03.log' ) SIZE 50 M REUSE

    DATAFILE

    '/u02/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=863583686 filename=/u02/app/oracle/oradata/rose/undotbs01.dbf

    datafile 3 switched to datafile copy

    input datafile copy recid=2 stamp=863583686 filename=/u02/app/oracle/oradata/rose/sysaux01.dbf

    datafile 4 switched to datafile copy

    input datafile copy recid=3 stamp=863583686 filename=/u02/app/oracle/oradata/rose/users01.dbf

    datafile 5 switched to datafile copy

    input datafile copy recid=4 stamp=863583686 filename=/u02/app/oracle/oradata/rose/sample01.dbf

    contents of Memory Script:

    {

    set until scn 565451;

    recover

    clone database

    delete archivelog

    ;

    }

    executing Memory Script

    executing command: SET until clause

    Starting recover at 14-NOV-14

    using channel ORA_AUX_DISK_1

    starting media recovery

    channel ORA_AUX_DISK_1: starting archive log restore to default destination

    channel ORA_AUX_DISK_1: restoring archive log

    archive log thread=1 sequence=38

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    12/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    channel ORA_AUX_DISK_1: reading from backup piece

    /u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_14/o1_mf_annnn_TAG20141114T030121_b6b

    8sb7w_.bkp

    channel ORA_AUX_DISK_1: restored backup piece 1

    piecehandle=/u01/app/oracle/flash_recovery_area/SHAM/backupset/2014_11_14/o1_mf_annnn_TAG20141114T030

    121_b6b8sb7w_.bkp tag=TAG20141114T030121

    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02

    archive log

    filename=/u02/app/oracle/flash_recovery_area/ROSE/archivelog/2014_11_14/o1_mf_1_38_b6bfhk14_.arc

    thread=1 sequence=38

    channel clone_default: deleting archive log(s)

    archive log

    filename=/u02/app/oracle/flash_recovery_area/ROSE/archivelog/2014_11_14/o1_mf_1_38_b6bfhk14_.arc

    recid=1 stamp=863583689

    media recovery complete, elapsed time: 00:00:01

    Finished recover at 14-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

    Fixed Size 1273780 bytes

    Variable Size 92274764 bytes

    Database Buffers 276824064 bytes

    Redo Buffers 2920448 bytes

    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ROSE" RESETLOGS ARCHIVELOG

    MAXLOGFILES 16

    MAXLOGMEMBERS 3

    MAXDATAFILES 100

    MAXINSTANCES 8

    MAXLOGHISTORY 292

    LOGFILE

    GROUP 1 ( '/u02/app/oracle/oradata/rose/redo01.log' ) SIZE 50 M REUSE,

    GROUP 2 ( '/u02/app/oracle/oradata/rose/redo02.log' ) SIZE 50 M REUSE,

    GROUP 3 ( '/u02/app/oracle/oradata/rose/redo03.log' ) SIZE 50 M REUSE

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    13/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    DATAFILE

    '/u02/app/oracle/oradata/rose/system01.dbf'

    CHARACTER SET WE8ISO8859P1

    contents of Memory Script:

    {

    set newname for tempfile 1 to

    "/u02/app/oracle/oradata/rose/temp01.dbf";

    switch clone tempfile all;

    catalog clone datafilecopy "/u02/app/oracle/oradata/rose/undotbs01.dbf";

    catalog clone datafilecopy "/u02/app/oracle/oradata/rose/sysaux01.dbf";

    catalog clone datafilecopy "/u02/app/oracle/oradata/rose/users01.dbf";

    catalog clone datafilecopy "/u02/app/oracle/oradata/rose/sample01.dbf";

    switch clone datafile all;

    }

    executing Memory Script

    executing command: SET NEWNAME

    renamed temporary file 1 to /u02/app/oracle/oradata/rose/temp01.dbf in control file

    cataloged datafile copy

    datafile copy filename=/u02/app/oracle/oradata/rose/undotbs01.dbf recid=1 stamp=863583701

    cataloged datafile copy

    datafile copy filename=/u02/app/oracle/oradata/rose/sysaux01.dbf recid=2 stamp=863583701

    cataloged datafile copy

    datafile copy filename=/u02/app/oracle/oradata/rose/users01.dbf recid=3 stamp=863583701

    cataloged datafile copy

    datafile copy filename=/u02/app/oracle/oradata/rose/sample01.dbf recid=4 stamp=863583702

    datafile 2 switched to datafile copy

    input datafile copy recid=1 stamp=863583701 filename=/u02/app/oracle/oradata/rose/undotbs01.dbf

    datafile 3 switched to datafile copy

    input datafile copy recid=2 stamp=863583701 filename=/u02/app/oracle/oradata/rose/sysaux01.dbf

    datafile 4 switched to datafile copy

    input datafile copy recid=3 stamp=863583701 filename=/u02/app/oracle/oradata/rose/users01.dbf

    datafile 5 switched to datafile copy

    input datafile copy recid=4 stamp=863583702 filename=/u02/app/oracle/oradata/rose/sample01.dbf

    contents of Memory Script:

    {

    Alter clone database open resetlogs;

    }

    executing Memory Script

    database opened

    Finished Duplicate Db at 14-NOV-14

  • 8/9/2019 RMAN CLONING DIRECTORY STRUCTURE IS DIFFERENT - SERVER TO SERVER (10g).pdf

    14/14

    DUPLICATING ORACLE DATABASE USING RMAN |ORACLE 10g

    Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

    CONNECTING AUXILIARY DATABASE

    $ export ORACLE_SID=rose

    $sqlplus "/as sysdba"

    SQL*Plus: Release 10.2.0.5.0 - Production on Fri Nov 14 17:50:27 2014

    Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

    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

    --------- ---------- ----------

    ROSE 1411625233 READ WRITE