Friday, April 20, 2012

Access windows folder from VM Machine

Create a new local mount point, eg:

mkdir /tmp/smbmnt

Enable netfs:

chkconfig netfs on
service netfs start


mount -t cifs -o username=user,password=Welcome //192.168.0.4/audit /tmp/smbmnt/


ln -s /myMountFolder/MyMountPoint /PathOfSymlink

username=user
password=Welcome

chmod 600 /root/smbpass.txt


//192.168.0.4/audit /tmp/smbmnt/ cifs credentials=/root/smbpass.txt 0 0

mount //192.168.0.4/audit

Access windows folder from VM Machine

Create a new local mount point, eg:

mkdir /tmp/smbmnt

Enable netfs:

chkconfig netfs on
service netfs start


mount -t cifs -o username=user,password=Welcome //192.168.0.4/audit /tmp/smbmnt/


ln -s /myMountFolder/MyMountPoint /PathOfSymlink

username=user
password=Welcome

chmod 600 /root/smbpass.txt


//192.168.0.4/audit /tmp/smbmnt/ cifs credentials=/root/smbpass.txt 0 0

mount //192.168.0.4/audit

Thursday, April 12, 2012

Gather Stats

10g

SQL> select
DBMS_STATS.GET_PARAM ('AUTOSTATS_TARGET'),
DBMS_STATS.GET_PARAM ('CASCADE'),
DBMS_STATS.GET_PARAM ('DEGREE'),
DBMS_STATS.GET_PARAM ('ESTIMATE_PERCENT'),
DBMS_STATS.GET_PARAM ('METHOD_OPT'),
DBMS_STATS.GET_PARAM ('NO_INVALIDATE'),
DBMS_STATS.GET_PARAM ('GRANULARITY')
from dual;


11g

SQL> select
DBMS_STATS.GET_PREFS ('AUTOSTATS_TARGET'),
DBMS_STATS.GET_PREFS ('CASCADE'),
DBMS_STATS.GET_PREFS ('DEGREE'),
DBMS_STATS.GET_PREFS ('ESTIMATE_PERCENT'),
DBMS_STATS.GET_PREFS ('METHOD_OPT'),
DBMS_STATS.GET_PREFS ('NO_INVALIDATE'),
DBMS_STATS.GET_PREFS ('GRANULARITY'),
DBMS_STATS.GET_PREFS ('PUBLISH'),
DBMS_STATS.GET_PREFS ('INCREMENTAL'),
DBMS_STATS.GET_PREFS ('STALE_PERCENT')
from dual;

10g:

select * from dba_scheduler_jobs where job_name = 'GATHER_STATS_JOB';
select * from dba_scheduler_job_run_details where job_name = 'GATHER_STATS_JOB';
select * from dba_scheduler_job_log where job_name = 'GATHER_STATS_JOB';

SQL> exec dbms_auto_task_admin.enable(client_name => 'auto optimizer stats collection', operation => null, window_name => null);
PL/SQL procedure successfully completed

SQL> exec dbms_auto_task_admin.disable(client_name => 'auto optimizer stats collection', operation => null, window_name => null);

10g:

DBMS_STATS.GET_PARAM('ESTIMATE_PERCENT')
---------------
DBMS_STATS.AUTO_SAMPLE_SIZE

SQL> exec dbms_stats.set_param('ESTIMATE_PERCENT','100');

PL/SQL procedure successfully completed.

SQL> SELECT dbms_stats.get_param('ESTIMATE_PERCENT') FROM dual;

DBMS_STATS.GET_PARAM('ESTIMATE_PERCENT')
---------------
100

SQL> exec dbms_stats.RESET_PARAM_DEFAULTS();

PL/SQL procedure successfully completed.

SQL> SELECT dbms_stats.get_param('ESTIMATE_PERCENT') FROM dual;

DBMS_STATS.GET_PARAM('ESTIMATE_PERCENT')
-------------------------------------------------------------------------------------
DBMS_STATS.AUTO_SAMPLE_SIZE

ADRCI

ADRCI 11g utility:

adrci> show alert -tail -f
adrci> show problem
adrci> show incident
adrci> show incident -mode detail -p "incident_id="incident_id""
adrci> show trace "trace file name"

create packages and zip files for oracle support:

It gather all the required information with a method called “Incident Packaging Service” (IPS):
adrci> ips create package problem 1 correlate all
adrci> ips generate package 1 in "/home/oracle"

Purging trace files automatically:

adrci> show tracefile -rt
adrci> show control

SHORTP_POLICY :Retention for ordinary trace files
LONGP_POLICY :Retention for like incident files

adrci> set control (SHORTP_POLICY = 360) ===>15days
adrci> set control (LONGP_POLICY = 2160) ===>90 Days
adrci> show control

Purging Trace files manually:

Following command will manually purge all tracefiles older than 2 days (2880 minutes):
adrci> purge -age 2880 -type trace
adrci> purge -age 129600 -type ALERT ===> purging ALERT older than 90 days
adrci> purge -age 43200 -type INCIDENT ===> purging INCIDENT older than 30 days
adrci> purge -age 43200 -type TRACE ===> purging TRACE older than 30 days
adrci> purge -age 43200 -type CDUMP ===> purging CDUMP older than 30 days
adrci> purge -age 43200 -type HM ===> purging HM older than 30 days
adrci> show tracefile -rt

Friday, April 6, 2012

Apps 11i

How to get Apps version?

SQL> select release_name from apps.fnd_product_groups;

RELEASE_NAME
--------------------------------------------------
11.5.10.2


Webserver/Apache Version:

[avis11i@apps VIS_apps]$ $IAS_ORACLE_HOME/Apache/Apache/bin/httpd -version
Server version: Oracle HTTP Server Powered by Apache/1.3.19 (Unix)
Server built: Feb 22 2005 18:51:19 (iAS 1.0.2.2.2 rollup 5)

Forms Version:

[avis11i@apps VIS_apps]$ $ORACLE_HOME/bin/f60run | grep Version | grep Forms
Forms 6.0 (Forms Runtime) Version 6.0.8.28.0 (Production)


Report Version:



Jinitiator Version:

[avis11i@apps VIS_apps]$ grep jinit_ver_comma $CONTEXT_FILE
1.6.0_24

Workflow version

SQL> select TEXT Version from apps.WF_RESOURCES where NAME = 'WF_VERSION';

VERSION
--------------------------------------------------------------------------------
2.6.0

Apps Scripts

To get Log and out file location:

select
req.request_id,req.logfile_name LOG, req.outfile_name OUT
FROM v$process pid,
v$session ses,apps.fnd_concurrent_requests req, fnd_concurrent_programs_tl prg ,
fnd_user fu
WHERE req.request_id IN (SELECT request_id
FROM fnd_conc_req_summary_v
WHERE phase_code IN ('R')
AND status_code IN ('R'))
AND req.oracle_process_id = pid.spid(+)
AND pid.addr = ses.paddr(+)
AND req.concurrent_program_id = prg.concurrent_program_id
AND req.requested_by = fu.user_id
and req.request_id=&request_id
ORDER
BY SID ;