Wednesday, October 31, 2012

Genrating a stack from core dumps in unix and linux




Follow the instructions below in order:
1.      Check if you have a core file, we may find in cdump or bdump/trace or bdump or cluster log locations.
2.      Log into the user (the user need to be the owner of the core file) Then issue
               file <CORE_FILENAME>
The above output gives more info like from which executable (program) the core generated and other.
3.      Log into the user (owner of the program). Go to ORACLE_HOME/bin or GRID_HOME/bin, then issue
                file <Program>
Note: if possible give read permission to the program  (optional)
                chmod a+r <program>

Monday, October 15, 2012

Rman Connect Target Fails With ORA-06508 or RMAN-04015 or PLS-00201

Rman Connect Target Fails With ORA-06508 or RMAN-04015  or PLS-00201

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-04063: package body "APPS.DBMS_BACKUP_RESTORE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APPS.DBMS_BACKUP_RESTORE"
ORA-06512: at line 1
RMAN-04015: error setting target database character set to UTF8

Thursday, July 5, 2012

How to remove ^M (Control M) from the file which came from Windows

How to remove ^M (Control M) from the file which came from Windows
Use any of the beow steps.
1.
  > dos2unix <file_name>
Note: This only works when dos2unix rpm is installed

GI can be Installed on a standalone server on a server with RDBMS HOME with running DB

Can Grid Infrastructure can be installed on a standalone server that already
has RDBMS HOME with running Database?
Answer is yes

Find command usage

How to clean up data when ever disk usage exceeds the threshold limit.
Among the many ways do it, here is the simple usage of Unix find command to delete files older than a year.

find . -type f -mtime +365 -delete
Where -mtime +365 suggests to list files older than 365 days.
or
 find . -type f -atime +365 -delete
Where -atime stands for access time which is when the file was last read.

Some more examples

Friday, June 22, 2012

Enable/Disable Partitioning in RDBMS Home

When you install Oracle Database 11.2 Enterprise Edition , certain options are enabled and others are disabled.
If you need to enable or disable a particular database feature for an Oracle home, then
shut down the database and use the chopt tool. See Example below:

The chopt tool is a command-line utility that is located in the ORACLE_HOME\bin
directory. The syntax for chopt is as follows:

chopt [ enable | disable] db_option

SQL Tuning First Checks


Global Statistics:
  1.   Statistics_level= ALL , problem with Linux if we set to this. May be a bug.
  2.   Db_file_multiblock_read_count
  3.   NLS_sort is need to Binary.
  4.   Optimizer_dynamic_sampling between 1 and 3.
  5.  Stats gathering should not
  6.    High version count
  7.    Using First Rows
  8.   Fixed objects stats missing
  9.   CBO stats with non-defaults values
  10.   System stats are need to gather if not default stats are used which are calculated at the first DB startup
  11.  Sreadtim < 2 or mreadtim <3
  12.  Sreadtim > 18 and mreadtim > 522
  13.  Table with Bitmap indexes
  14.  Need to check any change in the indexes