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



Tuesday, August 14, 2018


Configuring sudo Access

  1. Log in to the system as the root user.
  2. Create a normal user account using the useradd command. Replace USERNAME with the user name that you wish to create.
    # useradd USERNAME
  3. Set a password for the new user using the passwd command.
    # passwd USERNAME
    Changing password for user USERNAME.
    New password: 
    Retype new password: 
    passwd: all authentication tokens updated successfully.
  4. Run the visudo to edit the /etc/sudoers file. This file defines the policies applied by the sudo command.
    # visudo
  5. Find the lines in the file that grant sudo access to users in the group wheel when enabled.
    ## Allows people in group wheel to run all commands
    # %wheel        ALL=(ALL)       ALL
  6. Remove the comment character (#) at the start of the second line. This enables the configuration option.
  7. Save your changes and exit the editor.
  8. Add the user you created to the wheel group using the usermod command.
    # usermod -aG wheel USERNAME
  9. Test that the updated configuration allows the user you created to run commands using sudo.
    1. Use the su to switch to the new user account that you created.
      # su USERNAME -
    2. Use the groups to verify that the user is in the wheel group.
      $ groups
      USERNAME wheel
    3. Use the sudo command to run the whoami command. As this is the first time you have run a command using sudo from this user account the banner message will be displayed. You will be also be prompted to enter the password for the user account.
      $ sudo whoami
      We trust you have received the usual lecture from the local System
      Administrator. It usually boils down to these three things:
      
          #1) Respect the privacy of others.
          #2) Think before you type.
          #3) With great power comes great responsibility.
      
      [sudo] password for USERNAME:
      root
      The last line of the output is the user name returned by the whoami command. If sudo is configured correctly this value will be root.
You have successfully configured a user with sudo access. You can now log in to this user account and use sudoto run commands as if you were logged in to the account of the root user.

Thursday, August 2, 2018


Configure Postfix SMTP relay office365 on OEL 6 & 7


https://linuxhowtoguide.blogspot.com/2017/03/how-to-configure-postfix-smtp-relay.html
https://www.onceuponanipsum.com/relay-mail-with-office-365-and-postfix/

Install Postfix using command below

[root@localhost ~]# yum install postfix cyrus-sasl-plain mailx

1. vi /etc/postfix/main.cf

relayhost = [smtp.office365.com]:587
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
smtp_use_tls = yes
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_generic_maps = hash:/etc/postfix/generic
#smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

2. vi /etc/postfix/sasl_passwd
[smtp.office365.com]:587 o365test@expolanka.com:P@ssw0rd

3. postmap /etc/postfix/sasl_passwd

4. chown root:postfix /etc/postfix/sasl_passwd

5. chmod 640 /etc/postfix/sasl_passwd

6. vi /etc/postfix/generic
    root@edbtest.expolanka.com o365test@expolanka.com

7. chown root:root /etc/postfix/generic

8. chmod 0600 /etc/postfix/generic

9. postmap /etc/postfix/generic

10. vi /etc/aliases
mailer-daemon:  postmaster
postmaster:     root
root:   o365test@expolanka.com


11. [root@localhost ~]# newaliases


12. service postfix restart

13. echo "this is a test gmail" | mail -s "test message gmail" prmdth@gmail.com
    echo "this is a test o365" | mail -s "test message o365" o365test@expolanka.com
    echo "This is the body of the email"| mail -r"o365 mail<o365test@expolanka.com>" -s "This is the subject(E-Mail from SMTP Relay) line" pramudithad@itx360.com

14. Troubleshoot
    tail -f /var/log/maillog

Wednesday, July 25, 2018


Linux NFS ( Network File Sharing) Method

NFS Config in Red Hat Portal

1. Put an entry to following file, which are going to share

>vi /etc/exports

/media/usb  *(rw)

Entry - /arcive/   *(rw)     

Note: r- read w- write


2. Restart the Network File Sharing service.

>service nfs restart

Or

>service nfs stop
>service nfs start



3. Destination Computer

>mount 192.168.6.19:/archive  /t

Note: t - local machine folder

>unmount /t





Tuesday, July 24, 2018


How to Disable Firewall on RHEL 6

In this post, i will show how to disable Linux Iptables Firewall on Red Hat Enterprise Linux 6 (RHEL 6). A Linux firewall on RHEL 6 can be configured to filter every network packet that passes into or out of network. In some cases such as testing and development environment, you will need to disable the iptables firewall. To disable linux iptables firewall on RHEL6, you just to execute the following commands :
1. Before stop the iptables, save the firewall setting using the following command :
[root@rhel6 ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
2. Stop iptables using the following command :
[root@rhel6 ~]# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
3. To ensure that iptables will not started at boot time, pleas execute this chkconfig command :
[root@rhel6 ~]# chkconfig iptables off
4. If IPv6 firewall is enabled, please disable it using the following commands :
[root@rhel6 ~]# service ip6tables save
ip6tables: Saving firewall rules to /etc/sysconfig/ip6table[  OK  ]
[root@rhel6 ~]# service ip6tables stop
ip6tables: Flushing firewall rules:                        [  OK  ]
ip6tables: Setting chains to policy ACCEPT: filter         [  OK  ]
ip6tables: Unloading modules:                              [  OK  ]
[root@rhel6 ~]# chkconfig ip6tables off

 RMAN Recovery Catalog About Recovery Catalog RMAN recovery catalog Is another database which is out of your normal databases or which is o...