migration to automatic storage management (asm) / … · web viewvirtualbox setup oel6 installation...

51
Prof Mike, Inc. Oracle 11g ASM Database Migration to ASM GROUP 4 Minh Vo, Susan Champigny, Ganapathi S. Santhana 11/17/2012 1 University Avenue Lowell, MA 01854 Phone: 978 934-4000

Upload: vuongngoc

Post on 08-Apr-2018

230 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc.

Oracle 11g ASMDatabase Migration to ASM

Group 4Minh Vo, Susan Champigny, Ganapathi S. Santhana

11/17/2012

1 University AvenueLowell, MA 01854

Phone: 978 934-4000

Page 2: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 1

Plan of Action VIRTUALBOX SETUP OEL6 INSTALLATION

o Virtual Disk Creationo Install from Mounted DVD

GRID INFRASTRUCTURE INSTALLATION o Create 4 more Virtual Disks o UDev / Configure asm-diskso Test ASM with ASMCMD

SET UP ORACLE 11.2.0.3 SOFTWARE o Install Oracle 11.2.0.3o Migrate Database Over to New Production Server

Page 3: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 2

oo

o

Page 4: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 3

SETTING UP VIRTUALBOX

Specify server name and type and version:

Set RAM to 4 Gigs, and follow screenshots for further settings:

Page 5: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 4

Page 6: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 5

Here’s a sample snapshot of our overall settings:

Under System > Motherboard, turn off Floppy.

Page 7: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 6

Ensure that the Snapshots folder is under same directory as disk/server config files.

Mount the OEL6 DVD.

Page 8: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 7

Enable Audio:

Click START to boot up the machine and have the Oracle Linux Server 6.3 install process run.

Page 9: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 8

Remount the DVD:

Page 10: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 9

Select “Continue”.

Page 11: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 10

Page 12: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 11

Continue with the default settings. When warned about pre-existing devices, click “Format” and “Write changes to disk”

Page 13: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 12

Page 14: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 13

Clicking Next will finally begin the server installation.

Installing…

Page 15: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 14

After rebooting, you’re faced with a few more tasks. Quickly clicking Forward…

Page 16: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 15

Create a user. Here we made “mvo”.

Page 17: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 16

The final steps of our OEL6 install…

Page 18: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 17

Bring up a terminal window and change the root password to “root”.

Also set the runlevel to 3 so that booting up brings you to a prompt rather than Xwindows.

chkconfig iptables / ip6tables /cups OFF, sshd ON and reboot (init 6).

Page 19: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 18

Disable the Firewall settings, which might interfere with our Install.

Page 20: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 19

Verify network/internet connectivity with ifconfig –a10.0.2.15

Page 21: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 20

Now we’ll update the OS packages. Type in: yum update <return key>. This will call up the YUM repository and find updates for the server’s OS packages. When prompted, answer ‘Y’ to download and install the updates.

Packages will install. It will take awhile to get all of the packages updated.

Answer 'y' to installing YUM repository keys:

Page 22: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 21

Once that completes, install extra packages. The following need to be installed using the commands given:

yum install elfutils-libelf-0*i686* elfutils-libelf-devel-0*i686*yum install libtool-ltdl*i686*yum install ncurses*i686*yum install readline*i686*yum install unixODBC*yum install ksh-2*yum install libaio-devel-0.*

Install Oracle pre-configuration for 11gR2 environment (creates oracle user, updates environment):yum install oracle-rdbms-server-11gR2-preinstall

Update PAM limits:vi /etc/pam.d/limitsat the end of the file, add:

session required pam_limits.so

Page 23: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 22

Setup user and group information needed for eventual grid infrastructure and database installation:# useradd oracle# passwd oracle enter ‘oracle’ for password# groupadd oinstall# groupadd dba# groupadd oper# groupadd asmadmin# groupadd asmdba# groupadd asmoper# useradd –g oinstall –G asmadmin,asmdba,asmoper,dba –c “Grid Infrastructure Owner” grid# usermod –G dba,oper,asmdba –c “Database Owner” oracle

Check the ID’s of both the oracle user and the grid user:# id grid# id oracleNote: User grid must be put on secondary group dba and user oracle must be put on secondary group asmdba

Oracle Inventory Group (typically oinstall) Database Administrator (OSDBA, typically dba) Database Operator (OSOPER, typically oper) The Oracle Automatic Storage Management Group (typically asmadmin) The ASM Database Administrator group (OSDBA for ASM, typically asmdba) Members of the ASM Operator Group (OSOPER for ASM, typically asmoper)

