Sunday, August 28, 2016

Deleting the managed servers in EBS R12.2:



perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-delete-managedserver \
-contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=oacore_server1 \
-servicetype=oacore \
-logfile=/tmp/oacore_server1_remove.log

perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-delete-managedserver \
-contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=forms_server1 \
-servicetype=forms \
-logfile=/tmp/forms_server1_remove.log

perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-delete-managedserver \
-contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=oafm_server1 \
-servicetype=oafm \
-logfile=/tmp/oafm_server1_remove.log

perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-delete-managedserver \
-contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=forms-c4ws_server1 \
-servicetype=forms-c4ws \
-logfile=/tmp/forms-c4ws_server1_remove.log

Adding the managed servers in EBS R12.2:


perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-create-managedserver -contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=oacore_server1 -servicetype=oacore \
-managedsrvport=7206 -logfile=/tmp/forms_server1_add.log


perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-create-managedserver -contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=forms_server1 -servicetype=forms \
-managedsrvport=7406 -logfile=/tmp/forms_server1_add.log


perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-create-managedserver -contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=oafm_server1 -servicetype=oafm \
-managedsrvport=7606 -logfile=/tmp/oafm_server1_add.log

perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
ebs-create-managedserver -contextfile=/oracle/product/ebs/fs1/inst/apps/TEST_muthu/appl/admin/TEST_muthu.xml \
-managedsrvname=forms-c4ws_server1 -servicetype=forms-c4ws \
-managedsrvport=7806 -logfile=/tmp/forms-c4ws_server1_add.log


Finally mod_wl_ohs.conf configuration file generate step


perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl \
-ctxfile=$CONTEXT_FILE -outfile=/tmp/apachesync.log

19 Awesome practical ps command examples


ps (process status) command will display information of all active processes. Here i’m going to explain all the possible examples about ps command and their usage, When you read this article you will definitely get more details about ps command.

Syntax of PS :

Syntax :# ps [Option]

Options of ps command.

e : To display all the processes.
f : To display full format listing.
F : To display extra full format
l : To display long listing
y : To change the (-l) option output
x : processes w/o controlling ttys
u : Print the output by UID
a : all w/ tty, including other users
C : To display the output by command name
p : To display the output by PID
j : job control
o : user-defined
ppid : To display the output by ppid

1) List Currently Running Processes only.

ps (process status) command is used to display the current process running on your system. The below example shows PID, TTY, TIME and command details.
# ps -e
  PID TTY          TIME CMD
    1 ?        00:05:05 init
    2 ?        00:01:07 kthreadd
    3 ?        00:00:51 migration/0
    4 ?        00:01:06 ksoftirqd/0
    5 ?        00:00:00 migration/0
 2217 ?        01:20:40 nagios
 4550 ?        00:00:00 mysqld_safe
 4633 ?        00:03:19 mysqld
 4682 ?        00:00:00 pure-ftpd
 4684 ?        00:00:00 pure-authd
 5441 ?        00:00:00 dovecot
 5451 ?        00:00:00 pop3-login
 5452 ?        00:00:00 imap-login
 .
 .
 32263 ?        00:00:38 httpd

2) List Currently Running Processes with details.

ps command is used to display the current process running on your system. The below example shows full format listing.
# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Jun19 ?        00:05:05 /sbin/init
root         2     0  0 Jun19 ?        00:01:07 [kthreadd]
root         3     2  0 Jun19 ?        00:00:51 [migration/0]
root         4     2  0 Jun19 ?        00:01:06 [ksoftirqd/0]
named    26458     1  0 Dec02 ?        00:00:07 /usr/sbin/named -u named
.
.
root     32237     1  0 Dec02 ?        00:00:28 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root     32263     1  0 Dec07 ?        00:00:38 /usr/local/apache/bin/httpd -k start -DSSL

3) List Currently Running Processes with more details.

ps command is used to display the current process running on your system. The below command is shows more column output compare with above command.
# ps -eF
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root         1     0  0  4839  1004   3 Jun19 ?        00:05:05 /sbin/init
root         2     0  0     0     0   1 Jun19 ?        00:01:07 [kthreadd]
root         3     2  0     0     0   0 Jun19 ?        00:00:51 [migration/0]
root         4     2  0     0     0   0 Jun19 ?        00:01:06 [ksoftirqd/0]
root         5     2  0     0     0   0 Jun19 ?        00:00:00 [migration/0]
root         6     2  0     0     0   0 Jun19 ?        00:00:12 [watchdog/0]
root         7     2  0     0     0   1 Jun19 ?        00:01:08 [migration/1]
root         8     2  0     0     0   1 Jun19 ?        00:00:00 [migration/1]
.
.
root     32237     1  0 27573   888   0 Dec02 ?        00:00:28 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root     32263     1  0 19608  7804   0 Dec07 ?        00:00:38 /usr/local/apache/bin/httpd -k start -DSSL

4) List Currently Running Processes with more details.

ps command is used to display the current process running on your system. The below command is shows more column output compare with above command.
# ps -ely
S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD
S     0     1     0  0  80   0  1004  4839 poll_s ?        00:05:05 init
S     0     2     0  0  80   0     0     0 kthrea ?        00:01:07 kthreadd
S     0     3     2  0 -40   -     0     0 migrat ?        00:00:51 migration/0
S     0     4     2  0  80   0     0     0 ksofti ?        00:01:06 ksoftirqd/0
S     0     5     2  0 -40   -     0     0 cpu_st ?        00:00:00 migration/0
S     0     6     2  0 -40   -     0     0 watchd ?        00:00:12 watchdog/0
S     0     7     2  0 -40   -     0     0 migrat ?        00:01:08 migration/1
.
.
S     0 32194     1  0  80   0  1068 28120 poll_s ?        00:00:00 abrtd
S     0 32237     1  0  80   0   888 27573 hrtime ?        00:00:28 abrt-dump-oops
S     0 32263     1  0  80   0  7804 19608 poll_s ?        00:00:38 httpd

5) List Currently Running Processes using BSD syntax.

Use the below command to see the current running process using BSD syntax.
# ps -ax
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     5:05 /sbin/init
    2 ?        S      1:07 [kthreadd]
    3 ?        S      0:51 [migration/0]
    4 ?        S      1:06 [ksoftirqd/0]
    5 ?        S      0:00 [migration/0]
    6 ?        S      0:12 [watchdog/0]
 .
 .
32237 ?        Ss     0:28 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
32263 ?        Ss     0:38 /usr/local/apache/bin/httpd -k start -DSSL

6) List Currently Running Processes using BSD syntax with more option.

Use the below command to see the current running process using BSD syntax with more option.
# ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19356  1004 ?        Ss   Jun19   5:05 /sbin/init
root         2  0.0  0.0      0     0 ?        S    Jun19   1:07 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Jun19   0:51 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Jun19   1:06 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Jun19   0:00 [migration/0]
.
.
root     32237  0.0  0.0 110292   888 ?        Ss   Dec02   0:28 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root     32263  0.0  0.0  78432  7804 ?        Ss   Dec07   0:38 /usr/local/apache/bin/httpd -k start -DSSL

7) List the Process using UID

ps command is used to display the current process running on your system. The below example list the process with given UID and binded the username
# ps -f -u sshd
UID        PID  PPID  C STIME TTY          TIME CMD
sshd     17685 17684  0 Jul13 ?        00:00:00 sshd: unknown [net]
sshd     26683 26682  0 Sep08 ?        00:00:00 sshd: root [net]
sshd     31198 31195  0 Sep01 ?        00:00:00 sshd: unknown [net]

8) How to list more then one Process using UID

ps command is used to display the current process running on your system. For morethen one UID, use comma to separate it. The below example list the more then one process with UID and binded the username.
# ps -f -u sshd,mysql
UID        PID  PPID  C STIME TTY          TIME CMD
mysql     4633  4550  0 Dec19 ?        00:03:20 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/server.2daygeek.com
sshd     17685 17684  0 Jul13 ?        00:00:00 sshd: unknown [net]
sshd     26683 26682  0 Sep08 ?        00:00:00 sshd: root [net]
sshd     31198 31195  0 Sep01 ?        00:00:00 sshd: unknown [net]

9) List the Process using commands.

You can list the process using particular command, The below example list the process which was binded with httpd command.
# ps -f -C httpd
UID        PID  PPID  C STIME TTY          TIME CMD
nobody   24822 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody   24823 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody   24824 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody   24825 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody   24826 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody   24889 32263  0 12:07 ?        00:00:00 /usr/local/apache/bin/httpd -k start -DSSL
root     32263     1  0 Dec07 ?        00:00:38 /usr/local/apache/bin/httpd -k start -DSSL
root@server57324 [~]#

10) List the Process using PID.

You can list the process using particular PID, The below example list the process which was binded with given PID.
# ps -f  -p 1707,6105
UID        PID  PPID  C STIME TTY          TIME CMD
root      1707  1706  0 Jun19 ?        00:00:00 hald-runner
root      6105     1  0 01:16 ?        00:00:00 tailwatchd

11) List the Process using PPID.

You can list the process using particular PPID, The below example list the process which was binded with given PPID.
# ps -f  --ppid 25354
UID        PID  PPID  C STIME TTY          TIME CMD
root      1356 25354  0 Dec02 ?        00:00:00 /sbin/udevd -d
root      1357 25354  0 Dec02 ?        00:00:00 /sbin/udevd -d

12) List the Process with tree structure.

The below example is list the process with tree format. You can alternatively use the “ps axuf” to show the tree output.
# ps axjf
 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
 1 19218 19218 19218 ?           -1 Ss       0   0:00 /usr/sbin/sshd
19218 22968 22968 22968 ?           -1 Ss       0   0:00  \_ sshd: root@pts/0
22968 22976 22976 22976 pts/0    22976 Ss+      0   0:00  |   \_ -bash
19218 23356 23356 23356 ?           -1 Ss       0   0:00  \_ sshd: root@pts/1
23356 23369 23369 23369 pts/1    25557 Ss       0   0:00      \_ -bash
23369 25557 25557 23369 pts/1    25557 R+       0   0:00          \_ ps axjf
    1 22402 22402 18353 ?           -1 S        0   0:07 cpsrvd (SSL) - waiting for c --llu=1387783811 --listen=3,4,5,6,7,8,9,10
    1   712   712   712 ?           -1 Ss       0   0:11 lfd - sleeping
    1  5441  5441  5441 ?           -1 Ss       0   0:00 /usr/sbin/dovecot
 5441  5451  5441  5441 ?           -1 S      497   0:00  \_ dovecot/pop3-login
 5441  5452  5441  5441 ?           -1 S      497   0:00  \_ dovecot/imap-login
 5441  5453  5441  5441 ?           -1 S       97   0:00  \_ dovecot/anvil
 5441  5454  5441  5441 ?           -1 S        0   0:00  \_ dovecot/log

13) Print the elapsed time for the process.

The below examples shows the process elapsed time, Its mean how log the particular process is running without down. Here i’m going to check two process elapsed time. The output shows [Date-hour-second-mins].

PID:1 – It’s init process, the process is up 187 days, 14 hours, 09 mins and 56 seconds.
PID:26510 – It’s crond process, the process is up 22 days, 11 hours, 19 mins and 03 seconds.
# ps -p 1,26510 -o pid,etime=
  PID
    1 187-14:09:56
26510 22-11:19:03
root@server57324 [~]#

14) How to check memory Leak using ps command.

The below examples shows the memory leak on your server, Its mean how much of the memory consumed of the corresponding process.
# ps aux --sort pmem
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19356  1004 ?        Ss   Jun19   5:06 /sbin/init
root      5519  0.0  0.6 167328 52664 ?        Ss   Dec24   0:19 /usr/local/cpanel/3rdparty/perl/514/bin/spamd -d --allowed-ips=127.0.0.1 --pidfile=/var/run/spamd.pid
root      5571  0.0  0.6 167328 50840 ?        S    Dec24   0:00 spamd child
root      5572  0.0  0.6 167328 50840 ?        S    Dec24   0:00 spamd child
root      6105  0.0  0.1  51500 11032 ?        S    Dec24   0:00 tailwatchd
root      6132  0.0  0.2 112744 16484 ?        S    Dec24   0:00 cpdavd - accepting connections on 2077 and 2078
root     19959  0.0  0.1 152068 13180 ?        Ss   00:00   0:04 lfd - sleeping
root     22402  0.0  0.2  98556 18112 ?        S    Dec19   0:10 cpsrvd (SSL) - waiting for c --llu=1387783811 --listen=3,4,5,6,7,8,9,10
named    26458  0.0  0.3 389448 24788 ?        Ssl  Dec02   0:08 /usr/sbin/named -u named

15) How to check memory Leak of particular PID.

The below examples shows the particular PID memory leak on your server. For this you need to use the above command first and take the PID and do it.
# ps ev --pid=5572
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
 5572 ?        S      0:00      0     4 167323 50840  0.6 spamd child

16) To see every process running as root (real & effective ID) in user format.

The below examples shows the root user process.
# ps -U root -u root u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19356  1004 ?        Ss   Jun19   5:06 /sbin/init
root     31943  0.0  0.1  16868 12772 ?        SLsl Dec02   2:03 /sbin/mdmon --takeover md0
root     31949  0.0  0.0   4688   580 ?        Ss   Dec02   0:10 mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
root     32194  0.0  0.0 112480  1068 ?        Ss   Dec02   0:00 /usr/sbin/abrtd
root     32237  0.0  0.0 110292   888 ?        Ss   Dec02   0:30 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root     32263  0.0  0.0  78536  7824 ?        Ss   Dec07   0:42 /usr/local/apache/bin/httpd -k start -DSSL

17) Customizing the ps output format.

We can print the ps output as a customized report what we want.
# ps -eo uname,pid,ppid,nlwp,pcpu,pmem,psr,start_time,tty,time,args
USER       PID  PPID NLWP %CPU %MEM PSR START TT           TIME COMMAND
root         1     0    1  0.0  0.0   1 Jun19 ?        00:05:06 /sbin/init
root         2     0    1  0.0  0.0   1 Jun19 ?        00:01:07 [kthreadd]
nagios    2217     1    2  0.0  0.0   0 Jun19 ?        01:21:09 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     31949     1    1  0.0  0.0   0 Dec02 ?        00:00:10 mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
root     32194     1    1  0.0  0.0   0 Dec02 ?        00:00:00 /usr/sbin/abrtd
root     32237     1    1  0.0  0.0   3 Dec02 ?        00:00:30 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root     32263     1    1  0.0  0.0   3 Dec07 ?        00:00:42 /usr/local/apache/bin/httpd -k start -DSSL

18) To display particular user process.

We can print the particular user process using below command.
# ps U actadmin
  PID TTY      STAT   TIME COMMAND
20249 ?        S      0:01 sshd: actadmin@pts/1
20250 pts/1    Ss     0:00 -bash

19) To display current user process.

We can print the current user process using below command.
# ps U $USER
  PID TTY      STAT   TIME COMMAND
 1560 ?        S      0:00 sshd: mageshm@pts/1
 1563 pts/1    Ss     0:00 -bash
 1616 pts/1    R+     0:00 ps U mageshm

Note :

I have tried maximum of ps command possible examples. If you need more details about ps, check the man page.

EBS - Update Context File command line

EBS - Update Context File command line

When logged in as application owner, and set the environment.

Context file can be updated with  oracle.apps.ad.context.UpdateContext class.

Usage:

java  oracle.apps.ad.context.UpdateContext {CONTEXT_FILE_FULL_PATH} {CONTEXT_VARIABLE_NAME} {DESIRED VALUE}


Example

applmgr>  java oracle.apps.ad.context.UpdateContext $CONTEXT_FILE s_dbport 1522

Wednesday, August 10, 2016

Configuring E-Business Suite to Use the BIG-IP



Configuring E-Business Suite to Use the BIG-IP

