Thursday, 6 February 2014

RMAN STATUS from db

select session_key,
       input_type,
       status,
       to_char(start_time,'yyyy-mm-dd hh24:mi') start_time,
       to_char(end_time,'yyyy-mm-dd hh24:mi')   end_time,
       output_bytes_display,
       time_taken_display
from v$rman_backup_job_details
order by session_key asc;

http://oracledbabhuvan.blogspot.in/2011/11/rman-query-to-find-backup-details.html

gathering schema status of object


select count(*) from dba_tables where  owner != 'SYS' and 
to_char(last_analyzed,'DD/MM/YYYY HH24:MI:SS') > '09/04/2012 16:017:052 '

select sysdate-1/24 from dual

DBA with linux

intora file location /test/TEST/testdb/tech_st/11.1.0/dbs

adpatch   log file location /test/TEST/testapps/apps_st/appl/admin/TEST/log


strings -a APListXml.xml |grep '$Header'




[applerpp@finprod10 AP_Diag]$ cd $AP_TOP
Find file in Unix
[applerpp@finprod10 12.0.0]$ find . -name apgdfalb.pls
./patch/115/sql/apgdfalb.pls
[applerpp@finprod10 12.0.0]$ cd patch/115/sql/
Find Version of File
[applerpp@finprod10 sql]$ strings -a apgdfalb.pls | grep '$Header'
/* $Header: apgdfalb.pls 120.1 2008/03/10 09:49:15 serabell noship $ */