NOW LETS SCP THE ORACLE AND GRID SOFTWARE OVER

Create temporary staging directory for install files.

Page 24: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 23

Using SSH/SCP, copy the Oracle installation files you extracted from the old fc12ora112 server back into your new oel6_ora112 server -- into the /u01/stage folder. You will need to use bitvise tunneler or some comparable SSH/SCP utility to move the files into your new server.

Inflate /grid/zip files. Then remove the .zips to conserve space.

Page 25: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 24

Make directories for Oracle install. Change ownership to 775.

Edit oracle user’s .bash_profile to contain:# ---------------------------------------------------# .bash_profile# ---------------------------------------------------# OS User: oracle# Application: Oracle Database Software Owner# Oracle Grid Infrastructure for a# Standalone Server# Version: Oracle 11g Release 2# ---------------------------------------------------

# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi

# ---------------------------------------------------# ORACLE_SID# ---------------------------------------------------# Specifies the Oracle system identifier (SID) for# the Oracle instance running on this node. When# using RAC, each node must have a unique ORACLE_SID.# (i.e. racdb1, racdb2,...)# ---------------------------------------------------ORACLE_SID=ora11; export ORACLE_SID

# ---------------------------------------------------# ORACLE_UNQNAME and ORACLE_HOSTNAME# ---------------------------------------------------# In previous releases of Oracle Database, you were # required to set environment variables for# ORACLE_HOME and ORACLE_SID to start, stop, and# check the status of Enterprise Manager. With# Oracle Database 11g Release 2 (11.2) and later, you# need to set the environment variables ORACLE_HOME, # ORACLE_UNQNAME, and ORACLE_HOSTNAME to use# Enterprise Manager. Set ORACLE_UNQNAME equal to# the database unique name and ORACLE_HOSTNAME to

Page 26: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 25

# the hostname of the machine.# ---------------------------------------------------ORACLE_UNQNAME=ora11; export ORACLE_UNQNAMEORACLE_HOSTNAME=oel6ora112; export ORACLE_HOSTNAME

# ---------------------------------------------------# JAVA_HOME# ---------------------------------------------------# Specifies the Java SDK directory/Runtime Environment# ---------------------------------------------------JAVA_HOME=/usr/bin/java; export JAVA_HOME

# ---------------------------------------------------# ORACLE_BASE# ---------------------------------------------------# Specifies the base of the Oracle directory structure# for Optimal Flexible Architecture (OFA) compliant# database software installations.# ---------------------------------------------------ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

# ---------------------------------------------------# ORACLE_HOMES# ---------------------------------------------------# Specifies the directory containing the Oracle# Database software.# ---------------------------------------------------ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEDB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME

# ---------------------------------------------------# GRID_HOME# ---------------------------------------------------# Specifies the directory containing the# Oracle Grid Infrastructure for a Standalone Server.# ---------------------------------------------------GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME

# ---------------------------------------------------# ORACLE_PATH# ---------------------------------------------------# Specifies the search path for files used by Oracle# applications such as SQL*Plus. If the full path to# the file is not specified, or if the file is not# in the current directory, the Oracle application# uses ORACLE_PATH to locate the file.# This variable is used by SQL*Plus, Forms and Menu.# ---------------------------------------------------ORACLE_PATH=$ORACLE_HOME/rdbms/admin; export ORACLE_PATH

# ---------------------------------------------------# SQLPATH# ---------------------------------------------------# Specifies the directory or list of directories that# SQL*Plus searches for a login.sql file.# ---------------------------------------------------# SQLPATH=/u01/app/oracle/dba_scripts/sql; export SQLPATH

# ---------------------------------------------------# ORACLE_TERM# ---------------------------------------------------# Defines a terminal definition. If not set, it

Page 27: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 26

# defaults to the value of your TERM environment# variable. Used by all character mode products. # ---------------------------------------------------ORACLE_TERM=xterm; export ORACLE_TERM# ---------------------------------------------------# NLS_DATE_FORMAT# ---------------------------------------------------# Specifies the default date format to use with the# TO_CHAR and TO_DATE functions. The default value of# this parameter is determined by NLS_TERRITORY. The# value of this parameter can be any valid date# format mask, and the value must be surrounded by # double quotation marks. For example:## NLS_DATE_FORMAT = "MM/DD/YYYY"## ---------------------------------------------------NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

# ---------------------------------------------------# TNS_ADMIN# ---------------------------------------------------# Specifies the directory containing the Oracle Net# Services configuration files like listener.ora, # tnsnames.ora, and sqlnet.ora. When using Oracle# ASM, the TNS listener will be run out of# GRID_HOME; otherwise the listener will be run out# ORACLE_HOME.# ---------------------------------------------------# TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMINTNS_ADMIN=$GRID_HOME/network/admin; export TNS_ADMIN

# ---------------------------------------------------# ORA_NLS11# ---------------------------------------------------# Specifies the directory where the language,# territory, character set, and linguistic definition# files are stored.# ---------------------------------------------------ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

# ---------------------------------------------------# PATH# ---------------------------------------------------# Used by the shell to locate executable programs;# must include the $ORACLE_HOME/bin directory.# ---------------------------------------------------BASE_PATH=/usr/sbin:$PATH; export BASE_PATHPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

# ---------------------------------------------------# LD_LIBRARY_PATH# ---------------------------------------------------# Specifies the list of directories that the shared# library loader searches to locate shared object# libraries at runtime.# ---------------------------------------------------LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

# ---------------------------------------------------# CLASSPATH# ---------------------------------------------------

Page 28: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 27

# Specifies the directory or list of directories that# contain compiled Java classes.# ---------------------------------------------------CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

# ---------------------------------------------------# TEMP, TMP, and TMPDIR# ---------------------------------------------------# Specify the default directories for temporary# files; if set, tools that create temporary files# create them in one of these directories.# ---------------------------------------------------export TEMP=/tmpexport TMPDIR=/tmp

# ---------------------------------------------------# UMASK# ---------------------------------------------------# Set the default file mode creation mask# (umask) to 022 to ensure that the user performing# the Oracle software installation creates files# with 644 permissions.# ---------------------------------------------------umask 022

# ---------------------------------------------------# ALIAS FOR ENVIRONMENTS# ---------------------------------------------------# Set alias names for the grid environment and also# for database environment# ---------------------------------------------------alias grid_env=" . /home/oracle/grid_env"alias db_env=". /home/oracle/db_env"alias ls="ls -FA"

Create db_env and grid_env files in /home/oracle/ directory. Then, change ownership and permissions.

db_envcontents:ORACLE_SID=ora11; export ORACLE_SIDORACLE_HOME=$DB_HOME; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

grid_envcontents:ORACLE_SID=+ASM1; export ORACLE_SIDORACLE_HOME=$GRID_HOME; export ORACLE_HOMEPATH=$ORACLE_HOME/bin:$BASE_PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Page 29: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 28

Verify groups/users:

Add “divider=10” option to all kernel boot options in /etc/grub.conf (there are about 3 entries).

Install VirtualBox Guest Additions.http://download.virtualbox.org/virtualbox/4.1.22/VBoxGuestAdditions_4.1.22.iso

Mount the ISO and run the installer.

cd /mount /dev/cdrom /mediacd /mediaexport MAKE='/usr/bin/gmake –i'sh ./VBoxLinuxAdditions.run

Then, reboot the server with init 6. This activates all the changes and updates made to the server. Finally shutdown (init 0) to prepare for the creation of shared disks. (Needed for ASM installation).

Page 30: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 29

SHARED DISK INSTALLATION

Create 4 new 5 GB virtual disks using VBoxManage utility (in /Applications/VirtualBox.app/Contents/MacOS).

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage createhd --filename /Users/mvo/asmstorage/asm1.vdi --size 5120 --format VDI --variant Fixed

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage createhd --filename /Users/mvo/asmstorage/asm2.vdi --size 5120 --format VDI --variant Fixed

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage createhd --filename /Users/mvo/asmstorage/asm3.vdi --size 5120 --format VDI --variant Fixed

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage createhd --filename /Users/mvo/asmstorage/asm4.vdi --size 5120 --format VDI --variant Fixed

Connect these new ASM disks to the virtual server:

Page 31: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 30

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage storageattach oel6_ora112 --storagectl "SATA" --port 1 --device 0 --type hdd --medium /Users/mvo/asmstorage/asm1.vdi --mtype shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage storageattach oel6_ora112 --storagectl "SATA" --port 2 --device 0 --type hdd --medium /Users/mvo/asmstorage/asm2.vdi --mtype shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage storageattach oel6_ora112 --storagectl "SATA" --port 3 --device 0 --type hdd --medium /Users/mvo/asmstorage/asm3.vdi --mtype shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage storageattach oel6_ora112 --storagectl "SATA" --port 4 --device 0 --type hdd --medium /Users/mvo/asmstorage/asm4.vdi --mtype shareable

Make the ASM disks shareable:

Psychos-MacBook-Pro:MacOS mvo$ VBoxManage modifyhd /Users/mvo/asmstorage/asm1.vdi --type shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage modifyhd /Users/mvo/asmstorage/asm2.vdi --type shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage modifyhd /Users/mvo/asmstorage/asm3.vdi --type shareablePsychos-MacBook-Pro:MacOS mvo$ VBoxManage modifyhd /Users/mvo/asmstorage/asm4.vdi --type shareable

Checking Settings >> Storage in VirtualBox now shows the new disks.

Startup the server. The current disks can be checked by issuing the following commands:

# cd /dev# ls sd*sda sda1 sda2 sdb sdc sdd sde#

Use the “fdisk” command to partition the disks sdb to sde. Expected output shown below:

# fdisk /dev/sdb

Page 32: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 31

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x62be91cf. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-

compatible mode is deprecated. It's strongly recommended toswitch off the mode (command 'c') and change display units tosectors (command 'u').

Command (m for help): nCommand action

e extendedp primary partition (1-4)

enter: pPartition number (1-4): 1First cylinder (1-652, default 1): Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652): Press return key

Command (m for help): wThe partition table has been altered!

For each fdisk operation (sdb, sdc, sdd, sde), the sequence of answers is "n", "p", "1", "Return", "Return" and "w".

Check shared disks using the 'ls' command:

# cd /dev# ls sd*sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1#

Now, open a new SSH session to the oel6_ora112 server and determine the SCSI ID of the disks.

[root@oel6ora112 dev]# /sbin/scsi_id -g -u -d /dev/sdb1ATA_VBOX_HARDDISK_VB63e296c0-2e3fe0d0[root@oel6ora112 dev]# /sbin/scsi_id -g -u -d /dev/sdc1ATA_VBOX_HARDDISK_VB6b797a5c-83b3a4a6[root@oel6ora112 dev]# /sbin/scsi_id -g -u -d /dev/sdd1ATA_VBOX_HARDDISK_VB1bf2995b-2c2ed801[root@oel6ora112 dev]# /sbin/scsi_id -g -u -d /dev/sde1ATA_VBOX_HARDDISK_VB903dd09f-d46ea776

NOTE: if you cannot connect to the oel6_ora112 server, shut the server down and switch networking over to BRIDGED networking then restart server. Get your IP via ifconfig -a command and proceed with using SSH to connect into the server.

Using the scsi_id's from the commands above, create the "/etc/udev/rules.d/99-oracle-asmdevices.rules" file which needs to contain the following entries (using your own SCSI_ID's):

Page 33: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 32

Our /etc/udev/rules.d/99-oracle-asmdevices.rules:

KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB63e296c0-2e3fe0d0", NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6b797a5c-83b3a4a6", NAME="asm-disk2", OWNER="oracle", GROUP="dba",MODE="0660"KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB1bf2995b-2c2ed801", NAME="asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB903dd09f-d46ea776", NAME="asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"

Now load the updated block device partition tables:

[root@oel6ora112 dev]# /sbin/partprobe /dev/sdb1[root@oel6ora112 dev]# /sbin/partprobe /dev/sdc1[root@oel6ora112 dev]# /sbin/partprobe /dev/sdd1[root@oel6ora112 dev]# /sbin/partprobe /dev/sde1

Test that the rules work as expected:

[root@oel6ora112 dev]# /sbin/udevadm test /block/sdb/sdb1

Reload UDEV rules and start UDEV:[root@oel6ora112 dev]# /sbin/udevadm test /block/sdb/sdb1/sbin/udevadm control --reload-rules[root@oel6ora112 dev]# /sbin/start_udev

The disks should now be visible and have the correct ownership:

[root@oel6ora112 dev]# ls -al /dev/asm*

Note: if the disks do not have correct ownership, go back and repeat the steps again to ensure you have made the owner in the rules file 'oracle' and the group ';dba'. That was a critical step.

Now check hard and soft limits:[root@oel6ora112 dev]# more /etc/security/limits.conf[root@oel6ora112 dev]# vi /etc/security/limits.conf

Page 34: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 33

Check Kernel Parameters:

[root@oel6ora112 dev]# more /etc/sysctl.conf

Add (using vi) to match at minimum:

kernel.shmmax = 4294967295kernel.shmall = 2097152kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.file-max = 6815744

If changes are made to any of the above values, then once file is saved enter in this command:

