jcchoy/Documents/oracle_linux_5.6_installation_notes.txt in my VirtualBox Virtual Machine called Ora11gR2.2
or //jcchoy.blogspot.com
Last updated : 2011-06-12
2011-05-15 Sunday Oracle 11gR2 preparation for Linux 6 failed.
9:00 PM
[root@olinux6 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@olinux6 ~]#
Initialize the asmlib with the oracleasm init command. This command will load the oracleasm module and also mounts the oracleasm filesystem.
[root@olinux6 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": failed
Unable to load module "oracleasm"
[root@olinux6 ~]# yum list installed oracleasm*
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with ULN.
ULN support will be disabled.
Installed Packages
oracleasm-support.i686 2.1.5-1.el6 @/oracleasm-support-2.1.5-1.el6.i686
[root@olinux6 ~]#
It seems like I am missing the oracleasm module rpm somehow.
Tried to installed the oracleasm rpm from dvd host drive E:
Clicked devices\cd\dvd\Host drive 'E'
Clicked Places\OL6.0 i386 Disc 1 20110203
oracleasm rpm is not there, just oracle-support.
Tried to download from otn. Get the system kernel information first.
[root@olinux6 init.d]# uname -r (Kernel release)
2.6.32-71.el6.i686
[root@olinux6 init.d]# uname -p (processor)
i686
[root@olinux6 init.d]# uname -i (hardware platform
i386
[root@olinux6 init.d]# uname -s (system name)
Linux
Oracleasm driver for Oracle linux 6 doesn't seem to be available free to download on OTN for some reason ?
It could be because it presume you registered with ULN network (Unbreakable Linux Network) which allows you
to automatically download and install it with a paid account.
Since Francisco showed oracleasm driver is available for Oracle Linux 5.6, can start over installing Linux 5.6
in place of Linux 6 with VirtualBox 4.0.4 instead of VirtualBox 4.0.2.
12:00 am
- Download Oracle Linux 5.6 dvd iso zip file in unix
- unzip it to dvd iso format in to a unix folder - doesn't work got write error
- has to put to a windows xp share folder to use 7 zip to unzip.
- check there is oracleasm driver before installing Linux 5.6
- mount the dvd iso format on a VM dvd drive
- follow Francisco's part 2 Linux 5.6 installation on a new VM.
2011-05-16 Monday: Create a new VM, install Oracle Enterprise Linux 5.6 (OEL 5.6) which has oracleasm driver
follow Francisco's part 2 of OEL 5.6 install:
(http://oraclenz.com/2011/02/04/playing-with-oracle-11gr2-oel-56-and-virtualbox-402-1st-part/)
New vm name: Ora11gR2.2 (same as Francisco's)
- virtual hard disk 61.74 GB 2048 meg RAM
(f:\VirtualBox VMs\Ora11gR2.2.vdi
- don't seem to allow a hostname: input
- just root pw: root/jcchoy321
Run into "not enough memory" errors during install, close a few windows xp apps and it proceed fine. Might have to reduce 2048 meg Ram later on.
Ensure list of packages included Francisco's list.
Ensure right click cd/dvd icon to remove thd oel5.6 iso dvd before reboot screen.
Boot msgs has 1 failure sometimes :
shutdown ntpd....failed (?)
memory crash kernel not within permissible range. (?)
disabled firewall, SElinux
VM has a warning of "using more than 50% of computer's 3.24 GB, continue own risk for other host xp apps."
o/s task
need to find out how to the VM hostname for linux loopback
setup to get past oracle pre-install error "detected primary ip address is DHCP assigned " !
12:30 pm Continue with Oracle 11gR2 preparation part 3.
- check memory and swap space size
[jcchoy@localhost ~]$ su - root
Password:
[root@localhost ~]# grep MemTotal /proc/meminfo
MemTotal: 2075068 kB (2 gb memory, fine)
[root@localhost ~]# grep SwapTotal /proc/meminfo
SwapTotal: 4128760 kB ( 4 gb swap space, fine)
[root@localhost ~]# free
total used free shared buffers cached
Mem: 2075068 551788 1523280 0 28316 366232
-/+ buffers/cache: 157240 1917828
Swap: 4128760 0 4128760
[root@localhost ~]#
- increase shared memory to 1240m
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56G 2.6G 51G 5% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
[root@localhost ~]# mount -t tmpfs shmfs -o size=1240m /dev/shm
[root@localhost ~]# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
shmfs 1.3G 0 1.3G 0% /dev/shm
[root@localhost ~]# cd /etc
[root@localhost etc]# cp -p fstab fstab.20110516
[root@localhost etc]# gedit fstab
- check and install needed software:
click Device/cd/dvd devices and click the OEL iso dvd file then cd to it and run rpm as follows:
[root@localhost etc]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56G 2.6G 51G 5% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1.3G 0 1.3G 0% /dev/shm
shmfs 1.3G 0 1.3G 0% /dev/shm
/dev/hda 3.0G 3.0G 0 100% /media/Oracle Linux Server dvd 20110119
[root@localhost etc]# cd /media/Oracle\ Linux\ Server\ dvd\ 20110119
[root@localhost Oracle Linux Server dvd 20110119]# cd Server
[root@localhost Server]# rpm -Uvh binutils-2.*
[root@localhost Server]# rpm -Uvh glibc-2.* has conflicts with file from package glibc-2.5-58.i686 (?)
Most of them already installed except for the following:
rpm -Uvh compat-libstdc++-33*
rpm -Uvh libaio-devel-0.*
rpm -Uvh numactl-devel-0.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh oracleasm-support-2.1.4-1.el.i386.rpm (not found)
(look up the dvd Server folder and the name should be
oracleasm-support-2.1.4-1.el5.i386.rpm)
rpm -Uvh oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm
- so far so good !
[root@localhost Server]# cd /etc
[root@localhost etc]# cp -p sysctl.conf sysctl.conf.20110516
[root@localhost etc]# gedit sysctl.conf
[root@localhost etc]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.core_uses_pid = 1
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
[root@localhost etc]#
- Configure VM to reduce Idle CPU load :
[root@localhost etc]# cp -p grub.conf grub.conf.20110516
[root@localhost etc]# gedit grub.conf (add divider=10)
[root@localhost etc]#
- Install Guest Additions
have to use magic disc to mount F:virtualbox\VBOXADDITIONS_4.0.4_70112
before it finally showed up in df -h. Devices/cd/dvd or pick iso file doesn't work sometimes. Has some warnings of 3D efforts for Linux 6 only, should be fine.
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56G 2.7G 51G 6% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1.3G 0 1.3G 0% /dev/shm
shmfs 1.3G 0 1.3G 0% /dev/shm
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56G 2.7G 51G 6% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1.3G 0 1.3G 0% /dev/shm
shmfs 1.3G 0 1.3G 0% /dev/shm
/dev/hda 37M 37M 0 100% /media/VBOXADDITIONS_4.0.4_70112
[root@localhost /]# cd /media/VBOXADDITIONS_4.0.4_70112
[root@localhost VBOXADDITIONS_4.0.4_70112]# sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.0.4 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing existing VirtualBox DKMS kernel modules [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
Your guest system does not seem to have sufficient OpenGL support to enable
accelerated 3D effects (this requires Linux 2.6.27 or later in the guest
system). This Guest Additions feature will be disabled.
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Doing non-kernel setup of the Guest Additions [ OK ]
Starting the VirtualBox Guest Additions [ OK ]
Installing the Window System drivers
Installing X.Org 7.1 modules [ OK ]
Setting up the Window System to use the Guest Additions [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
Installing graphics libraries and desktop services componen[ OK ]
[root@localhost VBOXADDITIONS_4.0.4_70112]#
- Extract the zip files with 7-zip on Windows xp in F:\Oracle11gR2 download
folder to be a shared folder for OEL 5.6.
Extracted the zip files to F:\Oracle11gR2 download\database, grid folders
Devices\Shared Folder click + other places,
folder: F:\Oracle11gR2 download folder-name Oracle_11G2.0.2
auto-mount, make Permanent
- Create unix groups and users:
(had to remove vboxsf group before it works)
[root@localhost /]# /usr/sbin/groupadd oinstall
[root@localhost /]# /usr/sbin/groupadd -g 502 dba
groupadd: GID 502 is not unique
[root@localhost /]# tail -10 /etc/group
stapdev:x:101:
stapusr:x:102:
stap-server:x:155:
haldaemon:x:68:
avahi-autoipd:x:156:
gdm:x:42:
sabayon:x:86:
jcchoy:x:500:
vboxsf:x:501:
oinstall:x:502:
[root@localhost /]# groupdel vboxsf
[root@localhost /]# groupdel oinstall
[root@localhost /]# tail -10 /etc/group
nfsnobody:x:65534:
xfs:x:43:
stapdev:x:101:
stapusr:x:102:
stap-server:x:155:
haldaemon:x:68:
avahi-autoipd:x:156:
gdm:x:42:
sabayon:x:86:
jcchoy:x:500:
[root@localhost /]# /usr/sbin/groupadd oinstall
[root@localhost /]# /usr/sbin/groupadd -g 502 dba
[root@localhost /]# /usr/sbin/groupadd -g 503 oper
[root@localhost /]# /usr/sbin/groupadd -g 504 asmadmin
[root@localhost /]# /usr/sbin/groupadd -g 506 asmdba
[root@localhost /]# /usr/sbin/groupadd -g 505 asmoper
[root@localhost /]# /usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
[root@localhost /]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost /]#
- Install cvuqdisk*
[root@localhost media]# sudo mkdir /media/sf_Oracle_11G2.0.2
[root@localhost media]# sudo mount -t vboxsf Oracle_11G2.0.2 /media/sf_Oracle_11G2.0.2
[root@localhost media]# ls -l
total 0
drwxrwxrwx 1 root root 0 May 16 14:14 sf_Oracle_11G2.0.2
[root@localhost media]# cd sf_Oracle_11G2.0.2
[root@localhost sf_Oracle_11G2.0.2]# ls -l
total 3185145
drwxrwxrwx 1 root root 0 May 16 14:10 database
drwxrwxrwx 1 root root 0 May 16 14:14 grid
-rwxrwxrwx 1 root root 1285396902 Apr 30 21:45 linux_11gR2_database_1of2.zip
-rwxrwxrwx 1 root root 995359177 Apr 30 22:54 linux_11gR2_database_2of2.zip
-rwxrwxrwx 1 root root 980831749 May 16 09:09 linux_11gR2_grid.zip
[root@localhost sf_Oracle_11G2.0.2]# cd grid/rpm
[root@localhost rpm]# ls -l
total 8
-rwxrwxrwx 1 root root 7831 Jun 2 2009 cvuqdisk-1.0.7-1.rpm
[root@localhost rpm]# rpm -Uvh cvuqdisk*
Preparing... ########################################### [100%]
Using default group oinstall to install package
1:cvuqdisk ########################################### [100%]
[root@localhost rpm]#
- Change /etc/security/limits.conf and /etc/pam.d/login
[root@localhost /]# cd /etc/security
[root@localhost security]# cp -p limits.conf limits.conf.20110516
[root@localhost security]# gedit limits.conf
[root@localhost security]# cd /etc/pam.d
[root@localhost pam.d]# cp -p login login.20110516
[root@localhost pam.d]# gedit login
[root@localhost pam.d]#
- Create Oracle directories
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
# mkdir /u01/app/oracle/recovery_area
# chown oracle:oinstall /u01/app/oracle/recovery_area
# chmod 775 /u01/app/oracle/recovery_area
- Change oracle .bash_profile
[oracle@localhost ~]$ cp -p .bash_profile .bash_profile.20110516
[oracle@localhost ~]$ gedit .bash_profile
(gedit:31980): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.
(not sure what this warning is all about, it updated.
- Now you need to connect as “root†and give to command: xhost + to enable X applications , than connect as “oracle†and run xclock to see if it’s working
[root@localhost /]# xhost +
access control disabled, clients can connect from any host
[oracle@localhost ~]$ xclock
Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[oracle@localhost ~]$
xclock works in oracle and root, but oracle session has authentication rejected warnings ?
These warnings disappear if I am not su - oracle but log out of jcchoy and log back in as oracle which is what I need to do to install oracle.
How to configurate the non-network loop back OEL 5.6 VM ?
find out hostname is not set ( has this name - localhost.localdomain )
[root@localhost sf_Oracle_11G2.0.2]# hostname
localhost.localdomain
[root@localhost sf_Oracle_11G2.0.2]#
hostname command doesn't set it permanently, follow how I configured
hostnames to loopback experience in Oracle 10gR2 Linux fedora 13 VM
to edit /etc/hosts (bkup first) by adding 2 127.0.0.1 lines infront of
127.0.0.1 localhost.localdomain localhost
let's assign a host name of olinux5.oraclelinux olinux5 ?
I think I might be fine as long as there is a 127.0.0.1 line and let hostname default to localhost.localdomain. I will soon find out when I run through Oracle pre-install tasks.
- Copy the windows xp F:\Oracle11gR2 download\database and grid folder
(devices\shared folder to folder-name Oracle_11G2.0.2) to
/Oracle_download on OEL 5.6
# cd /Oracle_download
# cp -r /media/Oracle_11G2.0.2/database/ .
# cp -r /media/Oracle_11G2.0.2/grid/ .
- Add a new virtual disk (8 GB) to VM of size at least 4 GB to install Grid Infrastructure; use fdisk to create a partition (logical disk) in it.
- the new disk device is named /dev/sdb which you can verify with fdisk -l command to list all disk partitions. e.g. /dev/sda disk device has 2 partitions: /dev/sda1 (boot partition) and /dev/sda2.
- Linux require all disk device to have at least 1 partition to function.
commands to use :
# man fdisk
# fdisk -l
# fdisk /dev/sdb (ready new disk device /dev/sdb for linux)
[jcchoy@localhost ~]$ su - root
Password:
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 64735232 sda
8 1 104391 sda1
8 2 64629495 sda2
8 16 8388608 sdb
253 0 60489728 dm-0
253 1 4128768 dm-1
[root@localhost ~]# fdisk -l
Disk /dev/sda: 66.2 GB, 66288877568 bytes
255 heads, 63 sectors/track, 8059 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 8059 64629495 8e Linux LVM
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/dm-0: 61.9 GB, 61941481472 bytes
255 heads, 63 sectors/track, 7530 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost ~]#
- screw up a bit with fdisk /dev/sdb initially, hope it will work after reboot.
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help):
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]#
- shutdown OEL 5.6 and VM and restart again, /dev/sdb has a partition /dev/sdb1 which looks fine.(Francisco's instructions - reboot your virtual machine to allow the new partition to be used).
[jcchoy@localhost ~]$ su - root
Password:
[root@localhost ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898+ 83 Linux
[root@localhost ~]#
- configure the disk(s ) to be used by ASM, for this we will use the command:
# oracleasm configure –i
[root@localhost ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@localhost ~]#
- Initialize the asmlib with the oracleasm init command. This command will load the oracleasm module and also mounts the oracleasm filesystem.
[root@localhost ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@localhost ~]#
- Now is time to use the oracleasm createdisk
[root@localhost ~]# oracleasm createdisk DATA1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@localhost ~]#
- To check if the disk is visible to the ASM and to see if it is mounted in the oracleasm filesystem use the following commands as below:
[root@localhost ~]# oracleasm listdisk
oracleasm: 'listdisk' is not an oracleasm command
Usage: oracleasm [--exec-path=
oracleasm --exec-path
oracleasm -h
oracleasm -V
The basic oracleasm commands are:
configure Configure the Oracle Linux ASMLib driver
init Load and initialize the ASMLib driver
exit Stop the ASMLib driver
scandisks Scan the system for Oracle ASMLib disks
status Display the status of the Oracle ASMLib driver
listdisks List known Oracle ASMLib disks
querydisk Determine if a disk belongs to Oracle ASMlib
createdisk Allocate a device for Oracle ASMLib use
deletedisk Return a device to the operating system
renamedisk Change the label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver
[root@localhost ~]# oracleasm listdisks
DATA1
[root@localhost ~]# ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 oracle dba 8, 17 May 16 21:55 DATA1
[root@localhost ~]#
- Now I am ready to install the Grid Infrastructure.
For the installation of Oracle 11g see http://www.oraclenz.com/
which has a tutorial of how to add new virtual disk to VM and the
actual install.
2011-05-16 Monday: Status of the day
10:15 pm
- Created a new VM
- Installed Oracle Enterprise Linux 5.6 (OEL 5.6) which has oracleasm driver
- Configured oracleasm successfully
- Ready to install Grid Infrastructure
upload this text file to windows xp:
# sudo mount -t vboxsf Oracle_11G2.0.2 /media/sf_Oracle_11G2.0.2
# cd sf_Oracle_11G2.0.2
# cp ~jcchoy/Desktop/oracle_linux_5.6_installation_notes.txt .
cp: overwrite `./oracle_linux_5.6_installation_notes.txt'? y
2011-05-23 Monday: Status before the day
1:00 pm cannot access www.oraclenz.com (website down 404 not found)
Francisco seems to have only 1 ASM disk data1 only,
- create 7 more SATA disk in Ora11gR2.2 VM:
SATA Controller
existing SATA Port 0: Ora11gR2.2.vdi.vdi (Normal, 61.74 GB)
existing SATA Port 1: Ora11gR2.2 Grid.vdi.vdi (Normal, 8 GB)
new SATA Port 2: ASM2.vdi (Normal, 8 GB)
new SATA Port 3: ASM3.vdi (Normal, 8 GB)
new SATA Port 4: ASM4.vdi (Normal, 8 GB)
new SATA Port 5: ASM5.vdi (Normal, 8 GB)
new SATA Port 6: ASM6.vdi (Normal, 8 GB)
new SATA Port 7: ASM7.vdi (Normal, 8 GB)
new SATA Port 8: ASM8.vdi (Normal, 8 GB)
- log on to OEL 5.6 and run oracle asm to configure the disks
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 64735232 sda
8 1 104391 sda1
8 2 64629495 sda2
8 16 8388608 sdb
8 17 8385898 sdb1
8 32 8388608 sdc
8 48 8388608 sdd
8 64 8388608 sde
8 80 8388608 sdf
8 96 8388608 sdg
8 112 8388608 sdh
8 128 8388608 sdi
253 0 60489728 dm-0
253 1 4128768 dm-1
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): clear
DOS Compatibility flag is not set
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdg
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdh
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdi
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 64735232 sda
8 1 104391 sda1
8 2 64629495 sda2
8 16 8388608 sdb
8 17 8385898 sdb1
8 32 8388608 sdc
8 33 8385898 sdc1
8 48 8388608 sdd
8 49 8385929 sdd1
8 64 8388608 sde
8 65 8385898 sde1
8 80 8388608 sdf
8 81 8385898 sdf1
8 96 8388608 sdg
8 97 8385898 sdg1
8 112 8388608 sdh
8 113 8385898 sdh1
8 128 8388608 sdi
8 129 8385898 sdi1
253 0 60489728 dm-0
253 1 4128768 dm-1
[root@localhost ~]#
- shutdown OEL 5.6 and VM and restart before running oracleasm.
2011-05-23 Monday: Running oracleasm for the new disks
3:00 pm
- oracleasm configure -i
- oracleasm init
- oracleasm createdisk DATA2 /dev/sdc1
- oracleasm createdisk DATA3 /dev/sdd1
- oracleasm createdisk DATA4 /dev/sde1
- oracleasm createdisk DATA5 /dev/sdf1
- oracleasm createdisk DATA6 /dev/sdg1
- oracleasm createdisk DATA7 /dev/sdh1
- oracleasm createdisk DATA8 /dev/sdi1
- oracleasm listdisks
[jcchoy@localhost ~]$ su - root
Password:
[root@localhost ~]# cd /dev
[root@localhost dev]# ls sd*
sda sda2 sdb1 sdc1 sdd1 sde1 sdf1 sdg1 sdh1 sdi1
sda1 sdb sdc sdd sde sdf sdg sdh sdi
[root@localhost dev]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface [oracle]: oracle
Default group to own the driver interface [dba]: dba
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@localhost dev]# oracleasm init
[root@localhost dev]# cd ..
[root@localhost /]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface [oracle]: oracle
Default group to own the driver interface [dba]: dba
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@localhost /]# which oracleasm
/usr/sbin/oracleasm
[root@localhost /]# oracleasm init
[root@localhost /]# oracleasm listdisks
DATA1
[root@localhost /]# oracleasm createdisk DATA2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA4 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA5 /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA6 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA7 /dev/sdh1
Writing disk header: done
Instantiating disk: done
[root@localhost /]# oracleasm createdisk DATA8 /dev/sdi1
Writing disk header: done
Instantiating disk: done
[root@localhost /]#
[root@localhost /]# oracleasm listdisks
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
[root@localhost /]# ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 oracle dba 8, 17 May 23 14:44 DATA1
brw-rw---- 1 oracle dba 8, 33 May 23 14:56 DATA2
brw-rw---- 1 oracle dba 8, 49 May 23 14:57 DATA3
brw-rw---- 1 oracle dba 8, 65 May 23 14:57 DATA4
brw-rw---- 1 oracle dba 8, 81 May 23 14:57 DATA5
brw-rw---- 1 oracle dba 8, 97 May 23 14:58 DATA6
brw-rw---- 1 oracle dba 8, 113 May 23 14:58 DATA7
brw-rw---- 1 oracle dba 8, 129 May 23 14:58 DATA8
[root@localhost /]#
[root@localhost /]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
- Now begin installing Grid Infrastructure, configure ASM and Oracle Restart
- following http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationsOnOEL5UsingVirtualBox.php except ignore the rac2 part for screens but use Francisco's instructions (there is a copy on Google cache, which doesn't have the screen prints).
- cd /Oracle_download/grid
- su - oracle
- ./runInstaller
[root@localhost /]# cd Oracle_download
[root@localhost Oracle_download]# ls -l
total 8
drwxr-xr-x 8 root root 4096 May 16 17:40 database
drwxr-xr-x 8 root root 4096 May 16 18:24 grid
[root@localhost Oracle_download]# cd grid
[root@localhost grid]# ls -l
total 44
drwxr-xr-x 9 root root 4096 May 16 18:22 doc
drwxr-xr-x 4 root root 4096 May 16 18:22 install
drwxr-xr-x 2 root root 4096 May 16 18:22 response
drwxr-xr-x 2 root root 4096 May 16 18:22 rpm
-rwxr-xr-x 1 root root 3795 May 16 18:22 runcluvfy.sh
-rwxr-xr-x 1 root root 4353 May 16 18:22 runInstaller
drwxr-xr-x 2 root root 4096 May 16 18:22 sshsetup
drwxr-xr-x 14 root root 4096 May 16 18:24 stage
-rwxr-xr-x 1 root root 4279 May 16 18:24 welcome.html
[root@localhost grid]# pwd
/Oracle_download/grid
[root@localhost grid]# su - oracle
[oracle@localhost ~]$ pwd
/home/oracle
[oracle@localhost ~]$ cd /Oracle_download/grid
[oracle@localhost grid]$ ls -l
total 44
drwxr-xr-x 9 root root 4096 May 16 18:22 doc
drwxr-xr-x 4 root root 4096 May 16 18:22 install
drwxr-xr-x 2 root root 4096 May 16 18:22 response
drwxr-xr-x 2 root root 4096 May 16 18:22 rpm
-rwxr-xr-x 1 root root 3795 May 16 18:22 runcluvfy.sh
-rwxr-xr-x 1 root root 4353 May 16 18:22 runInstaller
drwxr-xr-x 2 root root 4096 May 16 18:22 sshsetup
drwxr-xr-x 14 root root 4096 May 16 18:24 stage
-rwxr-xr-x 1 root root 4279 May 16 18:24 welcome.html
[oracle@localhost grid]$
[oracle@localhost grid]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 48189 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4031 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] n User Selected: No Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2011-05-23_03-19-46PM/installActions2011-05-23_03-19-46PM.log [oracle@localhost grid]$ - For some reason the monitor is not configured color monitor correctly could be because I fuzz with the xterm screen settings earlier. - start another new linux terminal, edit current profile/color choose linux console instead of xterm. - get passed the monitor check but the OUI screen keeps shaking, don't know why ? I think it is because of too much paging - too much memory used in VM ? - cancel the install because not sure if it is ok to continue, on the ASM configuration, it didn't find the 8 disk !? [oracle@localhost grid]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB. Actual 48189 MB Passed Checking swap space: must be greater than 150 MB. Actual 4031 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-23_03-26-31PM. Please wait ...[oracle@localhost grid]$ 2011-05-23 Monday: Re-evaluating the failed Grid Infrastructure Install 9:00 pm - Coded Put_Winxp.sh bash script in root directory to cp this note document from OEL 5.6 VM to the windows xp F:\Oracle11gR2 download folder, simply type ./Put_Winxp.sh in root directory will refresh the window xp copy which can be uploaded to my www.joelchoy.weebly.com website. - Fix the VM over 50% total Windows xp 3.24 GB RAM usage warning, - adjust VM memory to 3.24/2= 1.62, move the bar to 1649 MB from 2048 MB - from Oracle-base.com rac install web page, it said use of ASMlib driver must install 1. oracleasmlib, 2. oracleasm-support, 3. oracleasm pacakges all 3. Oracleasmlib is only available from OTN download not on OEL 5.6 dvd ! - Double check the OEL 5.6 dvd .iso file, server folder, oracleasmlib is indeeded not there. - Do uname -rm shows kernel is 2.6.18-238.el5 i686 - Go to www.oracle.com and locate a link for non-ULN subscription ASMlib download (http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html) , - Under Oracle ASMlib Downloads fo Red Hat Enterprise Linux Server 5, - Pick Intel IA32(x86) Architecture, - oracleasmlib-2.0.4-1.el5.i386.rpm (this is consistent with Oracle-base.com rac install 64 bit pick of oracleasmlib-2.0.4-1el5x86_64.rpm name) - Download and install oracleasmlib-2.0.4-1.el5.i386.rpm - Then re-configure the oracleasm 8 disk and try install Grid Infrastructure again. - Double-check OTN about this. OTN said "Non-subscribers are free to use the similar package built for RHEL on their Enterprise Linux mahcines" (http://www.oracle.com/technetwork/Server-storage/linux/unl-095759.html) - Downloaded oracleasmlib-2.0.4-1.el5.i386.rpm on Windows xp host to the F:\Oracle Linux 5.6 Download\V24478-01 folder together with the OEL 5.6 .iso file. [jcchoy@localhost ~]$ su - root Password: [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 56G 6.0G 48G 12% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 1.3G 0 1.3G 0% /dev/shm shmfs 1.3G 0 1.3G 0% /dev/shm [root@localhost ~]# grep MemTotal /proc/meminfo MemTotal: 1669672 kB [root@localhost ~]# grep SwapTotal /proc/meminfo SwapTotal: 4128760 kB [root@localhost ~]# free total used free shared buffers cached Mem: 1669672 456860 1212812 0 27956 317400 -/+ buffers/cache: 111504 1558168 Swap: 4128760 0 4128760 [root@localhost ~]# uname -rm 2.6.18-238.el5 i686 [root@localhost ~]# 2011-05-23 Monday: Status download Oracleasmlib 10:45 pm - Reduce mem fr 2048 MB to 1649 MB - Downloaded the RHEL 5 equivalent OEL 5.6 oracleasmlib to OEL 5.6 dowload iso folder 2011-05-24 Tuesday: Status 8:30 am - Install Guide p.3-10 "default disk discovery string must be set to ORCLDISK:*, or left empty("") so OUI can discover these disks". This seems to be after ASM disks are installed, can't seem to find anything on setting disk discovery string initially during configuration. - OUI screen flickering problem: the screen resolution settings too high ? Or some oracle processes running before the install ? Try stopping the Oracle 10g for windows services on xp. And su - oracle; ps -ef grep tnslsnr to see if any oracle processes running. - Can't put the oracleasmlib package in the OEL 5.6 download dvd folder because dvd drive only retrieve iso file; move the downloaded file to where I use to update this document from linux VM to windows xp F:\Oracle11gR2 download folder so I can install the oracleasmlib package - Installed the oracleasmlib package, also tried update the latest driver from ULN (Unbreakable Linux Network), get some pop ups to install GPG Install key, but won't allow me to click foward icon, anyway it came back saying everything is updated and known to ASM. 2011-05-24 Tuesday: Status - installed oracleasmlib also 10:30 am - ps -ef grep ora or grep tnslsnr (no oracle stuff running) - stop oracle services on windows xp: Control Panel/Administrator Tools/Services, right click/stop until all 4 oracle services show status blank (stopped) - System/Preferences/Screen Resolution chg fro 799x480 to 800x600 - System/Administration/Display/Settings chg fro 640x480 to 800X600, leave it millions of colors for color depth and restarted oel 5.6 before installation Grid Infrastructure again. [root@localhost ~]# ./Put_Winxp.sh [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 56G 6.0G 48G 12% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 1.3G 0 1.3G 0% /dev/shm shmfs 1.3G 0 1.3G 0% /dev/shm /dev/hda 3.0G 3.0G 0 100% /media/Oracle Linux Server dvd 20110119 Oracle11gR2_download 466G 66G 401G 14% /media/sf_Oracle_11G2.0.2 [root@localhost ~]# cd /media/sf_Oracle_11G2.0.2 [root@localhost sf_Oracle_11G2.0.2]# ls -l total 3185204 drwxrwxrwx 1 root root 0 May 16 14:10 database drwxrwxrwx 1 root root 0 May 16 14:14 grid -rwxrwxrwx 1 root root 1285396902 Apr 30 21:45 linux_11gR2_database_1of2.zip -rwxrwxrwx 1 root root 995359177 Apr 30 22:54 linux_11gR2_database_2of2.zip -rwxrwxrwx 1 root root 980831749 May 16 09:09 linux_11gR2_grid.zip -rwxrwxrwx 1 root root 13929 May 23 22:33 oracleasmlib-2.0.4-1.el5.i386.rpm -rwxrwxrwx 1 root root 44402 May 24 09:34 oracle_linux_5.6_installation_notes.txt -rwxrwxrwx 1 root root 690 May 16 16:08 Shortcut to oracle_linux_5.6_installation_notes.txt.lnk [root@localhost sf_Oracle_11G2.0.2]# rpm -Uvh oracleasmlib-2.0.4-1.el5.i386.rpm warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:oracleasmlib ########################################### [100%] [root@localhost sf_Oracle_11G2.0.2]# [root@localhost sf_Oracle_11G2.0.2]# cd [root@localhost ~]# oracleasm configure -i Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface [oracle]: oracle
Default group to own the driver interface [dba]: dba
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@localhost ~]# oracleasm init
[root@localhost ~]# oracleasm listdisk
oracleasm: 'listdisk' is not an oracleasm command
Usage: oracleasm [--exec-path=
oracleasm --exec-path
oracleasm -h
oracleasm -V
The basic oracleasm commands are:
configure Configure the Oracle Linux ASMLib driver
init Load and initialize the ASMLib driver
exit Stop the ASMLib driver
scandisks Scan the system for Oracle ASMLib disks
status Display the status of the Oracle ASMLib driver
listdisks List known Oracle ASMLib disks
querydisk Determine if a disk belongs to Oracle ASMlib
createdisk Allocate a device for Oracle ASMLib use
deletedisk Return a device to the operating system
renamedisk Change the label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver
[root@localhost ~]# oracleasm listdisks
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
[root@localhost ~]# oracleasm update-driver
Kernel: 2.6.18-238.el5 i686
Driver name: oracleasm-2.6.18-238.el5
Latest version: oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm
Installing driver...
Preparing... ########################################### [100%]
package oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686 is already installed
file /lib/modules/2.6.18-238.el5/kernel/drivers/addon/oracleasm/oracleasm.ko from install of oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686 conflicts with file from package oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686
Driver not installed
[root@localhost ~]#
[root@localhost ~]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@localhost ~]# oracleasm querydisk DATA1
Disk "DATA1" is a valid ASM disk
[root@localhost ~]# oracleasm querydisk DATA4
Disk "DATA4" is a valid ASM disk
[root@localhost ~]#
2011-05-24 Tuesday: Status another Grid Infrastructure install attempt
11:00 am
- $ su - oracle
- $ cd /Oracle_download/grid
- $./runInstaller
- same problem OUI screen flashing, found on google that Oracle 11gR2 OUI install requires minimum 1024x760 resolution to work. However, it did show all ASM disks this time DATA1-8. This problem reported by Eric Wong of Vancouver back in Sept 2009 (http://www.masterschema.com/2009/09/flashing-and-blinking-bug-in-oracle-universal-installer-database-11gr2/comment-page-1/#comment-180)
- Now need to see if I can run OEL 5.6 with 1024X768 resolution at least. All cancelled installation logs are kept in /home/oracle/.oracle/logs
- No easy solution, Oracle Linux 6.0 highest resolution is 1000X600 so Eric Wong suggests using TWM (Tab Window Manager) in place of Gnome is probably even harder. Set back to 640X480 and thousand colors and forge on at 1:30 pm. Actually I think 800X640 highest resolution and million colors seemed to cause less flashing, next time.
- Got all 8 candidate ASM disks listed, take the default for ASMdba grup : asmdba, ASMoperater grp: oinstall, ASMgroup grp : oinstall.
- Had to mkdir /u01/app/orInventory and grant correct ownership of oracle and permissions
- Minimize the OUI screen to let it run faster without displaying the flashing OUI screenscd /u01/app too much.
2011-05-24 Tuesday: Audit Trail of Grid Infrastructure install
(despite flashing OUI screens, use ALT+N (Next) ALT+F (Finish) keys to circumvent the flashing screens hard to click problem)
reach the last screen by 2:30 pm that day.
"The Installation of Oracle Grid Infrastructure for Standalone Server was successful"
1:06 pm
[oracle@localhost grid]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 48186 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4031 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 65536 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-24_01-06-53PM. Please wait ...[oracle@localhost grid]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2011-05-24_01-06-53PM.log
[oracle@localhost grid]$
[root@localhost /]# cd /u01/app/oraInventory
[root@localhost oraInventory]# ls -l
total 28
drwxrwx--- 2 oracle oinstall 4096 May 24 14:11 ContentsXML
-rw-rw---- 1 oracle oinstall 37 May 24 14:11 install.platform
drwxrwx--- 2 oracle oinstall 4096 May 24 13:29 logs
-rw-rw---- 1 oracle oinstall 293 May 24 13:29 oraInstaller.properties
-rw-rw---- 1 oracle oinstall 56 May 24 14:11 oraInst.loc
-rwxrwx--- 1 oracle oinstall 1623 May 24 14:11 orainstRoot.sh
drwxrwx--- 2 oracle oinstall 4096 May 24 13:29 oui
[root@localhost oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost oraInventory]#
[root@localhost oraInventory]# cd /u01/app/oracle/product/11.2.0.2/db_1
[root@localhost db_1]# pwd
/u01/app/oracle/product/11.2.0.2/db_1
[root@localhost db_1]# ls -l
total 248
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:29 assistants
drwxr-xr-x 2 oracle oinstall 12288 May 24 13:54 bin
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:45 cdata
drwxrwxr-x 3 oracle oinstall 4096 May 24 14:11 cfgtoollogs
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:29 clone
drwxr-xr-x 15 oracle oinstall 4096 May 24 13:54 crs
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 csmig
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:45 css
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:29 cv
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:29 dbs
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:43 dc_ocm
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:54 deinstall
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 demo
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 diagnostics
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:45 evm
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:29 gpnp
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 has
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 hs
drwxr-xr-x 7 oracle oinstall 4096 May 24 14:11 install
-rw-r--r-- 1 oracle oinstall 37 May 24 13:29 install.platform
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:38 instantclient
drwxrwx--- 13 oracle oinstall 4096 May 24 14:11 inventory
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:29 javavm
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:45 jdbc
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:44 jdk
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:43 jlib
lrwxrwxrwx 1 oracle oinstall 46 May 24 13:54 JRE -> /u01/app/oracle/product/11.2.0.2/db_1/jdk/jre/
drwxr-xr-x 12 oracle oinstall 4096 May 24 13:45 ldap
drwxr-xr-x 4 oracle oinstall 12288 May 24 13:54 lib
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:45 log
drwxr-xr-x 5 oracle oinstall 4096 May 24 13:29 md
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:29 mesg
drwxr-xr-x 11 oracle oinstall 4096 May 24 13:54 network
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:29 nls
drwxr-xr-x 20 oracle oinstall 4096 May 24 13:40 oc4j
drwxr-xr-x 5 oracle oinstall 4096 May 24 13:29 ons
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:45 OPatch
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:45 opmn
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:29 oracore
-rw-r----- 1 oracle oinstall 56 May 24 13:29 oraInst.loc
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:29 ord
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:45 oui
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:29 owm
drwxr-xr-x 5 oracle oinstall 4096 May 24 13:54 perl
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:29 plsql
drwxr-xr-x 6 oracle oinstall 4096 May 24 13:54 precomp
drwxr-xr-x 9 oracle oinstall 4096 May 24 13:45 racg
drwxr-xr-x 13 oracle oinstall 4096 May 24 13:54 rdbms
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:45 relnotes
-rwxr-x--- 1 oracle oinstall 885 May 24 13:54 root.sh
drwxr-xr-x 4 oracle oinstall 4096 May 24 13:29 scheduler
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 slax
drwxr-xr-x 7 oracle oinstall 4096 May 24 13:49 sqlplus
drwxr-xr-x 10 oracle oinstall 4096 May 24 13:45 srvm
drwxr-xr-x 5 oracle oinstall 4096 May 24 13:29 sysman
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 usm
drwxr-xr-x 2 oracle oinstall 4096 May 24 13:34 utl
drwxr-xr-x 3 oracle oinstall 4096 May 24 13:29 wwg
drwxr-xr-x 5 oracle oinstall 4096 May 24 13:37 xdk
[root@localhost db_1]# ./root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.2/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-05-24 14:25:44: Checking for super user privileges
2011-05-24 14:25:44: User has super user privileges
2011-05-24 14:25:44: Parsing the host name
Using configuration parameter file: /u01/app/oracle/product/11.2.0.2/db_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-6.0.1
localhost 2011/05/24 14:26:29 /u01/app/oracle/product/11.2.0.2/db_1/cdata/localhost/backup_20110524_142629.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 4031 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[root@localhost db_1]#
2011-05-24 Tuesday: Status : seems to have a successful Grid Infrastructure install
2:45 pm view /u01/app/oraInventory/logs/installActions2011-05-24_01-06-53PM.log
4:00 pm Continue with a Database Install
- got invalid compressed data for some reason, decided to cp the 11gR2 DB zip files from window xp to OEL 5.6 Oracle_download folder and unzip from there.
- got install restarted at 4:43 pm and even got rid of the flashing screen by maximize it, everything was good until I tried to update this file during set up binary steps and it became frozen up and had to shut down everything including VM.
9:00 pm
- restart again log of that frozen install in /u01/app/oraInventory/logs/installAction2011-05-24_04_43_03PM.log
- remove the first dbhome_1 from the dbhome_2 home path display
[jcchoy@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ cd /u01/app/oracle/product/11.2.0
[oracle@localhost 11.2.0]$ ls
dbhome_1
[oracle@localhost 11.2.0]$ ls -l
total 4
drwxr-xr-x 71 oracle oinstall 4096 May 24 17:06 dbhome_1
[oracle@localhost 11.2.0]$ man rm
[oracle@localhost 11.2.0]$ rm -rf dbhome_1
[oracle@localhost 11.2.0]$ ls -l
total 0
[oracle@localhost 11.2.0]$
- This space left for hand written notes to be entered later
2011-05-31 Tuesday Oracle 11gR2 Grid Infrastructure re-install finally successful.
3:00 PM captured the logs from the root.sh Grid Infrastructure install below :
[jcchoy@localhost ~]$ su - root
Password:
[root@localhost ~]# /u01/app/oracle/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2011-05-31 14:36:17: Checking for super user privileges
2011-05-31 14:36:17: User has super user privileges
2011-05-31 14:36:17: Parsing the host name
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-6.0.1
localhost 2011/05/31 14:36:38 /u01/app/oracle/product/11.2.0/grid/cdata/localhost/backup_20110531_143638.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 4031 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[root@localhost ~]#
10:25:00 PM captured the logs from the root.sh below from install db software only :
[jcchoy@localhost ~]$ su -
Password:
[root@localhost ~]# whoami
root
[root@localhost ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@localhost ~]#
2011-06-04 Creating an Oracle Database (Practice 3-1) successful
- Begin installing an oracle database with dbca
- stop Oracle 10gR2 for windows on xp oracle* services, just in case
- has to be careful viewing the OUI screens if not in Full screen mode - could miss
e.g. storage type 1st line in Database File Locations screen
- the ending em url line is http:://localhost.localdomain: without port 1158
because /etc/hosts file doesn't contain host name, otherwise successful
- had to accept the certificate and add to exception 1st time when use
https://localhost.localdomain:1158/em
[jcchoy@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? orcl
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/dbhome_1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost ~]$
- This space leave for hand-written notes to be entered later
2011-06-05 Managing the Oracle Instance (Practice 4-1)
(2:00 pm)
- Cannot connect to OEM url (https://localhost.localdomain:1158/em) doesn't work for some reason !
- Check listener status,
- $ . oraenv
- $ oracle_SID [ORCL] orcl
- $ lsnrctl status (start if stopped) ($ORACLE_HOME/bin/lsnrctl status) - already up
- Check to see if orcl database started up and running
- $ sqlplus / as sysdba
- startup - already up
(ora-01081: cannot start already running oracle - shutdown first)
OR
- $ srvctl start database -d orcl -o mount
(PRCR-1004: Resource ora.orcl.db is already running)
- Start DB console
- $ . oraenv
- $ emctl start dbconsole (wait till it says "started"
($ORACLE_HOME/bin/emctl start dbconsole)
Starting OEM 11g Datanase Control...........started
- After the DB console is started, OEM url now works.
[jcchoy@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ cd
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-JUN-2011 12:17:35
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-JUN-2011 11:33:58
Uptime 0 days 0 hr. 43 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orcl.example.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.example.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 12:19:33 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> sho user
USER is "SYS"
SQL> help
SP2-0171: HELP system not available.
SQL> exit
Disconnected
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ?
ORACLE_HOME = [/home/oracle] ? lsnrctl
The Oracle base for ORACLE_HOME=lsnrctl is /u01/app/oracle
[oracle@localhost ~]$ lsnrctl stat
-bash: lsnrctl: command not found
[oracle@localhost ~]$ lsnrctl status
-bash: lsnrctl: command not found
[oracle@localhost ~]$ exit
logout
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost ~]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://localhost.localdomain:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ........... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/localhost.localdomain_orcl/sysman/log
[oracle@localhost ~]$
- The following is from another xterm
- The following done before emctl start dbconsole
[jcchoy@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ view /etc/hosts
[oracle@localhost ~]$ sqlplus hr
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 13:05:24 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
Enter user-name: exit or (CRL+d) to get out of sqlplus
- The following after emctl start dbconsole was started ..
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 13:08:04 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@localhost ~]$ srvctl start database -d orcl -o mount
PRCR-1004 : Resource ora.orcl.db is already running
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 13:22:16 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show user
USER is "SYS"
SQL> connect hr
Enter password:
Connected.
SQL> show user
USER is "HR"
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@localhost ~]$
- Need to write a startup script to be called by init.d to automate this:
1. start listner
2. start DB orcl
3. start EM dbconsole (In my case, it seems just no. 3 I need to do each time)
$ emctl start dbconsole
Following is an example from Burleson Consulting (http://dbaforums.org/oracle/index.php?showtopic=1890)
#!/bin/ksh
# Set the env
export ORACLE_HOME=/ whatever
export ORACLE_SID = / whatever
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
# Start the listener
$ORACLE_HOME/bin/lsnrctl start
# Start the database
$ORACLE_HOME/bin/sqlplus /nolog << ! connect / as sysdba startup exit ! # Sleep to allow the database to complete starting sleep 20 # Start he console $ORACLE_HOME/bin/emctl start dbconsole # End of Script Make the script executable $ chmod +x script_name.ksh Then run it to start the database $ ./script_name.ksh 2011-06-05 Managing the Oracle Instance (Practice 4-1) (successful) 4:45 pm - Begin to work with Practice 4-1 (managing Oracle Instance) - shut down orcl with OEM - startup orcl with OEM - sqlplus with system/oracle_4U sql> select * from v$diag_info; (to locate the alert log in trace directory)
under the column heading Diag Trace has the path of the trace directory:
/u01/app/oracle/diag/rdbms/orcl/orcl/trace
- "Diag Trace" contains the path to the current alert_orcl.log since June 4 when db created.
- save a copy in /home/oracle/alert_orcl_20110604.log
- learned Oracle Restart is enabled and test that it can restart orcl when crashed
killing a LGWR process
$ . oraenv
$ ps -ef grep ora_lgwr (to locate the LGWR process id and kill it)
then keep running ps -ef grep ora_lgwr until you see a new process created by
Oracle Restart.
- sqlplus / as sysdba
sql> select status from v$instance; (to ensure orcl status is open)
- sent /home/oracle/alert_orcl_20110604.log to royale_sojin@hotmail.com
[oracle@localhost home]$ su
Password:
[root@localhost home]# cp /home/oracle/labs/*.* /home/jcchoy/Desktop/labs
[root@localhost home]# cp /home/oracle/GP_template_dtl /home/jcchoy/Desktop/GP_template_dtl
[root@localhost home]# cp /home/oracle/orcl_summary /home/jcchoy/Desktop/orcl_summary
[root@localhost home]# chmod 755 /home/jcchoy/Desktop/GP_template_dtl
[root@localhost home]# chmod 755 /home/jcchoy/Desktop/orcl_summary
[root@localhost home]# chmod 755 /home/jcchoy/Desktop/labs
- save this document and the labs stuff to window xp shared folder
- shutdown orcl in OEM
- The following copy/paste from term after cd to the trace directory and looking at alert_orcl.log:
[oracle@localhost trace]$ tail alert_orcl.log
Setting Resource Manager plan SCHEDULER[0x3009]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Sun Jun 05 16:45:49 2011
Starting background process VKRM
Sun Jun 05 16:45:49 2011
VKRM started with pid=31, OS id=29309
Sun Jun 05 16:50:24 2011
Starting background process SMCO
Sun Jun 05 16:50:25 2011
SMCO started with pid=25, OS id=30088
[oracle@localhost trace]$ tail -50 alert_orcl.log
NOTE: Loaded library: System
SUCCESS: diskgroup DATA was mounted
SUCCESS: diskgroup FRA was mounted
NOTE: dependency between database orcl and diskgroup resource ora.DATA.dg is established
NOTE: dependency between database orcl and diskgroup resource ora.FRA.dg is established
Sun Jun 05 16:45:15 2011
Successful mount of redo thread 1, with mount id 1280839572
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
ALTER DATABASE OPEN
Thread 1 opened at log sequence 9
Current log# 3 seq# 9 mem# 0: +DATA/orcl/onlinelog/group_3.263.752950185
Current log# 3 seq# 9 mem# 1: +FRA/orcl/onlinelog/group_3.259.752950189
Successful open of redo thread 1
Sun Jun 05 16:45:17 2011
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sun Jun 05 16:45:17 2011
SMON: enabling cache recovery
Successfully onlined Undo Tablespace 2.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Sun Jun 05 16:45:24 2011
QMNC started with pid=28, OS id=29242
Sun Jun 05 16:45:27 2011
Completed: ALTER DATABASE OPEN
Sun Jun 05 16:45:35 2011
db_recovery_file_dest_size of 4062 MB is 4.04% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Sun Jun 05 16:45:44 2011
Starting background process CJQ0
Sun Jun 05 16:45:45 2011
CJQ0 started with pid=30, OS id=29304
Setting Resource Manager plan SCHEDULER[0x3009]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Sun Jun 05 16:45:49 2011
Starting background process VKRM
Sun Jun 05 16:45:49 2011
VKRM started with pid=31, OS id=29309
Sun Jun 05 16:50:24 2011
Starting background process SMCO
Sun Jun 05 16:50:25 2011
SMCO started with pid=25, OS id=30088
[oracle@localhost trace]$ gedit alert_orcl.log
[oracle@localhost trace]$ save alert_orcl.log to alert_orcl_20110604.log
-bash: save: command not found
[oracle@localhost trace]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 17:17:04 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter sga_max_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 552M
SQL> show parameter db_cache_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_cache_size big integer 0
SQL> show parameter shared_pool_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size big integer 0
SQL> show parameter job_queue_processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 1000
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@localhost trace]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost trace]$ ps -ef grep ora_lgwr_orcl
oracle 1108 5485 0 17:24 pts/1 00:00:00 grep ora_lgwr_orcl
oracle 29070 1 0 16:45 ? 00:00:03 ora_lgwr_orcl
[oracle@localhost trace]$ kill -9 29070
[oracle@localhost trace]$ ps -ef grep ora_lgwr_orcl
[oracle@localhost trace]$
[oracle@localhost trace]$
[oracle@localhost trace]$
[oracle@localhost trace]$ ps -ef grep ora_lgwr_orcl
oracle 1478 1 0 17:27 ? 00:00:00 ora_lgwr_orcl
oracle 1672 5485 0 17:27 pts/1 00:00:00 grep ora_lgwr_orcl
[oracle@localhost trace]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 5 17:29:42 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select status from v$instance
2 ;
STATUS
------------
OPEN
SQL>
2011-06-06 Own Learning of . oraenv and emctl
10:00 am
- On . oraenv, do I have to supply orcl or just enter since it already shows oracle_sid=[ORCL]. You have to supply orcl to the prompt, otherwise $ORACLE_HOME is not set correctly and you can't issue the emctl command
- After . oraenv and orcl, then you can enter emctl. Enter emtl -help to get its syntax.
- emctl status expects an argument so it really is the same as emctl -help as it turns out
- Need to at least start up the dbconsole in order to use url to see OEM https://localhost.localdomain:1158/em, which shows db instance down. http://127.0.0.1:1158/em said opening a bin file and prompt for save file, then save file and it doesn't seem to work
- startup orcl using $ sqlplus / as sysdba, startup instead of $ srvctl start database -d orcl -o mount this time from data base home (not grid home). The grid home is for starting ASM + listener. Not sure +ASM instance is up or not with this startup though (use lnsrctl status to check, it is up)
- OEM url now shows all 3: db instance (status: open), listener (status: up), Agent connection to instance (status: succeeded) are up
The following is my investigation results:
[jcchoy@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ?
ORACLE_HOME = [/home/oracle] ? The Oracle base for ORACLE_HOME=/home/oracle is /u01/app/oracle
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? orcl
[oracle@localhost ~]$ echo $oracle_home
[oracle@localhost ~]$ echo $ORACLE_HOME
/home/oracle
[oracle@localhost ~]$ emctl -help
-bash: emctl: command not found
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost ~]$ emctl -help
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 10g Database Control commands:
emctl start stop dbconsole
emctl status secure setpasswd dbconsole
emctl config dbconsole -heap_size
emctl status agent
emctl status agent -secure [-omsurl
emctl getversion
emctl reload upload clearstate getversion agent
emctl reload agent dynamicproperties [
emctl config agent
emctl config agent updateTZ
emctl config agent getTZ
emctl resetTZ agent
emctl config agent credentials [
emctl gensudoprops
emctl clearsudoprops
Blackout Usage :
emctl start blackout
emctl stop blackout
emctl status blackout [
The following are valid options for blackouts
If -nodeLevel is specified after
Duration is specified in [days] hh:mm
emctl getemhome
emctl ilint
Em Key Commands Usage :
emctl config emkey -emkeyfile
emctl config emkey -emkey [-emkeyfile
emctl config emkey -repos [-emkeyfile
emctl config emkey -remove_from_repos [-sysman_pwd
emctl config emkey -copy_to_repos [-sysman_pwd
emctl status emkey [-sysman_pwd
Secure DBConsole Usage :
emctl secure dbconsole -sysman_pwd
[-host
[-root_dc
[-root_org
[-wallet
emctl secure status dbconsole
Register Targettype Usage :
emctl register oms targettype [-o