- Community of Sharing

Click here for Online Oracle 8i, 9i, 10g, 11g and 12c Training


January 22, 2018, 06:47:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1] |   Go Down
  Send this topic  |  Print  
Author Topic: ASM notes to know  (Read 217 times)
Posts: 1

« on: September 12, 2017, 03:35:41 PM »


# fdisk -l
# parted -l
# lsblk -f
# lsblk -o NAME
# lshw

Grid infrastructure - Oracle restart and ASM
1 Partition a disk use oracleasm to label the disk for ASM use and Discovery

SQL> ... v$asm_disk   diskgroup
oracleasm createdisk asmdisk01 /dev/sdb1
scandisks -s
ll /dev/oracleasm/disks

As the root
# rpm -ivh  oracleasm         ASMlib
# oracleasm configure -i
Default user oracle, Default group dba, start and boot YES
# oracleasm init

# cat /proc/partitions    check partition known to OS
# fdisk /dev/sda
# cat /proc/partitions

# oracleasm createdisk DATA1 /dev/sda1
# oracleasm listdisks

# ls -l  /dev/oracleasm/disks       check mounted in the filesystem

Install Grid infrastructure
Create grid user primary group oinstall secondary asmdba
As the grid user
# cd /stage/grid/Disk1
# ./runInstaller
User sys has granted sysasm privilege
/app/grid     for Oracle base

Configure EM database control
Port 1522 for ASM instane     1521 was used the database instance

Use OEM or EM dbconsole emctl start dbconsole
Check migrate to ASM option and configure +ASM instance as a target

Enable Grid infrastructure features
Enable Oracle Restart
Move datafiles to ASM storage

Enable Oracle Restart
# emctl stop dbconsole
# pgrep  -lf  sndbox             to check instance processes
# pgrep  -lf  ASM
# pgrep  -lf  tns                     to check listeners
Shutdown database instance and listener
Shutdown  ASM instance  and listener

As the root user
# chkconfig  --list
# chkconfig  --list  dbora
# chkconfig  --del  dbora

As the grid user
# env l  grep ORACLE
# crsctl status/start/stop has            high availability services
# srvctl remove listener -l  LISTENER
# gedit or vi $ORACLE_HOME/network/admin/listener.ora

Add listener to Oracle restart configuration
# srvctl add listener -l  LISTENERASM  -p "TCP:1522"  -o $ORACLE_HOME
# srvctl  config asm
# srvctl  remove asm
# srvctl  add asm -l  LISTENERASM -p  .../spfile+ASM.ora
# srvctl  add database -d  sndbox  -o  /app/oracle/product/.../Db_1
# srvctl  config asm
# srvctl start asm
# pgrep -lf ASM
# pgrep -lf  tns
Start database instance and listener
# srvctl start database -o sndbox

To move spfile
# srvctl stop database -d sndbox
# srvctl stop diskgroup  -g  DATA

As the grid user
# asmcmd  spmove
# srvctl config asm

ASMCMD> shutdown or startup                        the ASM instance
ASMCMD> spget                                                    get spfile location

Steps to migrate
Pages: [1] |   Go Up
  Send this topic  |  Print  
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!