[testappl@finprod10 sql]$ strings -a apgdfalb.pls |grep '$Header'
/* $Header: apgdfalb.pls 120.1.12010000.30 2011/01/30 06:53:42 gagrawal ship $ *

$ORACLE_HOME
/test/TEST/testapps/tech_st/10.1.2

TRACE FILE LOCATION
$FORMS_TRACE_DIR

 /test/TEST/testinst/apps/TEST_finprod10/logs/ora/10.1.2/forms



ls -l
du -h
pwd cd ..
cd


To find environment variable

printenv

$appl_top

background_dump_dest

core_dump_dest

user_dump_dest



Kill process
cd /data/ERPP/erppdb/tech_st/11.1.0/admin/ERPP_finprod10/diag/rdbms/erpp/ERPP/trace
tail -100f  alert.log


list oracle process
ps -ef |grep LOCAL=NO

command is to see oracle instance process on linux server
ps- ef | grep pmon
export ORACLE_SID=orcl

ps -ef|grep testora|grep LOCAL=NO
kill -9 PID

kill all proesses
kill -9 ps -ef|grep LOCAL=NO|grep INSTANCE NAME|awk ‘{print $2}’`

Loaction of arch log
Prod
/data/ERPP_dbarch1/database/ERPP/arch
Test
/test/ERPP_dbarch2/database/ERPP/arch

zip the files
gzip *.arc

HTML FORMAT Report Coversion in R12





BINARY TO HTML FORMAT
java -cp $ORACLE_HOME/forms/java/frmxlate.jar oracle.forms.diagnostics.Xlate datafile=forms_31560.trc outputfile=trace_forms_31560.html outputclass=WriteOutHTML

java -cp $ORACLE_HOME/forms/java/frmxlate.jar oracle.forms.diagnostics.Xlate datafile=forms_31560.trc outputfile=trace_forms_31560.html outputclass=WriteOutHTML


How To Collect And Use Forms Trace (FRD) in Oracle Applications Release 12 [ID 373548.1]


$ORACLE_HOME
/test/TEST/testapps/tech_st/10.1.2

TRACE FILE LOCATION
$FORMS_TRACE_DIR

 /test/TEST/testinst/apps/TEST_finprod10/logs/ora/10.1.2/forms




----------------------------------------
ls -l
du -h
pwd cd ..
cd
--------------------------------------

1.Generate  Trace file
Profile -> System
USER SYSADMIN
PARAMETER  Forms Runtime Parameters

record=forms tracegroup=medium

Reproduce the error and check trc file

BINARY TO HTML FORMAT
java -cp $ORACLE_HOME/forms/java/frmxlate.jar oracle.forms.diagnostics.Xlate datafile=forms_31560.trc outputfile=trace_forms_31560.html outputclass=WriteOutHTML

java -cp $ORACLE_HOME/forms/java/frmxlate.jar oracle.forms.diagnostics.Xlate datafile=forms_31560.trc outputfile=trace_forms_31560.html outputclass=WriteOutHTML

=====================================================================================================

Forms Runtime Diagnostics (FRD)
Profile -> System
USER SYSADMIN
PARAMETER  Forms Runtime Parameters
record=collect

after changing parameter in profile for sysadmin user

restart apps
stop_appltest

start_appltest

login as sysadmin

after logout collect_Processid file is created in $FORMS_TRACE_DIR

no need to convert collect file.
=====================================================

How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]


How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
TKPROF filename_source filename_output EXPLAIN=[username/password] SYS=[YES/No] TABLE=[tablename]
$tkprof raw_trace_file.trc output_file explain=apps/apps
sort=(exeela,fchela) sys=no
Where:
raw_trace_file.trc: Name of trace file
output_file:        tkprof out file
explain:            This option provides the explain plan for the sql  
                   statements
sort:               This provides the sort criteria in which all sql  
                   statements will be sorted.  This will bring the bad
sql at  
                   the top of the outputfile.
sys=no:             Disables sql statements issued by user SYS
TKPROF_APPS.htm For R12
TKPROF.htm For Database
tkprof  ERPP_ora_16286_i351307.trc output_file_name explain =apps/apps sys=no

INVALID OBJECTS IN R12




http://onlineappsdba.com/index.php/2010/06/03/how-to-compile-apps-schema-invalid-objects-in-r12/

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=314538.1

http://myappsdba.com/how-to-compile-apps-forms-library-modules-or-pll-files-in-11i-applications/


1. How many invalid objects are in the Database ?


select owner,object_type,COUNT(*)
from dba_objects
where owner = 'APPS'
and status = 'INVALID'"
from dba_objects
where status='INVALID'
group by owner, object_type;


select object_name,object_type,owner
from dba_objects
where owner = 'APPS'
and status = 'INVALID'


2. Check for details about the invalid objects :

column owner format A9
column object_name format A31
column object_type format A15
column last_ddl_time format A10
spool invalids.lst
select OWNER, OBJECT_NAME,OBJECT_TYPE,LAST_DDL_TIME
from dba_objects where status='INVALID'
order by owner;



Validating invalid objects

invalid objects in the E-Business Suite Environment 11i and 12.mht

Compile_Objects_apps_schema_files.mht Using adadmin

Recomplie_FORM_LIB_PLL_Using_Adadmin.mht Using adadmin

linux cmd



Location of arch files in prod
cd /data/ERPP_dbarch1/database/ERPP/arch
Location of arch files in test
 cd /test/ERPP_dbarch2/database/ERPP/arch/


count of number of files

ls -l *.arc |wc -l

find files that are more than 90 days
count the size of specic files find *.arc -mtime +90
du -c -h *.arc

zip the files
gzip *.arc


ls - lrth

tail  -100f


crontab -l

free -m
cat /proc/meminfo
top -c

vmstat


strings -a $AU_TOP/forms/US/sachin_test.fmb | grep '$Header

find . -name file name

locate exact_file_name

df -h

VIEW ORACLE INSTANCE ON LINUX
ps -ef|grep pmon
echo $ORACLE_SID
export Oracle_SID=TEST

calling sqlplus in testora

. /test/TEST/testdb/tech_st/11.1.0/TEST_finprod10.env
which located in start_oratest

Kill process
cd /data/ERPP/erppdb/tech_st/11.1.0/admin/ERPP_finprod10/diag/rdbms/erpp/ERPP/trace
tail -100f  alert.log view log
/test/TEST/testdb/tech_st/11.1.0/admin/TEST_finprod10/diag/rdbms/test/TEST/trace

list oracle process
ps -ef |grep LOCAL=NO ps -ef|grep FNDLBR

command is to see oracle instance process on linux server
ps- ef | grep pmon
export ORACLE_SID=orcl

ps -ef|grep testora|grep LOCAL=NO
kill -9 PID kill pid no

kill all proesses
kill -9 ps -ef|grep LOCAL=NO|grep INSTANCE NAME|awk ‘{print $2}’`


remove files from weekly retention

on month basis

List of file in Jul Month
ls -lrth *201207*

Total size of files in Jul Month
du -c -h *201207*

Remove files in Jul Month
rm -f *201207*

rm -f *20120701*

`