Oracle 11gR2 I/O Performance Tuning: Implementing I/O Performance Improvements - Page 2

April 5, 2011


/*
|| Oracle 11gR2: I/O Performance Tuning Series, Listing 7
||
|| Contains:
|| -- Batch commands and SQL statements to create beginning and ending
||    AWR snapshots at the start and end of each Benchmark Factory job run
||
|| that . . .
||
|| Author: Jim Czuprynski
||
*/

/*
|| Listing 7.1:
|| Backing up selected tablespaces as image copies to ASM storage
*/

#
[oracle@11gR2Base AP_LoadGenerator]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Feb 5 21:19:47 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TPCDB (DBID=195077799)

RMAN> RUN {
        BACKUP AS COPY FORMAT '+DATA' TABLESPACE ap_data;
        BACKUP AS COPY FORMAT '+DATA' TABLESPACE ap_idx;
        BACKUP AS COPY FORMAT '+DATA' TABLESPACE example;
}

2> 3> 4> 5> 
Starting backup at 2011-02-05 21:20:08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/u01/app/oracle/oradata/tpcdb/ap_data01.dbf
output file name=+DATA/tpcdb/datafile/ap_data.256.742339219 tag=TAG20110205T212010 RECID=2 STAMP=742339227
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
Finished backup at 2011-02-05 21:20:36

Starting backup at 2011-02-05 21:20:36
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=/u01/app/oracle/oradata/tpcdb/ap_idx01.dbf
output file name=+DATA/tpcdb/datafile/ap_idx.257.742339237 tag=TAG20110205T212036 RECID=3 STAMP=742339246
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 2011-02-05 21:20:51

Starting backup at 2011-02-05 21:20:51
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/tpcdb/example01.dbf
output file name=+DATA/tpcdb/datafile/example.258.742339253 tag=TAG20110205T212051 RECID=4 STAMP=742339259
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 2011-02-05 21:21:06

/*
|| Listing 7.2:
|| Switching the selected tablespaces to ASM storage
*/

RMAN>   SQL "ALTER TABLESPACE ap_data OFFLINE IMMEDIATE";
        SQL "ALTER TABLESPACE ap_idx OFFLINE IMMEDIATE";
        SQL "ALTER TABLESPACE example OFFLINE IMMEDIATE";

sql statement: ALTER TABLESPACE ap_data OFFLINE IMMEDIATE

RMAN> 
sql statement: ALTER TABLESPACE ap_idx OFFLINE IMMEDIATE

RMAN> 
sql statement: ALTER TABLESPACE example OFFLINE IMMEDIATE

RMAN>   SWITCH TABLESPACE ap_data TO COPY;
        RECOVER TABLESPACE ap_data;

        SWITCH TABLESPACE ap_idx TO COPY;
        RECOVER TABLESPACE ap_idx;

        SWITCH TABLESPACE example TO COPY;
        RECOVER TABLESPACE example;

datafile 6 switched to datafile copy "+DATA/tpcdb/datafile/ap_data.256.742339219"

RMAN> 
Starting recover at 2011-02-05 21:21:38
using channel ORA_DISK_1

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

Finished recover at 2011-02-05 21:21:39

RMAN> 
RMAN> 
datafile 7 switched to datafile copy "+DATA/tpcdb/datafile/ap_idx.257.742339237"

RMAN> 
Starting recover at 2011-02-05 21:21:39
using channel ORA_DISK_1

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

Finished recover at 2011-02-05 21:21:39

RMAN> 
RMAN> 
datafile 5 switched to datafile copy "+DATA/tpcdb/datafile/example.258.742339253"

RMAN> 
Starting recover at 2011-02-05 21:21:40
using channel ORA_DISK_1

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

Finished recover at 2011-02-05 21:21:40

RMAN>   SQL "ALTER TABLESPACE ap_data ONLINE";
        SQL "ALTER TABLESPACE ap_idx ONLINE";
        SQL "ALTER TABLESPACE example ONLINE";


sql statement: ALTER TABLESPACE ap_data ONLINE

RMAN> 
sql statement: ALTER TABLESPACE ap_idx ONLINE

RMAN> 
sql statement: ALTER TABLESPACE example ONLINE







The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers