//
you're reading...
Oracle Database Appliance

Oracle Database Appliance (X5-2) Study (Virtualized Platform deployment) section 6

**This article is only for the purpose of demonstrating of my study of the Oracle Database appliance, not for any other purposes.**

Create a guest vm in Oracle ODA

Download the Oracle Linux vm template from Oracle Website, transfer the vm template to the Dom0

Import a vm template (From ODA_BASE)

[root@testodanode01 ~]# oakcli import vmtemplate ol5u11 -files /OVS/OVM_OL5U11_x86_64_PVM.ova -repo odarepo1
[root@testodanode01 ~]# oakcli show vmtemplate

        NAME            MEMORY          VCPU            REPOSITORY

        ol5u11          2048M              2            testrepo1

Create a shared repository for the guest vm

[root@testodanode01 ~]# oakcli create repo testrepo01 -size 50G -dg DATA

Create a guest vm by clone the vm template

[root@testodanode01 ~]# oakcli clone vm testvm01 -vmtemplate ol5u11 -repo testrepo01 -node 0

Modify the guest vm

[root@testodanode01 ~]# oakcli configure vm testvm01 -vcpu 2 -memory 4G -prefnode 0 -failover true

Add additional network to the guest vm

[root@testodanode01 ~]# oakcli show vlan
 
        NAME                     ID    INTERFACE   NODENUM
 
        net1                     1     bond0       0
        net1                     1     bond0       1
        net2                     1     bond1       0
        net2                     1     bond1       1
        priv1                    1     icbond0     0
        priv1                    1     icbond0     1
        vlan27                   27     bond0       0
        vlan27                   27     bond0       1
        vlan17                   17     bond0       0
        vlan17                   17     bond0       1

There are 2 vlans in the ODA vlan17(public network) and vlan27(for backup). Add vlan17 to the vm.

[root@testodanode01 ~]# oakcli configure vm  -network "['type=netfront,bridge=net1,bridge=vlan17']"
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.device.0:eth0'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.onboot.0:yes'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.bootproto.0:static'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.ipaddr.0:10.208.17.31'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.netmask.0:255.255.255.0'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.gateway.0:10.208.17.252'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.network.hostname:testvm01'
[root@testodanode01 ~]# oakcli modify vm testvm01 -s 'com.oracle.linux.root-password:1234567'

Start the vm

[root@testodanode01 ~]# oakcli start vm testvm01

Test the server by connect through ssh

[root@testodanode01 ~]# ssh 10.208.17.31
root@10.208.17.31's password:
[root@testvm01 ~]#

Once the ODA configuration is completed, we can start copy the database from the old environment.

Restore the SPFILE

RMAN> startup nomount force;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_2/dbs/initsqlfun.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area 158662656 bytes

Fixed Size 2226456 bytes
Variable Size 104859368 bytes
Database Buffers 46137344 bytes
Redo Buffers 5439488 bytes

RMAN> restore spfile from '/home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp';

Starting restore at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=162 device type=DISK

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 04-JUL-13

Create the PFILE from SPFILE and make parameter changes as required

$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 09:43:48 2013

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

Enter password:
Connected to an idle instance.

SQL> create pfile from spfile;

File created.

Note- make required changes here in the init.ora file to take care of new directories for control files, audit dump, fast recovery area etc

SQL> create spfile from pfile;

File created.

Startup the database from RMAN with nomount status
RMAN> startup nomount

Restore the Control Files
RMAN> restore controlfile from 'Your control file backup location';

Starting restore at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/sqlfun/control01.ctl
output file name=/home/oracle/sqlfun/control02.ctl
Finished restore at 04-JUL-13

Mount the database and catalog the backup pieces which have been restored in the new location
RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting implicit crosscheck backup at 04-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
Crosschecked 25 objects
Finished implicit crosscheck backup at 04-JUL-13

Starting implicit crosscheck copy at 04-JUL-13
using channel ORA_DISK_1
Crosschecked 10 objects
Finished implicit crosscheck copy at 04-JUL-13

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/autobackup/2013_07_04/o1_mf_n_819884144_8x9ncjfl_.bkp
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_33_8x84ld7x_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_35_8x8db3hp_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_36_8x8dbgcm_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_34_8x8d9y2h_.arc
File Name: /u01/app/oracle/flash_recovery_area/SQLFUN/archivelog/2013_07_04/2013_07_03/o1_mf_1_32_8x6mflv0_.arc

searching for all files that match the pattern /home/oracle/stage

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/stage/o1_mf_sysaux_7zpgb1hd_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp
File Name: /home/oracle/stage/o1_mf_undotbs1_7zpgck9f_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp
File Name: /home/oracle/stage/o1_mf_example_7zgkdp6p_.dbf
File Name: /home/oracle/stage/o1_mf_threaten_7zpgbyck_.dbf
File Name: /home/oracle/stage/o1_mf_users_7zpgcnno_.dbf
File Name: /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
File Name: /home/oracle/stage/o1_mf_index_da_7zgkcz04_.dbf
File Name: /home/oracle/stage/o1_mf_example__7zpgcg0x_.dbf
File Name: /home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/stage/o1_mf_sysaux_7zpgb1hd_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w6zcb_.bkp
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w76jv_.bkp
File Name: /home/oracle/stage/o1_mf_undotbs1_7zpgck9f_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w65l9_.bkp
File Name: /home/oracle/stage/o1_mf_example_7zgkdp6p_.dbf
File Name: /home/oracle/stage/o1_mf_threaten_7zpgbyck_.dbf
File Name: /home/oracle/stage/o1_mf_users_7zpgcnno_.dbf
File Name: /home/oracle/stage/o1_mf_s_819826669_8x7w7g70_.bkp
File Name: /home/oracle/stage/o1_mf_index_da_7zgkcz04_.dbf
File Name: /home/oracle/stage/o1_mf_example__7zpgcg0x_.dbf
File Name: /home/oracle/stage/o1_mf_system_7zpgbh79_.dbf
File Name: /home/oracle/stage/o1_mf_nnnd1_ORA_OEM_LEVEL_0_8x7w7b0f_.bkp

RMAN> recover database;

RMAN> alter database open resetlogs;

Database altered.
Advertisements

About daviewning

I am an Oracle DBA

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: