Monday, December 24, 2012

Script to find all the responsibilities of a user

Script to find all the responsibilities of a user
----------------------------------------------

set linseize 600
col user_name for a15
col RESPONSIBILITY_NAME for a35
SELECT fu.user_name,
         fr.responsibility_name,
         furg.start_date,
         furg.end_date
    FROM fnd_user_resp_groups_direct furg,
         fnd_user fu,
         fnd_responsibility_tl fr
   WHERE     upper(fu.user_name) = upper('&user_name')
         AND furg.user_id = fu.user_id
         AND furg.responsibility_id = fr.responsibility_id
         AND fr.language = USERENV ('LANG')
ORDER BY start_date;

Output:
======

Enter value for user_name: JPRASAD
old   8:    WHERE     upper(fu.user_name) = upper('&user_name')
new   8:    WHERE     upper(fu.user_name) = upper('JPRASAD')

USER_NAME       RESPONSIBILITY_NAME                      START_DATE      END_DATE
--------------- ---------------------------------------- --------------- ---------------
JPRASAD         Preferences SSWA                         21-APR-12
JPRASAD         User Management                          21-APR-12
JPRASAD         Functional Administrator                 21-APR-12
JPRASAD         OM Super User - Lifesize APJ             22-APR-12
JPRASAD         System Administrator                     05-MAY-12
JPRASAD         Logical Apps                             05-MAY-12
JPRASAD         Workflow User Web Applications           05-MAY-12
JPRASAD         OM Super User - North America            05-MAY-12
JPRASAD         System Administration                    05-MAY-12
JPRASAD         Oracle Diagnostics Tool                  05-MAY-12
JPRASAD         Alert Manager                            05-MAY-12
JPRASAD         Workflow Administrator Web Applications  05-MAY-12
JPRASAD         Application Developer                    05-MAY-12
JPRASAD         XML Publisher Administrator              05-MAY-12

Sunday, November 25, 2012

Ulimit OS Command


The ulimit command sets or reports user process resource limits, as defined in the /etc/security/limits file. This file contains these default limits:
fsize = 2097151
core = 2097151
cpu = -1
data = 262144
rss = 65536
stack = 65536
nofiles = 2000
threads = -1
nproc = -1
These values are used as default settings when a new user is added to the system.Limits are categorized as either soft or hard. With the ulimit command, you can change your soft limits, up to the maximum set by the hard limits. You must have root user authority to change resource hard limits.
Many systems do not contain one or more of these limits. The limit for a specified resource is set when the Limit parameter is specified. The value of the Limit parameter can be a number in the unit specified with each resource, or the value unlimited. To set the specific ulimit to unlimited, use the word unlimited
Note: Setting the default limits in the /etc/security/limits file sets system wide limits, not just limits taken on by a user when that user is created.
The current resource limit is printed when you omit the Limit parameter. The soft limit is printed unless you specify the -H flag. When you specify more than one resource, the limit name and unit is printed before the value. If no option is given, the -f flag is assumed.
Since the ulimit command affects the current shell environment, it is provided as a shell regular built-in command. If this command is called in a separate command execution environment, it does not affect the file size limit of the caller's environment. This would be the case in the following examples:
nohup ulimit -f 10000
env ulimit 10000
Once a hard limit has been decreased by a process, it cannot be increased without root privilege, even to revert to the original limit.
For more information about user and system resource limits, refer to the getrlimit, setrlimit, or vlimit subroutine in AIX® Version 6.1 Technical Reference: Base Operating System and Extensions, Volume 1.

Flags

Item Description
-a Lists all of the current resource limits.
-c Specifies the size of core dumps, in number of 512-byte blocks.
-d Specifies the size of the data area, in number of K bytes.
-f Sets the file size limit in blocks when the Limit parameter is used, or reports the file size limit if no parameter is specified. The -f flag is the default.
-H Specifies that the hard limit for the given resource is set. If you have root user authority, you can increase the hard limit. Anyone can decrease it.
-m Specifies the size of physical memory, in number of K bytes.
-n Specifies the limit on the number of file descriptors a process may have.
-r Specifies the limit on the number of threads a process can have.
-s Specifies the stack size, in number of K bytes.
-S Specifies that the soft limit for the given resource is set. A soft limit can be increased up to the value of the hard limit. If neither the -H nor -S flags are specified, the limit applies to both.
-t Specifies the number of seconds to be used by each process.
-u Specifies the limit on the number of a process a user can create.

