Thursday 21 June 2018

PDB Tips

List pdbs show pdbs select * from v$pdbs; # All PDB (inc. size) col name for a30 select name, open_mode, total_size/1024/1024 as size_mb from v$pdbs where name like '%'; PDB sessions, pdb connections, pdb sess col name for a20 col username for a32 col machine for a20 select s.inst_id, p.name, s.username, s.machine, count(*) as "SESSION COUNT" from gv$session s, gv$pdbs p where p.con_id = s.con_id and s.inst_id = p.inst_id group by s.inst_id, p.name, s.username, s.machine order by p.name, s.machine; -- List only STG_BIZ_X select s.inst_id, p.name, s.username, s.machine, s.sid, s.serial#, s.status from gv$session s, gv$pdbs p where p.con_id = s.con_id and s.inst_id = p.inst_id and p.name = 'STG_BIZ_X'; INST_ID NAME USERNAME MACHINE SID SERIAL# STATUS ------- ------------- ------------- ------------ --------- ------- -------- 1 STG_BIZ_X SYS ukdevdb017 442 28213 ACTIVE 1 STG_BIZ_X C##JPTADMIN ukdevdb602 777 56244 KILLED 2 STG_BIZ_X C##JPTADMIN ukdevdb601 66 64486 KILLED 2 STG_BIZ_X SYS ukdevdb017 1959 13580 ACTIVE 2 STG_BIZ_X C##JPTADMIN ukdevdb602 1961 46827 KILLED

Grid installation prerequisites

Getting error

[grid@proddev1 ~]$ cd /u01/app/grid/12201 [grid@proddev1 12201]$ ./runcluvfy.sh stage -pre crsinst -n proddev1,proddev2 -fixup -verbose ERROR: PRVG-10467 : The default Oracle Inventory group could not be determined. Verifying '/tmp/' ...FAILED (PRVG-1901) Pre-check for cluster services setup was unsuccessful on all the nodes. Failures were encountered during execution of CVU verification request "stage -pre crsinst". Verifying '/tmp/' ...FAILED PRVG-1901 : failed to setup CVU remote execution framework directory "/tmp/CVU_12.2.0.1.0_grid/" on nodes "proddev1" trprdbr04017: Version of exectask could not be retrieved from node "trprdbr04017" trprdbr04017: Version of exectask could not be retrieved from node "trprdbr04017" CVU operation performed: stage -pre crsinst Date: Jun 21, 2018 9:37:11 AM CVU home: /u01/app/grid/12201/ User: grid


FIX: Correct the fstab, to make sure, its like below exactly

[root@proddev1 ~]# more /etc/fstab |grep -E "/tmp | /opt" /dev/mapper/vg_apol-lv_tmp /tmp ext3 defaults,nodiratime,nodev,nosuid 1 2 /dev/mapper/vg_otc0-lv_opt /opt ext3 defaults,nodiratime,nodev 1 2