Tuesday 4 October 2016

Cleanup ASM DISK Header Status

SQL> select header_status, path FROM V$ASM_DISK where header_status like 'FORMER';

HEADER_STATU PATH
------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FORMER       /dev/vx/rdsk/dev_data_dg/raw66g40301
FORMER       /dev/vx/rdsk/dev_data_dg/raw66g40302



bash-3.2$  dd if=/dev/zero of=/dev/vx/rdsk/dev_data_dg/raw66g40301 bs=1024 count=50
bash-3.2$ dd if=/dev/zero of=/dev/vx/rdsk/dev_data_dg/raw66g40301 bs=1024 count=50
50+0 records in
50+0 records out
bash-3.2$ dd if=/dev/zero of=/dev/vx/rdsk/dev_data_dg/raw66g40302 bs=1024 count=50
50+0 records in
50+0 records out



SQL> select header_status, path FROM V$ASM_DISK where header_status like 'CANDIDATE';

HEADER_STATU PATH
------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CANDIDATE    /dev/vx/rdsk/dev_data_dg/raw66g40302
CANDIDATE    /dev/vx/rdsk/dev_data_dg/raw66g40301

Tuesday 12 April 2016

SP2-0667: Message file sp1.msb not found and SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory


SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

After Installing or Upgrading 12C or 11G you may get this error while connecting to sqlplus utility,  this error is because your sqlplus is not in your path.

Issue below commands and then retry.

export ORACLE_SID="Name of Database"
export ORACLE_HOME="Location of your home"
export PATH=$ORACLE_HOME/bin:$PATH.

Thanks.

Tuesday 2 February 2016

Query to find Trace file name from Concurrent Request ID

column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off

SELECT 'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name:
'||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id||'.trc',
'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running')
||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#,
'Module : '||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;