Example

ulimit -a     (Lists all of the current resource limits.)
ulimit -n 65536   (Specifies the limit on the number of file descriptors a process may have.)

Sunday, November 18, 2012

EM Incident: Critical:New: - Row(1): Supplied date is in the future : now =

Here the below alerts/Incidents will be coming to the EM Users once after the DST Time Change.

Ex:
Host=HOST.domain.com
Target type=Database Instance
Target name=ABCDB
Incident creation time=Nov 15, 2012 5:21:01 AM PST
Last updated time=Nov 15, 2012 7:21:05 PM PST
Message=
Row(1): Supplied date is in the future : now = Thu Nov 15 19:21:01 PST 2012 supplied value = Thu Nov 15 20:20:25 PST 2012Severity=Critical
Incident ID=41705
Event count=1
Incident Status=New
Escalation level=2
Priority=None
Incident owner=
Incident Acknowledged By Owner=No
Categories=Error
Rule Name=Rule set for non production group targets,Rule to notify team about metric evaluation error
Rule Owner=SYSMAN
Update Details:
Escalation level set to 2 by rule (Name = Rule set for non production group targets,
Rule to notify team about metric evaluation error; Owner = SYSMAN).


Solution:

Oracle says this is a known behavior in instances that cant handle DST change automatically. Please do the below steps on all agents that see this problem 
./emctl stop agent
./emctl clearstate agent
./emctl start agent
./emctl upload agent

This should help you to get rid of the problem

perl: warning: Falling back to the standard locale ("C") while running emctl status agent

Here Perl executable are throwing warning alerts as below

[oracle@<HOST>:/u01/app/oracle/linux/<HOST>/agent12c/agent_inst/bin]$./emctl status agentperl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "ISO-8859-1",
        LANG = "ISO-8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.1.0
OMS Version       : 12.1.0.1.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /u01/app/oracle/linux/<HOST>/agent12c/agent_inst
Agent Binaries    : /u01/app/oracle/linux/<HOST>/agent12c/core/12.1.0.1.0
Agent Process ID  : 5203
Parent Process ID : 5151
Agent URL         :
https://<HOST>.domain.com:3872/emd/main/
Repository URL    : https://<OMS_HOST>.domain.com:4900/empbs/upload
Started at        : 2012-11-17 19:39:34
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2012-11-17 19:40:33
Last attempted upload                        : 2012-11-17 19:40:33
Total Megabytes of XML files uploaded so far : 0.05
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 85.29%
Collection Status                            : Collections enabled
Last attempted heartbeat to OMS              : 2012-11-17 19:40:06
Last successful heartbeat to OMS             : 2012-11-17 19:40:06

---------------------------------------------------------------
Agent is Running and Ready


Solution:

Now check for the bash_profile and see for the entry
vi .bash_profile
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8


If the above are not set, please set it and run the bash_profile and re-check the status of the EM Agent.
It should hlep to resolve the perl issue.

[oracle@<HOST>:~]$. .bash_profile

[oracle@<HOST>:~]$ cd /u01/app/oracle/linux/<HOST>/agent12c/agent_inst/bin

[oracle@<HOST>:/u01/app/oracle/linux/<HOST>/agent12c/agent_inst/bin]$./emctl status agent
Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.1.0
OMS Version       : 12.1.0.1.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /u01/app/oracle/linux/<HOST>/agent12c/agent_inst
Agent Binaries    : /u01/app/oracle/linux/<HOST>/agent12c/core/12.1.0.1.0
Agent Process ID  : 5203
Parent Process ID : 5151
Agent URL         :
https://<HOST>.domain.com:3872/emd/main/
Repository URL    : https://<OMS_HOST>.domain.com:4900/empbs/upload
Started at        : 2012-11-17 19:39:34
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2012-11-17 19:42:37
Last attempted upload                        : 2012-11-17 19:42:37
Total Megabytes of XML files uploaded so far : 0.05
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 85.29%
Collection Status                            : Collections enabled
Last attempted heartbeat to OMS              : 2012-11-17 19:42:06
Last successful heartbeat to OMS             : 2012-11-17 19:42:06

---------------------------------------------------------------
Agent is Running and Ready


Friday, November 16, 2012

EM Incident: Warning:New: - Agent resident memory utilization in KB is 251,848

If an EM Agent consuming more memory on the server, please do the below work around to resolve the issue.


1. ./emctl stop agent

Ensure no EMAgent process is running with the following commands:

<AGENT_HOME>/bin>./emctl status agent


$ps -ef | grep TMMain

$ps -ef | grep emagent
If you see any process, please kill them.

2. Take a Backup and edit the .../agent_inst/sysman/config/emd.properties file:

from:
agentJavaDefines=-Xmx128M -XX:MaxPermSize=96M

to:
agentJavaDefines=-Xmx512M -XX:MaxPermSize=96M

and save the file.

3. Start the Agent and check the status:

<AGENT_HOME>/bin>./emctl start agent
<AGENT_HOME>/bin>./emctl status agent
 


It should Fix the issue. 

If still does not resolve the issue please change the below Open Files parameter value.

-- Check the Open files value

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 774874
max locked memory       (kbytes, -l) 74136141
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 131072
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 

--To set the Open files value
$ ulimit -n 65536

-- Recheck the Open files value
$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 774874
max locked memory       (kbytes, -l) 74136141
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 131072
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited



Friday, November 9, 2012

ORA-31693 ORA-29913 ORA-31617 Unable To Open Dump File for Write On RAC

While exporting few tables from 11g RAC environment hit the below Issue and workarounds to resolve the issue.

ORA-31693: Table data object "AABCVSUPPORT"."SOAPV_CHANNEL_INV_ESS_WW" failed to load/unload and is being skipped due to error:
ORA-31617: unable to open dump file "/u01/app/oracle/product/
11.2.0.3/dbhome_1/rdbms/log/ABCVSUPPORT_new_03.DMP" for write
ORA-19505: failed to identify file "/u01/app/oracle/product/
11.2.0.3/dbhome_1/rdbms/log/ABCVSUPPORT_new_03.DMP"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
. . exported "ABCVSUPPORT"."SAOPV_INTRANSIT_EBS_WW"        1.548 GB 8647683 rows



Here is the command used to export the tables.

expdp system/<pwd> DIRECTORY=DATA_PUMP_DIR DUMPFILE=ABCVSUPPORT_new_%U.DMP LOGFILE=ABCVSUPPORT_new.LOG tables=ABCVSUPPORT.SOAPV_INTRANSIT_EBS_WW, ABCVSUPPORT.SOAPV_SHIPMENTS_EBS_WW, ABCVSUPPORT.SOAPV_SELLTHRU_EBS_WW, ABCVSUPPORT.SOAPV_CHANNEL_INV_EBS_WW, PARALLEL=5 filesize=4G
When the job scheduler starts parallel jobs, one or more processes may be executed on another node in the cluster and may not have access to the target directory. Make sure in a RAC environment the target directory is on SHARE storage (ASM/ACFS is very good for this purpose).

Solution

1. Please try to change the value of PARALLEL clause. (Experiment with value of parallel and see if issue is resolved by changing parallel value).
SUGGESTION: You can try from 2-8.
2. Check if  the storage is shared among all instances at operating system end. See if you can list the files from that mount point on all the instances in RAC (Real Application Cluster) as oracle user as well as at operating system end.
3. Check if  the directory is created on shared storage or is it local to the instance on non shared storage.
4. Please try DataPump export with different schema than you are doing it now for and see the problem is peculiar to specific SCHEMA.
5. Check if DBA_REGISTRY is clean (All components are VALID and showing same version).
Correct the components if they are INVALID:

connect / as sysdba
SELECT COMP_NAME , VERSION , STATUS FROM DBA_REGISTRY;
6. Please check the mount point you are using. Check if  it is NFS or something else. Check if there are some issues with it.
7. Please check if  there were any changes done recently at Oracle/Operating System end.
8. Please check if there is an disk space issue at the time of error.
9. Also check if this behavior is node specific or not. See if you can try DataPump by creating another directory on another node.
10. Check if  you  have created any service which is node specific.
11. Error ORA-31617 usually means that the operating system is not able to write to the destination. The error is returned to oracle by the operating system, so please check at operating system end that the file write operation from the local node to the particular mount point is fine.
12. Check if there is any I/O (Input/Output) error reported in operating system logs.
13. Please check the DIRECTORY definition and also the environment details. See if directory is created on shared server and the write permission is given to the user oracle as well as at operating system end.


Note: But in my case 1st point itself helped me after removing the parallel caluse from the export command it worked fine.

Wednesday, October 31, 2012

'emctl status agent' Command Shows "Collection Status Disabled By Upload Manager"


./emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 11.1.0.1.0
OMS Version       : 11.1.0.1.0
Protocol Version  : 11.1.0.0.0
Agent Home        : /fg01/app/linux/hostname/agent11g
Agent binaries    : /fg01/app/linux/hostname/agent11g
Agent Process ID  : 27736
Parent Process ID : 27698
Agent URL         : https://domain.com:3872/emd/main/
Repository URL    : https://domain.com:4900/em/upload
Started at        : 2012-10-30 20:52:45
Started by user   : oracle
Last Reload       : 2012-10-30 21:14:01
Last successful upload                       : 2012-10-31 06:55:18
Total Megabytes of XML files uploaded so far :     8.91
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :     4.39%

Collection Status                            : Disabled by Upload Manager
Last successful heartbeat to OMS             : 2012-10-30 19:05:14
---------------------------------------------------------------
Agent is Running and Ready



./emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error: Upload was successful but collections currently disabled - disk full

Solution:
-----------

<AGENT_HOME>/bin/emctl stop agent
<AGENT_HOME>/bin/emctl clearstate agent

cd <AGENT_STATE>/sysman/emd/upload
ls *.xml | wc -l