# sysctl –p

Memory and Swap Space Check

The minimum required RAM for Oracle Database 11g Release 2 running on the Linux platform is 1 GB (although 2 GB or more of RAM is highly recommended). In addition to the Oracle Database, Oracle Grid Infrastructure for a

Page 35: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 34

Standalone Server requires a minimum of 1.5 GB of RAM. Oracle recommends 4 GB or more when planning to install both Oracle Grid Infrastructure for a Standalone Server and Oracle Database on the same machine which is the configuration described in this guide.

[root@oel6ora112 dev]# cat /proc/meminfo | grep MemTotalMemTotal: 4055440 kB

For swap file size:

[root@oel6ora112 dev]# grep SwapTotal /proc/meminfoSwapTotal: 4063228 kB

Your swap total should be approximately the size of what your physical memory is. If it is considerably smaller, then you will need to add additional swap space to the server.

Example of adding an additional 500MB of swap to your system:

cd /mkdir tempswapdd if=/dev/zero of=/tempswap/tempswap bs=1k count=500000chmod 600 tempswapmke2fs tempswapmkswap tempswapswapon tempswapfree

Your additional swap space should show up in the output from the free command.

Set the HOSTS file with server name entry: 192.168.0.112 oel6ora112. Then, ping.

Our server is now ready to proceed with installing!

INSTALL ORACLE GRID INFRASTRUCTURE FOR A STANDALONE SERVER

Page 36: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 35

Looks like a problem. Install the 32 bit version of libXmu which includes the libXext.so that Grid installer needs.

Page 37: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 36

We were logged in as root, so xhost +

[root@oel6ora112 ~]# xhost +access control disabled, clients can connect from any host[root@oel6ora112 ~]# su – oracle[root@oel6ora112 ~]# cd /u01/stage/grid/grid/

and run the ./runInstaller

Added oel6ora112.uml.edu to point to

Page 38: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 37

Here is where we found out that the 32-bit 11.2.0.3 software is incompatible with OEL6. We downloaded the 64-bit grid .zip file from oracle and extracted it into /u01/stage64/grid and ran ./runInstaller. Works like a charm now. Let’s continue with the install.

Select “External” for redundancy type and change Discovery Path to /dev/asm* to find our disks.

Page 39: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 38

Select all the disks that are found.

Enter “oracle” for all ASM passwords.

Page 40: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 39

A dialog box will complain about weak passwords. Click “Yes” to continue.

Use DBA for all groups:

Click YES regarding OSASM/OSDBA/OSOPER for ASM groups:

Page 41: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 40

Accept Oracle Base and software location, as shown here:

Answer YES to pop up question regarding Oracle Base:

Page 42: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 41

Click on NEXT for Oracle Inventory:

Click NEXT then INSTALL:

Progress…

Page 43: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 42

Execute the root shell scripts as indicated in the pop up box:

Run them as root:

When root.sh script completes, you will be notified of the successful creation of the OCR keys:

Page 44: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 43

And now continue with the install…

Grid infrastructure installation is now complete.

Page 45: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 44

Exit the installer.

More testing…

Page 46: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 45

lsdsk –p:

As ORACLE_SID=+ASM , go into sqlplus / as sysdba and check instance_name.

INSTALL ORACLE 11.2.0.3 SOFTWARE WITH ASM

Check $ORACLE_HOME, $ORACLE_SID, and oratab files before proceeding with Database software install.

Oratab:+ASM:/u01/app/11.2.0/grid:Nora11:/u01/app/oracle/product/11.2.0/db_1:N

Skip software updates:

Page 47: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 46

Continue on with “database software only” until finish…

MIGRATE THE DATA OVER TO NEW PRODUCTION SERVER

Set up a new database named “ora11” using DBCA.

Data Pump Export and Import from the old production server to the new.On old db: $ expdp system/oracle@ora11 full=Y directory=DATA_PUMP_DIR dumpfile=ora11.dmp logfile=ora11.log

On new db:

Page 48: Migration to Automatic Storage Management (ASM) / … · Web viewVirtualBox setup OEL6 Installation Virtual Disk Creation Install from Mounted DVD Grid Infrastructure Installation

Prof Mike, Inc. 47

$ impdp system/oracle@ora11 full=Y directory= DATA_PUMP_DIR dumpfile=ora11.dmp logfile=ora11.logMake sure you add or use a DIRECTORY that's defined in oracle. I used "DATA_PUMP_DIR".

Verify that datafiles are in fact sitting in ASM: Select name from v$datafile;