Wednesday, 25 December 2013

Create .bat file which will open all files you wanted when you logon

run.bat
start C:\Program Files\Microsoft Office\Office12\excel.exe  file1.xls
start C:\Program Files\Microsoft Office\Office12\excel.exe  file2.xls
....more command

Put .bat file in Startup folder


C:\Users\xxxx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ru.bat

REM copy all files from source to destination based on changed file, also it overwrite existing file based on latest update file from source

maint.bat
start xcopy c:\docs d:\cocs  /D /E /Y

Autosys- If jobs fails but its still successs in autosys.

If you have situation where your autosys calls any Shell script and it gets failed but still it says success in autosys dashboard, then you need to check exit statement in shell script (any code other that 0 autosys counts as failure)

e.g.

If [ expression]; then
        echo "Job failed"
        exit 1
else
        echo "Job success"
        exit 0
fi.

Sunday, 8 December 2013

Parameter need to Change for Performance Tuning

Below setting can Improve overall performance of whole DB's


Default values 
optimizer_index_cost_adj=100  --> Low value means index scan is less costly (Low value force index use)
optimizer_index_caching=0     --> High cache means more chance for nested loop first in below loop style
 
  • Nested loop joins
  • Hash join access
  • Full-index scans
  • Full-table scan access 
 
I have a query that performs bad (did not return after more than one minute). 
After I issued the following if worked well.
alter session set optimizer_index_cost_adj=5
alter session set optimizer_index_caching=90
 
Can use hint in sql statement.
 
 
select /*+ opt_param('optimizer_mode','first_rows_10') */ col1, col2 . . .
select /*+ opt_param('optimizer_index_cost_adj',20) */ col1, col2 . .