- Delete any pending upload files from the agent home
rm -r <AGENT_STATE>/sysman/emd/upload/*
rm <AGENT_STATE>/sysman/emd/lastupld.xml  
After deleting the files from upload re-start the agent and verify, if still did not help, please process the below.

- If needed, the values of the following parameters can be increased in the emd.properties file:



vi $AGENT_HOME/sysman/config/emd.properites


Below are the default values

UploadFileSize=2048
UploadMaxBytesXML=50
UploadMaxDiskUsedPct=98
Increase the above values as

UploadMaxBytesXML=60
UploadMaxDiskUsedPct=99 (Default value is 98)

<AGENT_HOME>/bin/emctl start agent
<AGENT_HOME>/bin/emctl status agent
./emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 11.1.0.1.0
OMS Version       : 11.1.0.1.0
Protocol Version  : 11.1.0.0.0
Agent Home        :
/fg01/app/linux/hostname/agent11g
Agent binaries    : /fg01/app/linux/hostname/agent11g
 Agent Process ID  : 27736
Parent Process ID : 27698
Agent URL         : https://domain.com:3872/emd/main/
Repository URL    : https://domain.com:4900/em/upload
Started at        : 2012-10-30 20:52:45
Started by user   : oracle
Last Reload       : 2012-10-30 21:14:01
Last successful upload                       : 2012-10-31 06:55:18
Total Megabytes of XML files uploaded so far :     8.91
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :     4.39%
Last successful heartbeat to OMS             : 2012-10-31 07:04:08
---------------------------------------------------------------
Agent is Running and Ready
 
<AGENT_HOME>/bin/emctl upload agent
./emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

 
 



Optimize Oracle UNDO Parameters

Overview
Starting in Oracle9i, rollback segments are re-named undo logs. Traditionally transaction undo information was stored in Rollback Segments until a commit or rollback statement was issued, at which point it was made available for overlaying.
Best of all, automatic undo management allows the DBA to specify how long undo information should be retained after commit, preventing "snapshot too old" errors on long running queries.
This is done by setting the UNDO_RETENTION parameter.  The default is 900 seconds (5 minutes), and you can set this parameter to guarantee that Oracle keeps undo logs for extended periods of time.
Rather than having to define and manage rollback segments, you can simply define an Undo tablespace and let Oracle take care of the rest. Turning on automatic undo management is easy.  All you need to do is create an undo tablespace and set UNDO_MANAGEMENT = AUTO.
However it is worth to tune the following important parameters
  1. The size of the UNDO tablespace
  2. The UNDO_RETENTION parameter
Calculate UNDO_RETENTION  for given UNDO Tabespace
You can choose to allocate a specific size for the UNDO tablespace and then set the UNDO_RETENTION parameter to an optimal value according to the UNDO size and the database activity. If your disk space is limited and you do not want to allocate more space than necessary to the UNDO tablespace, this is the way to proceed. The following query will help you to optimize the UNDO_RETENTION parameter:
Because these following queries use the V$UNDOSTAT statistics, run the queries only after the database has been running with UNDO for a significant and representative time!
Actual Undo Size
SELECT SUM(a.bytes) "UNDO_SIZE"
  FROM v$datafile a,
       v$tablespace b,
       dba_tablespaces c
 WHERE c.contents = 'UNDO'
   AND c.status = 'ONLINE'
   AND b.name = c.tablespace_name
   AND a.ts# = b.ts#;
 UNDO_SIZE
----------
  209715200
Undo Blocks per Second
SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
    
 "UNDO_BLOCK_PER_SEC"
  FROM v$undostat;
UNDO_BLOCK_PER_SEC
------------------
        3.12166667
DB Block Size
SELECT TO_NUMBER(value) "DB_BLOCK_SIZE [KByte]"
 FROM v$parameter
WHERE name = 'db_block_size';
DB_BLOCK_SIZE [Byte]
--------------------
                4096
Optimal Undo Retention
209'715'200 / (3.12166667 * 4'096) = 16'401 [Sec]
Using Inline Views, you can do all in one query!
SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]",
       SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]",
       ROUND((d.undo_size / (to_number(f.value) *
       g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION [Sec]"
  FROM (
       SELECT SUM(a.bytes) undo_size
          FROM v$datafile a,
               v$tablespace b,
               dba_tablespaces c
         WHERE c.contents = 'UNDO'
           AND c.status = 'ONLINE'
           AND b.name = c.tablespace_name
           AND a.ts# = b.ts#
       ) d,

       v$parameter e,
       v$parameter f,
       (
       SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
              undo_block_per_sec
         FROM v$undostat
       ) g

WHERE e.name = 'undo_retention'
  AND f.name = 'db_block_size'
/
ACTUAL UNDO SIZE [MByte]
------------------------
200

UNDO RETENTION [Sec]
--------------------
10800

OPTIMAL UNDO RETENTION [Sec]
----------------------------
16401
Calculate Needed UNDO Size for given Database Activity
If you are not limited by disk space, then it would be better to choose the UNDO_RETENTION time that is best for you (for FLASHBACK, etc.). Allocate the appropriate size to the UNDO tablespace according to the database activity:
Again, all in one query:
SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]",
       SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]",
       (TO_NUMBER(e.value) * TO_NUMBER(f.value) *
       g.undo_block_per_sec) / (1024*1024) 
      "NEEDED UNDO SIZE [MByte]"
  FROM (
       SELECT SUM(a.bytes) undo_size
         FROM v$datafile a,
              v$tablespace b,
              dba_tablespaces c
        WHERE c.contents = 'UNDO'
          AND c.status = 'ONLINE'
          AND b.name = c.tablespace_name
          AND a.ts# = b.ts#
       ) d,
      v$parameter e,
       v$parameter f,
       (
       SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
         undo_block_per_sec
         FROM v$undostat
       ) g
 WHERE e.name = 'undo_retention'
  AND f.name = 'db_block_size'
/
ACTUAL UNDO SIZE [MByte]
------------------------
200
UNDO RETENTION [Sec] 
--------------------
10800
NEEDED UNDO SIZE [MByte]
------------------------
131.695313
The previous query may return a "NEEDED UNDO SIZE" that is less than the "ACTUAL UNDO SIZE". If this is the case, you may be wasting space. You can choose to resize your UNDO tablespace to a lesser value or increase your UNDO_RETENTION parameter to use the additional space.

Saturday, October 27, 2012

You may be a victim of software counterfeiting?

As everyone unable to use the Geninue software and using the pirted one and using with Internet may effect the below Genuine Software Issues.

For the below Issue


Here is the solutions to get it resolved.
---------------------------------------'
Please download the executable RemoveWGA.exe from the link
 http://www.download.hr/download-removewga.html
and unzip the zip file double click on the RemoveWGA.exe then it will prompt for reboot of your PC. Click on OK and proceed for Reboot of computer. In a process of restarting the PC it will remove the WGAlogon.dll and wgatra.exe and all it related files.


Tuesday, September 4, 2012

Block Change Tracking (BCT)

RMAN's change tracking feature for incremental backups improves incremental backup performance by recording changed blocks in each datafile in a change tracking file. If change tracking is enabled, RMAN uses the change tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan every block in the datafile.

After enabling change tracking, the first level 0 incremental backup still has to scan the entire datafile, as the change tracking file does not yet reflect the status of the blocks. Subsequent incremental backup that use this level 0 as parent will take advantage of the change tracking file.

Change tracking is disabled by default, because it does introduce some minimal performance overhead on your database during normal operations. However, the benefits of avoiding full datafile scans during backup are considerable, especially if only a small percentage of data blocks are changed between backups. If your backup strategy involves incremental backups, then you should enable change tracking.

One change tracking file is created for the whole database. By default, the change tracking file is created as an Oracle managed file in DB_CREATE_FILE_DEST. You can also specify the name of the block change tracking file, placing it in any location you choose.


SQL> SELECT status FROM v$block_change_tracking;

STATUS
----------
DISABLED

SQL> show parameter db_create_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string

SQL> alter system set db_create_file_dest='+DATA' scope=both;

System altered.

(or) If DB on windows

SQL> alter system set db_create_file_dest='C:\ORACLE\DB1\CHANGETRACKING\BLOCKCHANGE.F' scope=both;

System altered.

(or) If DB on Non-ASM

SQL> alter system set db_create_file_dest='/u01/app/oracle/db1/oradata/changetracking/blockchange.f' scope=both;

System altered.

SQL> show parameter db_create_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string      +DATA

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

Database altered.

SQL> SELECT status FROM v$block_change_tracking;

STATUS
----------
ENABLED

SQL> select * from v$block_change_tracking;

STATUS            FILENAME                                        BYTES
----------------------------------------------------------------------------------------------------
ENABLED        +DATA/DB1/changetracking/ctf.427.741526883            22085632


(OR)

we can enable the BCT using USING keyword as follows:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/u01/app/oracle/db1/oradata/changetracking/blockchange.f';


Now that we have enabled block change tracking a new background process called CTWR (change track writer) is started and it will automatically be started for every new instance.

CTWR will track addresses of blocks which have changed since the last backup in the change tracking file from now on.
RMAN can use this information for the next incremental backup. It will be able to find out which block must be written to the backupset by just reading the change tracking file.
RMAN will not have to read the entire datafiles into the SGA in order to find out which blocks must be backed up as it had to do before 10g.
This methode is much faster.

Thursday, August 23, 2012

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..

Due to communication between OMS and agent does not work. This is in most cases because something has been changed to one of the components so the SSL certificate is not valid anymore. Therefore you have to resecure the agent. Your last try shows the error that you have used the wrong password for registration
Then go to the agent and do the following:
- emctl stop agent
- delete all files in
$AGENT_HOME/sysman/emd
rm agntstmp.txt
$AGENT_HOME/sysman/emd/upload and
rm -rf *
$AGENT_HOME/sysman/emd/state
rm -rf *
- emctl clearstate agent (this should delete all state files but sometimes it is not enough, but I experienced that it is better to use this command after deletion of the files)
- emctl secure agent (and specify the password on demand)
- emctl start agent

This should solve your problem.

Incase if you still have any issues in starting the agent or uploading files is not getting processed then look into the below:

Login to EM Console --> Setup -->Agents  -->
Misconfiguration Alerts and Blocked Agents

and check whether the server is blocked or not if it is blocked unblock it and then try the below:

./emctl clearstate agent
./emctl upload agent
./emctl status agent


Friday, August 3, 2012

If db_recovery_file_dest_size got full

Mostly this is applicable for 11g Instances when ever the db_recovery_file_dest_size got full then database will be in hang state and unable to operate anything.

SQL> show parameter recovery
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/oradata/xxqa/arch
db_recovery_file_dest_size           big integer 120G
recovery_parallelism                 integer     0

SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               0
REDO LOG                              0                         0               0
ARCHIVED LOG                      53.31                         0             250
BACKUP PIECE                          0                         0               0
IMAGE COPY                            0                         0               0
FLASHBACK LOG                         0                         0               0
FOREIGN ARCHIVED LOG                  0                         0               0

RMAN> crosscheck archivelog all;

RMAN> list expired archivelog all;

Note: Above command will give the list of expired archive logs.

RMAN> delete expired archivelog all;
Note: Above command will delete the expired archive logs.

Once after deleting the expired archivelogs again check usage from the below query and make sure space has been released.

SQL> select * from v$flash_recovery_area_usage;