Friday, September 28, 2018

    Disabling Network Manager

  1. Verify Network Manager is currently enabled using the chkconfig command.
    # chkconfig --list NetworkManager
    The output displayed by the chkconfig command inicates whether or not the Network Manager service is enabled.
    • The system displays an error if the Network Manager service is not currently installed:
      error reading information on service NetworkManager: No such file or directory
      If this error is displayed then no further action is required to disable the Network Manager service.
    • The system displays a list of numerical run levels along with a value of on or off indicating whether the Network Manager service is enabled when the system is operating in the given run level.
      NetworkManager  0:off 1:off 2:off 3:off 4:off 5:off 6:off
      If the value displayed for all run levels is off then the Network Manager service is disabled and no further action is required. If the value displayed for any of the run levels is on then the Network Manager service is enabled and further action is required.
  2. Ensure that the Network Manager service is stopped using the service command.
    # service NetworkManager stop
  3. Ensure that the Network Manager service is disabled using the chkconfig command.
    # chkconfig NetworkManager off
  4. Open each interface configuration file on the system in a text editor. Interface configuration files are found in the /etc/sysconfig/network-scripts/ directory and have names of the form ifcfg-X where X is replaced by the name of the interface. Valid interface names include eth0p1p5, and em1.
    In each file ensure that the NM_CONTROLLED configuration key is set to no and the ON_BOOT configuration key is set to yes.
    NM_CONTROLLED=no
    ONBOOT=yes
    This action ensures that the standard network service will take control of the interfaces and automatically activate them on boot.
  5. Ensure that the network service is started using the service command.
    # service network start
  6. Ensure that the network service is enabled using the chkconfig command.
    # chkconfig network on
The Network Manager service has been disabled. The standard network service has been enabled and configured to control the required network interfaces.

Sql query to find all scheduled concurrent request



SELECT DISTINCT frl.responsibility_name,
fu.user_name,
fcr.request_id,
(SELECT meaning
FROM apps.fnd_lookups
WHERE lookup_type='CP_PHASE_CODE'
AND lookup_code =fcr.phase_code
) Phase,
(SELECT meaning
FROM apps.fnd_lookups
WHERE lookup_type='CP_STATUS_CODE'
AND lookup_code =fcr.status_code) Status,
fcs.program,
to_date(fcr.requested_start_date,'DD-MM-RRRR hh24:mi:ss') Start_Date,
fcr.resubmit_interval || ' ' ||fcr.resubmit_interval_unit_code Resubmit_Interval,
NVL2(fcr.resubmit_interval,'PERIODICALLY',NVL2(fcr.release_class_id, 'ON SPECIFIC DAYS','ONCE')) schedule_type,
fcs.argument_text
FROM apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs_tl fcp,
apps.fnd_responsibility_tl frl,
apps.fnd_user fu,
apps.fnd_conc_req_summary_v fcs
WHERE fcr.phase_code ='P'
AND fcr.request_id = fcs.request_id
AND frl.language ='US'
AND fcr.requested_by =fu.user_id
AND fcr.responsibility_id =frl.responsibility_id
AND fcr.status_code IN ('P','Q','I')
AND fcp.language ='US'
AND fcp.source_lang ='US'
AND (NVL(fcr.request_type, 'X') != 'S')
AND fcr.concurrent_program_id =fcp.concurrent_program_id
AND fcr.requested_start_date >= SYSDATE
--AND to_date(fcr.requested_start_date,'DD-MM-RRRR hh24:mi:ss')
--BETWEEN NVL(to_date(:p_from_date,'DD-MM-RRRR hh24:mi:ss'),fcr.requested_start_date) AND NVL(to_date(:p_to_date,'DD-MM-RRRR hh24:mi:ss'),fcr.requested_start_date)
ORDER BY program DESC

Tuesday, September 25, 2018



Get a list of all functions and procedures in an Oracle database



SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE IN ('FUNCTION','PROCEDURE','PACKAGE')
The column STATUS tells you whether the object is VALID or INVALID. If it is invalid, you have to try a recompile, ORACLE can't tell you if it will work before.

Thursday, September 20, 2018


OS Watcher Install & Run

Installing OSWbb

To install OSWbb:
  1. Log on to My Oracle Support (MOS) at https://support.oracle.com.
  2. Download the file oswbb601.tar, which is available at https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=301137.1:OSW_file.
  3. Copy the file to the directory where you want to install OSWbb, and run the following command:
    # tar xvf oswbb601.tar

    Extracting the tar file creates a directory named oswbb, which contains all the directories and files that are associated with OSWbb, including the startOSWbb.sh script.
  4. If the ksh package is not already installed on your system, use yum to install it.
    # yum install ksh
  5. Create a symbolic link from /usr/bin/ksh to /bin/ksh.
    # ln -s /bin/ksh /usr/bin/ksh

    This link is required because the OSWbb scripts expect to find ksh in /usr/bin.
  6. To enable the collection of iostat information for NFS volumes, edit the OSWatcher.sh script in the oswbb directory, and set the value of nfs_collect to 1:
    nfs_collect=1