• The Ebusiness suite configuration changes are extremely simple
• There are 6 Autoconfig variables that require configuration ..see note 380489.1
• s_webentryurlprotocol
• s_webentryhost
• s_webentrydomain
• s_active_webport v’s s_webport
• s_login_page
• s_external_url (web services


Configuring E-Business Suite to Use the BIG-IP
• s_webentryurlprotocol remains at http
• s_webentryhost changes from atg and apcappsx7 to bigip I.e. our virtual server
• s_webentrydomain remains at au.oracle.com
• s_active_webport changes from 8000 to 80
• s_login_page changes from http://atg.au.oracle.com:8000/OA_HTML/AppsLocalLogin.jsp and
http://apcappsx7.au.oracle.com:8000/OA_HTML/AppsLocalLogin.jsp to
http://bigip.au.oracle.com/OA_HTML/AppsLogin
• s_external_url remains unchanged. This is used for external connection for web services


Configuring E-Business Suite to Use the BIG-IP


• Make the changes in the previous slides on ALL application tiers
• Run Autoconfig on each application tier
• Re-start all application tier services on each application tier
The configuration on the E-Business Suite is now complete!
The new entry point is: http://bigip.au.oracle.com

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

Turning Off Load Balancing
• When debugging issues it may be of benefit in some situations to turn off load balancing alltogether to determine if
the load balancer is the cause of the particular issue
• One can use the following steps to quickly disable load balancing.
• Choose 1 middle tier to make the following changes
• Revert the autoconfig changes in the previous steps e.g.
• s_webentryurlprotocol remains at http
• s_webentryhost reverts to atg from bigip (actual app tier hostname)
• s_webentrydomain remains at au.oracle.com (actual app tier domain)
• s_active_webport reverts to 8000 from 80 (s_webport)
• s_login_page reverts to the original setting

Turning Off Load Balancing continued…
• Run Autoconfig
• Attempt to access this middle tier to determine if the problem can be reproduced
• If the problem is unable to be reproduced then its clear the problem is caused by the load balancer setup.
• Create a service request with BOTH the hardware vendor and Oracle



Presenter Note: Run Autoconfig on 2nd node
• SSL termination / Acceleration
• Multiple Entry Points
• Xforwarded-For



Enabling SSL Termination/Acceleration
Background Information
• Secure Socket Layer (SSL) Accelerators can be used to reduce the SSL traffic and workload off the web servers.
• SSL accelerators are the primary targets for https requests from the user's desktop and thus are the initial target for
all desktop client communication.
• Responsible for converting "https" SSL requests to non-SSL "http" requests, directing the request to the http server
which is running in non-SSL mode. Before sending the response back to the desktop they again convert the non-
SSL requests to SSL requests
• Improves performance
• Reduces complexity and maintenance
• SSL termination is not for everyone – security, network setup




Enabling SSL Termination/Acceleration – on the load balancer
• Select local traffic – SSL Certificates
• Select the create button
• Fill in the certificate properties and select the finished button
• Create a client SSL profile by selecting Local traffic – profiles – SSL – client tab
• Assign the certificate name created in the previous step to the „certificate? and „key? sections. Give the profile a
name e.g. „oracle-ebs-clientssl„ and select the update button
• Assign the profile to the virtual server. Local Traffic – virtual server. Choose your virtual server and now select the
ssl profile via the „SSL Profile (Client)? option
• Under the Virtual server change the Service port to 443

Enabling SSL Termination/Acceleration – on the application tier
• Autoconfig changes
• Change s_webentryurlprotocol to https
• Change s_login_page and s_external_url to use https
• Change s_active_webport from 80 to 443
• Change s_enable_sslterminator by removing the #
• Resolves logout issues
• Important: You must refer to note 376700.1 „SSL and R12?
• This assumes that the load balancer was previously configured as the entry point and we are now simply enabling
SSL
• Run Autoconfig on all web nodes
• Restart services ----? https://big.au.oracle.com

Users access ebusiness suite using multiple urls
• Servesp level profiles are used
• txkChangeProfH.sql SERVRESP
• Each url is serviced by a different VS on the load balancer
• Autoconfig changes


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



• This is not mandatory........but has been a common question
• If the BIG-IP is configured with a single interface or if SNAT is enabled on the virtual server then all requests in the
access_log will be that of the virtual server IP
• The X-Forwarded-For HTTP header field is a standard for identifying the originating IP address of a client
connecting to a web server through an HTTP proxy or load balancer
• enabling XForwarded-For adds the IP address of the client as the value of the XForwarded-For in the header.
• useful for security, auditing and diagnosis of issues
Load balancer configuration
Enable the „Insert Xforwarded For? setting for the http profile being used.
Ebusiness suite configuration
Change the httpd.conf log format to
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" X-Forwarded-For
Stop and Start the Http server

Thursday, August 4, 2016

How to change SGA in Oracle Rac

How to change SGA in Oracle Rac

This Article for newbe Oracle DBA Since If you trying to change sga on rac with wrong way , spfile maybe be corrupted . 

Node One : ORCL1
Node Two : ORCL2

Note : You Need To Check Memory Parameter On Database , if its Have Available Size . 
  • Connect To Node One :

alter system set sga_max_size=16g scope=spfile sid = 'ORCL1';
alter system set sga_target=12g scope=spfile sid = 'ORCL1';
alter system set sga_max_size=16g scope=spfile sid = 'ORCL2';
alter system set sga_target=12g scope=spfile sid = 'ORCL2';

Or In Another Way :
sql>alter system set sga_target=12G scope=spfile sid='*';
sql>alter system set sga_max_size=16G scope=spfile sid='*';
sql>alter system set sga_max_size=16G scope=spfile ;
sql>alter system set sga_target=12G scope=spfile;

 PGA :

sql>alter system set pga_aggregate_target=4G scope =spfile sid='*';
sql>alter system set pga_aggregate_target=4G scope=both;

  • shutdown database PROD (two instances should be shut down)
 $>srvctl stop database -d PROD
$>srvctl START database -d PROD


Check The New Size For Both Instance By :
Show parameter sga ;