ASM disk and raw device mapping
If we need to know about the ASM disk and raw device mapping we can use the below script.
Script:
#!/bin/bash
for asmlibdisk in `ls /dev/oracleasm/disks/*`
do
echo "ASMLIB disk name: $asmlibdisk"
asmdisk=`kfed read $asmlibdisk | grep dskname | tr -s ' '| cut -f2 -d' '`
echo "ASM disk name: $asmdisk"
majorminor=`ls -l $asmlibdisk | tr -s ' ' | cut -f5,6 -d' '`
device=`ls -l /dev | tr -s ' ' | grep -w "$majorminor" | cut -f10 -d' '`
echo "Device path: /dev/$device"
done
If an ASMLIB disk was already deleted, then we cannot find it in /dev/oracleasm/disks. We can use below script to check for devices that are (or were) associated with ASM.
Script:
#!/bin/bash
for device in `ls /dev/sd*`
do
asmdisk=`kfed read $device | grep ORCL | tr -s ' ' | cut -f2 -d' ' | cut -c1-4`
if [ "$asmdisk" = "ORCL" ]
then
echo "Disk device $device may be an ASM disk"
fi
done
Reference:How to map device name to ASMLIB disk (Doc ID 1098682.1)
Script:
#!/bin/bash
for asmlibdisk in `ls /dev/oracleasm/disks/*`
do
echo "ASMLIB disk name: $asmlibdisk"
asmdisk=`kfed read $asmlibdisk | grep dskname | tr -s ' '| cut -f2 -d' '`
echo "ASM disk name: $asmdisk"
majorminor=`ls -l $asmlibdisk | tr -s ' ' | cut -f5,6 -d' '`
device=`ls -l /dev | tr -s ' ' | grep -w "$majorminor" | cut -f10 -d' '`
echo "Device path: /dev/$device"
done
If an ASMLIB disk was already deleted, then we cannot find it in /dev/oracleasm/disks. We can use below script to check for devices that are (or were) associated with ASM.
Script:
#!/bin/bash
for device in `ls /dev/sd*`
do
asmdisk=`kfed read $device | grep ORCL | tr -s ' ' | cut -f2 -d' ' | cut -c1-4`
if [ "$asmdisk" = "ORCL" ]
then
echo "Disk device $device may be an ASM disk"
fi
done
Reference:How to map device name to ASMLIB disk (Doc ID 1098682.1)
Finding Patch related to a Product in Oracle Apps
If we need to find patches applied related to a product then we can use the below script to find them.
SELECT *
FROM apps.ad_bugs
WHERE trackable_entity_abbr = '&product_name'
Example:
SELECT *
FROM apps.ad_bugs
WHERE trackable_entity_abbr = 'fnd'
SELECT *
FROM apps.ad_bugs
WHERE trackable_entity_abbr = '&product_name'
Example:
SELECT *
FROM apps.ad_bugs
WHERE trackable_entity_abbr = 'fnd'
Skipping a worker in adctrl
If somtimes required to skip any worker via adctrl then we can use the below steps to do the same.
1. Run adctrl utility
2. We can only see option till 7 in the main menu. But there is an 8th option that is hidden.
3. Use option 8 to skip a failed worker. Enter 8 and the worker will be skipped.
1. Run adctrl utility
2. We can only see option till 7 in the main menu. But there is an 8th option that is hidden.
3. Use option 8 to skip a failed worker. Enter 8 and the worker will be skipped.
Subscribe to:
Posts
(
Atom
)
No comments :
Post a Comment