Running OSWbb

To start OSWbb, run the startOSWbb.sh script from the oswbb directory.
# ./startOSWbb.sh [frequency duration]
The optional frequency and duration arguments specifying how often in seconds OSWbb should collect data and the number of hours for which OSWbb should run. The default values are 30 seconds and 48 hours. The following example starts OSWbb recording data at intervals of 60 seconds, and has it record data for 12 hours:
# ./startOSWbb.sh 60 12
Testing for discovery of OS Utilities
.
.
.
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Testing for discovery of OS CPU COUNT
.
.
.
Starting Data Collection...
oswbb heartbeat: date/time
oswbb heartbeat: date/time + 60 seconds
.
.
.
To stop OSWbb prematurely, run the stopOSWbb.sh script from the oswbb directory.
# ./stopOSWbb.sh
OSWbb collects data in the following directories under the oswbb/archive directory:
Directory
Description
oswiostat
Contains output from the iostat utility.
oswmeminfo
Contains a listing of the contents of /proc/meminfo.
oswmpstat
Contains output from the mpstat utility.
oswnetstat
Contains output from the netstat utility.
oswprvtnet
If you have enable private network tracing for RAC, contains information about the status of the private networks.
oswps
Contains output from the ps utility.
oswslabinfo
Contains a listing of the contents of /proc/slabinfo.
oswtop
Contains output from the top utility.
oswvmstat
Contains output from the vmstat utility.
OSWbb stores data in hourly archive files named system_name_utility_name_timestamp.dat, and each entry in a file is preceded by the characters *** and a timestamp.


Tuesday, September 18, 2018


The Node Manager is already up.ERROR:
Unable to start up the managed server forms_server1

Oracle Apps R12 (12.2.2.5) Application startup after the clone

How to solve java.lang.OutOfMemoryError: unable to create new native thread


Solution

Check number of processes per user


$ ps -elf | wc -l

220


-------------------------------------------------------------------------------------
If you try to run ps with a -T you will see all of the threads as well:


$ ps -elfT | wc -l
385


-------------------------------------------------------------------------------


you need to increase the number of processes for the user. This can be done with the following command:



$ ulimit -u 4096


----------------------------------------------------------------------------



Check your threads PID limit

Once that you have counted the number of threads, then you should verify that you are not hitting system limits, specified by the kernel.pid_max limit parameter. You can check this value by executing:


$ sysctl -a | grep kernel.pid_max

kernel.pid_max = 32768



-----------------------------------------------------------------





Tuesday, September 4, 2018


AWR ADDM and ASH Report Generation in 11g | Oracle Performance Tuning


1) AWR Report:

Before creating any single report, make sure snapshot capturing is enable on your database. If not, you can run the below mentioned command to create one:

exec dbms_workload_repository.create_snapshot;

The Report will be generated on the basis of the snapshots taken. Take 4-5 snapshots or run the above mentioned command to create snapshots each in 5 minutes duration at least. Run the below mentioned query to check the snapshots created in your database,

SQL> select snap_id, snap_level, to_char(begin_interval_time, 'dd/mm/yy hh24:mi:ss') begin from dba_hist_snapshot order by 1;

   SNAP_ID SNAP_LEVEL BEGIN
---------- ---------- -----------------
       465          1 19/07/17 18:30:50
       466          1 19/07/17 18:41:57
       467          1 19/07/17 19:07:33
       468          1 19/07/17 19:08:30

Now find the below mentioned guidelines to check the creation of AWR Report,

SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql

You can create snap using the below
EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;

Below query help to find snaps information
select snap_id,BEGIN_INTERVAL_TIME,END_INTERVAL_TIME from dba_hist_snapshot where BEGIN_INTERVAL_TIME > systimestamp -1 order by BEGIN_INTERVAL_TIME desc;

2) ADDM Report:

Below mentioned is the script run to generate ADDM Report

SQL> @$ORACLE_HOME/rdbms/admin/addmrpt.sql

3) ASH Report:

SQL> @$ORACLE_HOME/rdbms/admin/ashrpt.sql


Monday, September 3, 2018



ORA-01555: snapshot too old: rollback segment number 41 with name "_SYSSMU41_1930078339$" too small



SQL> select (62057/60)/60 query,(25000/60)/60 retention
  2    from dual
  3  /

     QUERY  RETENTION
---------- ----------
17.2380556 6.94444444
Yours query exectuing tenure is 17 hours while yours undo retention is approximate 7 hours,change yours retention period to 20% extra with yours query execution tenure and then check yours query again.

atleast set undo retention to 7500


SQL> show parameter undo_retention

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_retention                       integer     900

-----------------------------------------------------------------------------------------------------------------

SQL>  alter system set undo_retention=75000 scope=both;

System altered.

--------------------------------------------------------------------------------------------------------------------------------

SQL> show parameter undo_retention

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_retention                       integer     75000



  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...