Quantcast
Channel: Remote Oracle Database Support
Viewing all 155 articles
Browse latest View live

ORA-00600: internal error code, arguments: [pesldl03_MMap: errno 1 errmsg Operation not permitted]

$
0
0


Issue:


ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-00600: internal error code, arguments: [pesldl03_MMap: errno 1 errmsg Operation not permitted
], [], [], [], [], [], [], [], [], [], [], []
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 2 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-00600: internal error code, arguments: [pesldl03_MMap: errno 1 errmsg Operation not permitted 




Cause:


The issue occurs since 11g as we are now using /dev/shm when using native PLSQL compilation.


This requires that /dev/shm is of type tmpfs and is mounted with the following options:
With rw and exec permissions set on it
Without noexec or nosuid set on it


If /dev/shm is mounted with "noexec" such an error occurs.


Solution:


Ensure that the /dev/shm mount area is of type tmpfs and is mounted with the following options:
With rw and exec permissions set on it
Without noexec or nosuid set on it"


# cat /etc/fstab
...
tmpfs /dev/shm tmpfs defaults 0 0
...



Old setting in /etc/fstab 


tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0


New setting which fixed the issue 


tmpfs /dev/shm tmpfs defaults 0 0




AIX paging issue

$
0
0


Issue:  High paging on AIX oracle DB server

Background/Observation:

                    i. AIX server with version 6.1 TL 7 (6100-07-06-1241) running standalone Oracle DB 10.2.0.5 

                   ii.  Huge paging memory utilization found to be caused by db processes mainly

#lsps -s
Total Paging Space   Percent Used
      30720MB               40%

#ps -ealf | head -1 ; ps -ealf | sort -rn +9 | head
       F S      UID      PID     PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
  240001 A ora10g  3736258    1   0  60 20 f60b76590 152524      Jul 31      -  4:40 ora_dbw0_ORADB
  240001 A ora10g  2883690    1   0  60 20 5c0bdc590 143288     Jul 31      -  4:29 ora_dbw1_ORADB
  240001 A ora10g  1835488    1   0  60 20 ad0c2d590 125636     Jul 31      -  8:33 ora_lgwr_ORADB
  240001 A ora10g 13041936   1   0  60 20 d95259590 118304      Jul 31      - 203:28 oracleORADB (LOCAL=NO)
  240001 A ora10g  5046804    1   0  60 20 4321c3590 118292      Jul 31      - 176:28 oracleORADB (LOCAL=NO)
  240001 A ora10g  9044626    1   5  62 20 1e5c9e590 118220     Jul 31      - 160:27 oracleORADB (LOCAL=NO)
  240001 A ora10g  2228980    1   0  60 20 5513d5590 117520      Jul 31      - 176:38 oracleORADB (LOCAL=NO)
  240001 A ora10g 11534512   1   0  60 20 5e7cde590 109812     Jul 31      - 185:14 oracleORADB (LOCAL=NO)
  240001 A ora10g  6619604   1   0  60 20 6e0bee590 109796      Jul 31      -  2:12 ora_arc1_ORADB
  240001 A ora10g  3801228   1   0  60 20 af0a2f590 109796        Jul 31      -  2:17 ora_arc0_ORADB

iii. Paging found to be getting reduced by few % on killing of old foreground oracle connection processes (LOCAL=NO)

iv. On clean DB restart paging memory utilization getting wiped out till 4%

v. Post DB restart with time lag of 1 week max. paging builds up again gradually

vi. Post 50% of paging utilization application starts facing slowness

Analysis:

This phase will help to understand aix paging & virtual memory manager concepts which are backbone for fixing the paging issue. Later in this section optimal aix memory relevant kernal parameter setting are explained

Understanding AIX paging & caching

Swap/paging allocation is controlled by the OS. Oracle is only requesting virtual memory to the OS which gives whatever it can either from real memory or from virtual/swaps pages.

AIX uses caching method for OS memory allocation wherein once real free memory is allocated it is being cached for re-use by other processes than releasing back as free real memory. Release of memory pages to real memory happens only on clean start/stop of database or server. Hence any graph or command would show real free memory as 1-2 % but actual available memory for processes could be more and calculated as below,

Actual Physical RAM in server:

#prtconf  | egrep -i "Good Memory"
Good Memory Size: 57344 MB

Vmstat command to get current memory utilization snap:

#vmstat 1 1
System configuration: lcpu=8 mem=57344MB
kthr    memory            page              faults        cpu
-----    -----------      ------------------------ ------------ -----------
 r  b   avm          fre         re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
 4  2 1262966357902   0   1   0 12181 12992   0 2597 127129 6356 81  9  7  3

Here,
 freshows real free memory 57902   , 57902/256 (page size 64*4) = 226.1 MB (As said earlier it is just 1% free which will be reflected in graphs giving misinterpretation unless used NMON)
avm shows average memory used is  12629663 , 12629663/256 = 49334 MB = 48 GB

So, here actual free memory including cache is57344 (RAM) – 49334 (avm) = 8010 MB = 7.8 GB

Most of the monitoring tools are unable to capture exact free memory on AIX os due to caching method which end up showing 100% memory utilized adding confusion

AIX Virtual Memory Manager (VMM)

The default values for the AIX VMM are generally not appropriate for use with databases. The default values for the AIX VMM will gradually allow up to 80% of physical memory to be used to buffer file I/O. Since Oracle is already buffering file I/O in the SGA, the same data is unnecessarily being buffered twice, and leaves only 20% of physical memory to run the Oracle database(s) and all other programs. This causes the majority of the Oracle database to be pushed out of physical memory to paging space; thus greatly impacting database performance.

To check whether your system is using the untuned default values for the AIX VMM, run the command:
/usr/sbin/vmo –a
/usr/sbin/vmo –a -F

If you do not have the /usr/sbin/vmo file, you will need to have your AIX systems administrator load the AIX fileset "bos.perf.tune".

The vmo command will list out all of the VMM parameters and their current values. The parameters you want to examine are the following:
MINPERM%, MAXPERM%, and MAXCLIENT%

Here is an example of the vmo report:

#sudo vmo -a -F | egrep -i "PERM|MAXCLIENT"
                   maxperm = 12805458
                       minperm = 711413
                    minperm% = 5
                   maxclient% = 90
                   maxperm% = 90
            numperm_global = 0
             strict_maxclient = 1
              strict_maxperm = 0


The untuned default settings are MINPERM%=20%, MAXPERM%=80%, and MAXCLIENT%=80%. There is no "correct" value for these parameters and only extensive testing will reveal the optimal values. The optimal value may be different for different databases on the same system, so keep this in mind when tuning the VMM and choose values which work best for all of the databases you will be running on the system & do take your AIX sys admin help.

Use the following values as a starting point:
MINPERM% = 10-15%, MAXPERM% = 20-30%, MAXCLIENT% = MAXPERM%

To get a snapshot of how much physical memory is being used by AIX to buffer file I/O, run the command:
/usr/bin/svmon -G

The svmon command is part of the same AIX fileset "bos.perf.tune" that vmo belongs to. The last line of the svmon output should be "in use". Add the values for "in use / pers" and "in use / clnt". Now divide the sum by the value for "memory / size". For best database performance, this value should generally not be higher than 30% (0.30).
Here is an example of the svmon output:

#sudo svmon -G
                    size         inuse        free         pin     virtual
memory     131072      129432     1640 11704 50091
pg space    7864320    278498

          work        pers        clnt       other
pin          11704            0             0            0
in use     47062      76126      6244           0

In this example, (in use / pers) 76126plus (in use / clnt) 6244equals 82370.
82370divided by (memory / size) 131072 equals 0.628 or approximately 63% of physical memory being used by AIX to buffer file I/O. This indicates the AIX VMM needs to be tuned to allow more physical memory to be used by Oracle and other processes and less physical memory to be used to buffer file I/O.

Remember that although AIX associates this memory with the Oracle processes (because Oracle requested the file I/O), all of the memory used to buffer file I/O is completely allocated and controlled by AIX, not Oracle. If you need help checking, setting, or tuning the AIX VMM, contact your AIX systems administrator and/or IBM Support.

IBM has introduced a new VMM parameter which is also very helpful with this issue. The parameter is...
lru_file_repage

#sudo vmo -a -F  | grep -i lru_file
        lru_file_repage = 1

The default value is "1", but it is recommended to set this to "0".This setting hints to the VMM to only steal file pages (from the AIX file buffer cache) and leave the computational pages (from the SGA) alone.

This new lru_file_repage parameter is only available on AIX 5.2 ML04 or higher and AIX 5.3 ML01 or higher.

NOTE: If you are using an older AIX system which does not support the lru_file_repage parameter, then you must use the "legacy" settings above. If you are using a newer AIX system which does support the lru_file_repage parameter, then you should use the revised settings below instead.

As documented in the IBM "VMM Tuning Tip" referenced below, if you are running on AIX 5.2 ML04 or higher, or AIX 5.3 ML01 or higher, IBM is now recommending the following VMM settings for use with programs which need to protect computational memory (like Oracle):

strict_maxperm=0 (default)
strict_maxclient=1 (default)
lru_file_repage=0
maxperm%=90
minperm%=5 (physical RAM <32 GB)
minperm%=10 (physical RAM >32 GB but <64 GB)
minperm%=20 (physical RAM >64 GB)
v_pinshm=1
maxpin%=percent_of_real_memory
(IBM does not recommend decreasing the maxpin% value)

Where "percent_of_real_memory" = ( (size of SGA / size of physical memory) *100) + 3
and
Set Oracle database parameter LOCK_SGA to TRUE in the pfile/spfile
and
Sum of all SGAs on the system do not exceed approximately 60% of physical memory


References:

Excessive Paging on IBM AIX POWER Systems (64-bit) After OS Upgrade (Doc ID 1503072.1)
AIX: Database performance gets slower the longer the database is running (Doc ID 316533.1)

Solution:

1.       APAR IV26272 and IV27014

Apply below APAR to AIX OS, IV26272 for AIX 6 & IV27014 for AIX 7


    This seems to be a known issue to AIX (IV26272 and IV27014):

  

Kernal parameter Settings:

2.       numperm_global should be set to 0

                  #sudo vmo -a -F | grep numperm_global 
                         numperm_global = 0

3.       lru_file_repage should be set to 0

                  #sudo vmo -a -F  | grep -i lru 
                       lru_file_repage = 0

4.       minperm% setting as per physical memory capacity as below

minperm%=5  (physical RAM <32 GB)
minperm%=10 (physical RAM >32 GB but <64 GB)
minperm%=20 (physical RAM >64 GB)

                  #sudo vmo -a | grep minperm
          minperm% = 5

5.       maxperm% & maxclient% should be 90

                  #sudo vmo -a -F | grep maxperm
maxperm% = 90
                        
                  #sudo vmo -a -F | grep maxclient
maxclient% = 90

Solution 1, 2 & 3 are most effective.

Steps to create active data guard in 11g and up-gradation to 12c using manual method - I

$
0
0
Steps to Create 11 ADG and up-gradation to 12c using manual method

 10 steps will take you through systematic approach to create standby database/ADG (active data guard) followed by activation and up-gradation to 12c using manual method

    1.  11g dummy instance creation for ADG
     2.  Dummy instance cleanup and preparation for rman restore to create standby
     3.  RMAN level 0 restoration initiation
     4.  ADG parameter setting
     5.  Restore archives and apply to standby
     6.  Activating standby
     7.  Pre-requisites of 12c upgrade
     8.  Initiate 12c upgrade
     9.  Time zone upgrade
    10. Post upgrade steps
     A.  Issues Faced

Above approach is best suited to reduce overall downtime involved to application and DB upgrade can be performed within 6 Hrs.

Please refer the setup as below 

testlabdb005a/testlabdb005b -: New two node RAC database hosts to be used for 11g restore/ADG/Upgrade to 12c

testoldlabdb1/testoldlabdb12 -: Old two node RAC database with 11g database TESTDBPRD which acts as a primary db node

TESTDBPRD :- Old 11g Database global name , name to be preserved in ADG
NEWDBPRD :- New 11g ADG database unique name , older name will be preserved as global dbname

 1.   11g dummy instance creation for ADG

We will create a dummy database instance to get db service /ASM/ TNS configuration readily available

[oracle@testlabdb005a ~]$ . ./.bash_profile_11g
[oracle@testlabdb005a ~]$ which sqlplus
/golden/app/oracle/11.2.0.3.0/db/bin/sqlplus
[oracle@testlabdb005a ~]$  export DISPLAY=164.16.18.55:10.0
[oracle@testlabdb005a ~]$ dbca



Oracle RAC Application cluster to be selected  

Supply appropriate physical host name and select all followed by ASM diskgroup selection for Data and FRA location

Set appropriate SGA/PGA and process values



Database instance is available on both hosts now

[oracle@testlabdb005a ~]$ ps -ef | grep -i pmon
oracle    5227     1  0 Mar24 ?        00:04:13 asm_pmon_+ASM1
oracle   15041     1  0 08:23 ?        00:00:00 ora_pmon_NEWDBPRD1
oracle   15479 48767  0 08:23 pts/2    00:00:00 grep --color=auto -i pmon
[oracle@testlabdb005a ~]$ ssh testlabdb005b ps -ef | grep -i pmon
oracle   14788     1  0 Jan27 ?        00:08:15 asm_pmon_+ASM2
oracle   15503     1  0 Jan27 ?        00:06:08 mdb_pmon_-MGMTDB
oracle   17232     1  0 08:23 ?        00:00:00 ora_pmon_NEWDBPRD2


2. Dummy instance cleanup and preparation for rman level 0 restore to create standby


Dummy instance created in step 1 will be cleaned to make way for standby database to be restored from primary 

[oracle@testlabdb005a ~]$ srvctl stop instance -d TESTDBPRD -i NEWDBPRD2

[oracle@testlabdb005a ~]$ srvctl status database -d TESTDBPRD
Instance NEWDBPRD1 is running on node testlabdb005a
Instance NEWDBPRD2 is not running on node testlabdb005b

[oracle@testlabdb005a ~]$ . ./.bash_profile_11g
[oracle@testlabdb005a ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Wed JAN 10 08:26:04 2017
sys@TESTDBPRD> show parameter control
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files    string  +DATA/TESTDBPRD/controlfile/current.370.943604411, +FRA/testdbprd/controlfile/current.358.943604411
control_management_pack_access       string      DIAGNOSTIC+TUNING

sys@TESTDBPRD> select * from v$log;
 GROUP#  THREAD#  SEQUENCE# BYTES  BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
------ ------- ------- ------ ------- ------  ------- ----- ------ ---- -------
 1     1   7 52428800  512  2 NO INACTIVE 1026240  10-JAN-17 1031635 10-JAN-17
 2     1   8   52428800  512 2 NO  CURRENT 1031635 10-JAN-17 2.8147E+14
 3     2   1   52428800  512 2 NO  CURRENT 1033793 10-JAN-17 2.8147E+14 10-JAN-17
 4     2   0   52428800  512  2 YES UNUSED    0                     0


sys@TESTDBPRD> show parameter pfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/TESTDBPRD/spfileTESTDBPRD.ora

[oracle@testlabdb005a ~]$ srvctl stop instance -d TESTDBPRD -i NEWDBPRD1
[oracle@testlabdb005a ~]$ srvctl status database -d TESTDBPRD
Instance NEWDBPRD1 is not running on node testlabdb005a
Instance NEWDBPRD2 is not running on node testlabdb005b

[oracle@testlabdb005a ~]$ . ./.bash_profile_asm
[oracle@testlabdb005a ~]$ asmcmd

ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N 512 4096  1048576 2150400  2148600  0 2148600  0 N  DATA/
MOUNTED  EXTERN  N 512 4096 1048576 307200 306637    0 306637     0 N  FRA/
MOUNTED  EXTERN  N 512 4096  1048576 10240 5611 0 5611 0   Y  OCR_VOTING/
ASMCMD> cd DATA/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    TESTDBPRD/
                                        Y    NEWDBPR/
                                        N    NEWDBggp/
ASMCMD> cd TESTDBPRD/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 Y    DATAFILE/
                                                 Y    ONLINELOG/
                                                 Y    PARAMETERFILE/
                                                 Y    TEMPFILE/
PARAMETERFILE  UNPROT  COARSE   JAN 10 08:00:00  N    spfileTESTDBPRD.ora => +DATA/TESTDBPRD/PARAMETERFILE/spfile.280.943604577
ASMCMD> cd DATAFILE/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type      Redund  Striped  Time             Sys  Name
DATAFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    SYSAUX.282.943604343
DATAFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    SYSTEM.281.943604343
DATAFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    UNDOTBS1.283.943604343
DATAFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    UNDOTBS2.279.943604457
DATAFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    USERS.374.943604343
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> cd +DATA/
ASMCMD> ls -lt
Type  Redund  Striped  Time             Sys  Name
                                        N    NEWDBggp/
                                        Y    NEWDBPR/
                                        Y    TESTDBPRD/
ASMCMD> cd TESTDBPRD/
ASMCMD> ls -lt
Type           Redund  Striped  Time             Sys  Name
                                                 Y    TEMPFILE/
                                                 Y    PARAMETERFILE/
                                                 Y    ONLINELOG/
                                                 Y    CONTROLFILE/
PARAMETERFILE  UNPROT  COARSE   JAN 10 08:00:00  N    spfileTESTDBPRD.ora => +DATA/TESTDBPRD/PARAMETERFILE/spfile.280.943604577

ASMCMD> cd TEMPFILE/
ASMCMD> ls -lt
Type      Redund  Striped  Time             Sys  Name
TEMPFILE  UNPROT  COARSE   JAN 10 08:00:00  Y    TEMP.377.943604415
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y


ASMCMD> cd ONLINELOG/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    TESTDBPRD/
                                        Y    NEWDBPR/
                                        N    NEWDBggp/
ASMCMD> cd TESTDBPRD/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type           Redund  Striped  Time             Sys  Name
                                                 Y    CONTROLFILE/
                                                 Y    ONLINELOG/
                                                 Y    PARAMETERFILE/
PARAMETERFILE  UNPROT  COARSE   JAN 10 08:00:00  N    spfileTESTDBPRD.ora => +DATA/TESTDBPRD/PARAMETERFILE/spfile.280.943604577
ASMCMD> cd ONLINELOG/

ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type       Redund  Striped  Time             Sys  Name
ONLINELOG  UNPROT  COARSE   JAN 10 08:00:00  Y    group_1.371.943604413
ONLINELOG  UNPROT  COARSE   JAN 10 08:00:00  Y    group_2.375.943604415
ONLINELOG  UNPROT  COARSE   JAN 10 08:00:00  Y    group_3.278.943604577
ONLINELOG  UNPROT  COARSE   JAN 10 08:00:00  Y    group_4.424.943604577

ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y

ASMCMD> cd +DATA/
ASMCMD> cd TESTDBPRD/
ASMCMD> ls -lt
Type           Redund  Striped  Time             Sys  Name
                                                 Y    PARAMETERFILE/
                                                 Y    CONTROLFILE/
PARAMETERFILE  UNPROT  COARSE   JAN 10 08:00:00  N    spfileTESTDBPRD.ora => +DATA/TESTDBPRD/PARAMETERFILE/spfile.280.943604577
ASMCMD> cd CONTROLFILE/
ASMCMD> ls -lt
Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  UNPROT  FINE     JAN 10 08:00:00  Y    Current.370.943604411
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N  512 4096  1048576  2150400  2150227 0 2150227 0 N  DATA/
MOUNTED  EXTERN  N  512 4096  1048576  307200   306637  0 306637 0  N  FRA/
MOUNTED  EXTERN  N  512 4096  1048576  10240     5611   0  5611 0 Y OCR_VOTING/
ASMCMD> cd +DATA/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type  Redund  Striped  Time             Sys  Name
                                        Y    TESTDBPRD/
                                        Y    NEWDBPR/
                                        N    NEWDBggp/
ASMCMD> cd NEWDBggp/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        N    onlinelog/
                                        N    tempfile/
ASMCMD> cd ..
ASMCMD> rm -rf NEWDBggp/
ASMCMD> pwd
+DATA
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    TESTDBPRD/
                                        Y    NEWDBPR/
ASMCMD> cd NEWDBPR/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    CONTROLFILE/
                                        Y    PARAMETERFILE/
                                        Y    PASSWORD/
ASMCMD> cd CONTROLFILE/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  UNPROT  FINE     NOV 29 10:00:00  Y    Current.261.925398497
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> cd ..
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    PARAMETERFILE/
                                        Y    PASSWORD/
ASMCMD> cd PARAMETERFILE/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type           Redund  Striped  Time             Sys  Name
PARAMETERFILE  UNPROT  COARSE   JAN 27 14:00:00  Y    spfile.268.925398709
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> cd ..
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type  Redund  Striped  Time             Sys  Name
                                        Y    PASSWORD/
ASMCMD> cd PASSWORD/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type      Redund  Striped  Time             Sys  Name
PASSWORD  UNPROT  COARSE   OCT 16     2016  Y    pwdNEWDBpr.256.925398277
ASMCMD> rm *
You JAN delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD> cd ..
ASMCMD-8002: entry 'NEWDBPR' does not exist in directory '+DATA/'
ASMCMD> pwd
+DATA/NEWDBPR/PASSWORD
ASMCMD> cd +DATA
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type  Redund  Striped  Time             Sys  Name
                                        Y    TESTDBPRD/
ASMCMD> cd TESTDBPRD/
ASMCMD> ls -lrt
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'

Type           Redund  Striped  Time             Sys  Name
                                                 Y    PARAMETERFILE/
PARAMETERFILE  UNPROT  COARSE   JAN 10 08:00:00  N    spfileTESTDBPRD.ora => +DATA/TESTDBPRD/PARAMETERFILE/spfile.280.943604577
ASMCMD> pwd
+DATA/TESTDBPRD
ASMCMD> exit

[oracle@testlabdb005a ~]$ . ./.bash_profile_11g
[oracle@testlabdb005a ~]$ sqlplus "/ as sysdba"
Connected to an idle instance.
idle> startup nomount
ORACLE instance started.
Total System Global Area 4.8103E+10 bytes
Fixed Size                  2239376 bytes
Variable Size            4429186160 bytes
Database Buffers         4.3621E+10 bytes
Redo Buffers               50479104 bytes

idle> show parameter control
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +DATA/TESTDBPRD/controlfile/curr
                                                 ent.370.943604411,
+FRA/testdbprd/controlfile/current.358.943604411
control_management_pack_access       string      DIAGNOSTIC+TUNING


  3.   RMAN level 0 restoration initiation


This step will restore database from primary db node to be converted into standby database

Standby control file backup to be taken from old database



[ora11g@testoldlabdb1 ~]$ . ./.bash_profile_TESTADG1
[ora11g@testoldlabdb1 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed JAN 10 14:05:44 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TESTDBPRD (DBID=1110983454)

RMAN> backup current controlfile for standby format 'stby_ind.cnf';
Starting backup at 10-JAN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=2285 instance=TESTADG1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including standby control file in backup set
channel ORA_DISK_1: starting piece 1 at 10-JAN-17
channel ORA_DISK_1: finished piece 1 at 10-JAN-17
piece handle=/oravl01/ora11g/112_RAC/dbs/stby_ind.cnf tag=TAG20170510T140608 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-JAN-17
RMAN>

[ora11g@testoldlabdb1 ~]$ scp -P 22 /oravl01/ora11g/112_RAC/dbs/stby_ind.cnf oracle@164.16.18.55:/export/RMANFULLBACK_09JAN17
oracle@164.16.18.55's password:
stby_ind.cnf                100%   64MB   5.3MB/s   00:12


[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Wed JAN 10 08:46:02 2017
connected to target database: TESTDBPRD (not mounted)

RMAN> restore standby controlfile from '/export/RMANFULLBACK_09JAN17/stby_ind.cnf';
Starting restore at 10-JAN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=784 instance=NEWDBPRD1 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/TESTDBPRD/controlfile/current.256.943606073
output file name=+FRA/TESTDBPRD/controlfile/current.358.943604411
Finished restore at 10-JAN-17
RMAN>

SQL> alter database mount;
Database altered.

[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Wed JAN 10 08:49:37 2017
connected to target database: TESTDBPRD (DBID=1110983454, not open)
RMAN>

[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ pwd
/export/RMANFULLBACK_09JAN17
[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ ls -lrt
total 305906748
-rw-------. 1 oracle oinstall   137297920 JAN  9 23:51 ctl_TESTDBPRD_obs3rn3c_1_1
-rw-------. 1 oracle oinstall  6895183872 JAN 10 00:03 dbpnps3rfrr_1_1
-rw-------. 1 oracle oinstall  6973827584 JAN 10 00:14 dbpnqs3rfrs_1_1
-rw-------. 1 oracle oinstall  7141895680 JAN 10 00:27 dbpnrs3rfrs_1_1
-rw-------. 1 oracle oinstall  5915882496 JAN 10 00:36 dbpnss3rfrs_1_1
-rw-------. 1 oracle oinstall  6487970816 JAN 10 00:47 dbpnts3rfrs_1_1
-rw-------. 1 oracle oinstall   223815168 JAN 10 00:47 dbpnus3rgds_1_1
-rw-------. 1 oracle oinstall 26752770048 JAN 10 01:30 dbpo0s3rggt_1_1
-rw-------. 1 oracle oinstall 28019957760 JAN 10 02:16 dbpo1s3rggu_1_1
-rw-------. 1 oracle oinstall 29240369152 JAN 10 03:02 dbpo2s3rggu_1_1
-rw-------. 1 oracle oinstall 27524194304 JAN 10 03:46 dbpo3s3rggu_1_1
-rw-------. 1 oracle oinstall 26314809344 JAN 10 04:27 dbpo4s3rggu_1_1
-rw-------. 1 oracle oinstall 26202578944 JAN 10 05:09 dbpo5s3rjcc_1_1
-rw-------. 1 oracle oinstall 27313512448 JAN 10 05:54 dbpo6s3rje4_1_1
-rw-------. 1 oracle oinstall 26819428352 JAN 10 06:37 dbpo7s3rjhd_1_1
-rw-------. 1 oracle oinstall 30237417472 JAN 10 07:29 dbpo8s3rjig_1_1
-rw-------. 1 oracle oinstall 30980997120 JAN 10 08:23 dbpo9s3rjp8_1_1
-rw-------. 1 oracle oinstall    66584576 JAN 10 08:37 stby_ind.cnf
drwxr-xr-x. 3 oracle oinstall        4096 JAN 10 09:04 archive
[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ pwd
/export/RMANFULLBACK_09JAN17
[oracle@testlabdb005a RMANFULLBACK_09JAN17]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Wed JAN 10 09:49:30 2017
connected to target database: TESTDBPRD (DBID=1110983454, not open)
RMAN> catalog start with '/export/RMANFULLBACK_09JAN17';
Starting implicit crosscheck backup at 10-JAN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
Crosschecked 1227 objects
Finished implicit crosscheck backup at 10-JAN-17
Starting implicit crosscheck copy at 10-JAN-17
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 10-JAN-17
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern /export/RMANFULLBACK_09JAN17
List of Files Unknown to the Database
=====================================
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_GG_tts3stid_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_GG_tus3stjk_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_clone_nvs3r8qq_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/GG_NOTREQ/arch_ggg_tjs3r281_1_1.gz
File Name: /export/RMANFULLBACK_09JAN17/archive/GG_NOTREQ/arch_ggg_tks3r2gm_1_1.gz
.
.

File Name: /export/RMANFULLBACK_09JAN17/dbpnts3rfrs_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpnus3rgds_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo0s3rggt_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo1s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo2s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo3s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo4s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo5s3rjcc_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo6s3rje4_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo7s3rjhd_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo8s3rjig_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo9s3rjp8_1_1

Do you really want to catalog the above files (enter YES or NO)? Y
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_clone_nvs3r8qq_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_frs3r0ap_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_fss3r0ni_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_fts3r13l_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_fus3r1gf_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_fvs3r1st_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_g0s3rasb_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_g1s3rb8o_1_1
File Name: /export/RMANFULLBACK_09JAN17/archive/arch_adg_g2s3rbkr_1_1
.
.

File Name: /export/RMANFULLBACK_09JAN17/dbpnus3rgds_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo0s3rggt_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo1s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo2s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo3s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo4s3rggu_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo5s3rjcc_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo6s3rje4_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo7s3rjhd_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo8s3rjig_1_1
File Name: /export/RMANFULLBACK_09JAN17/dbpo9s3rjp8_1_1

RMAN>

    rman_DB_0_level_clone_restore.sh

RUN {
configure device type disk parallelism 5;
ALLOCATE CHANNEL ch01 DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch02  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch03  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch04  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch05  DEVICE TYPE DISK ;
set newname for datafile 1 to '+DATA';
set newname for datafile 2 to '+DATA';
set newname for datafile 3 to '+DATA';
set newname for datafile 4 to '+DATA';
.
.
.
set newname for datafile 97 to '+DATA';
restore database;
switch datafile all;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
}


o/p:

new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored

allocated channel: ch01
channel ch01: SID=287 instance=NEWDBPRD1 device type=DISK
allocated channel: ch02
channel ch02: SID=358 instance=NEWDBPRD1 device type=DISK
allocated channel: ch03
channel ch03: SID=431 instance=NEWDBPRD1 device type=DISK
allocated channel: ch04
channel ch04: SID=501 instance=NEWDBPRD1 device type=DISK
allocated channel: ch05
channel ch05: SID=572 instance=NEWDBPRD1 device type=DISK

executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
..
.
.
.
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00001 to +DATA
channel ch01: restoring datafile 00018 to +DATA
channel ch01: restoring datafile 00020 to +DATA
channel ch01: restoring datafile 00021 to +DATA
channel ch01: restoring datafile 00022 to +DATA
channel ch01: restoring datafile 00023 to +DATA
channel ch01: restoring datafile 00024 to +DATA
channel ch01: restoring datafile 00029 to +DATA
channel ch01: restoring datafile 00056 to +DATA
channel ch01: restoring datafile 00062 to +DATA
channel ch01: restoring datafile 00074 to +DATA
channel ch01: restoring datafile 00083 to +DATA
channel ch01: restoring datafile 00086 to +DATA
channel ch01: restoring datafile 00091 to +DATA
channel ch01: reading from backup piece /export/RMANFULLBACK_09JAN17/dbpo8s3rjig_1_1
channel ch02: starting datafile backup set restore
channel ch02: specifying datafile(s) to restore from backup set
channel ch02: restoring datafile 00002 to +DATA
channel ch02: restoring datafile 00009 to +DATA
channel ch02: restoring datafile 00034 to +DATA
channel ch02: restoring datafile 00039 to +DATA
channel ch02: restoring datafile 00040 to +DATA
channel ch02: restoring datafile 00051 to +DATA
channel ch02: restoring datafile 00054 to +DATA
channel ch02: restoring datafile 00067 to +DATA
.
.
.
.

input datafile copy RECID=193 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/usr.264.943615617
datafile 91 switched to datafile copy
input datafile copy RECID=194 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/usr.394.943611157
datafile 92 switched to datafile copy
input datafile copy RECID=195 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/usr.260.943611157
datafile 93 switched to datafile copy
input datafile copy RECID=196 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/undotbs2.293.943615617
datafile 94 switched to datafile copy
input datafile copy RECID=197 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/sysaux.290.943615617
datafile 95 switched to datafile copy
input datafile copy RECID=198 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/sysaux.269.943615831
datafile 96 switched to datafile copy
input datafile copy RECID=199 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/users.279.943611155
datafile 97 switched to datafile copy
input datafile copy RECID=200 STAMP=943620733 file name=+DATA/TESTDBPRD/datafile/users.294.943615617
released channel: ch01
released channel: ch02
released channel: ch03
released channel: ch04
released channel: ch05
RMAN>

  4.   ADG parameter setting

This step is not mandatory if you opt to apply archive offline to standby database

On testlabdb005a:

alter database rename file '+FRA/oradata/TESTDBPRD/redo_g1_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g1_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g1_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g1_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g2_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g2_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g2_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g2_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g3_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g3_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g3_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g3_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g4_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g4_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g4_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g4_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g5_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g5_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g5_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g5_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g6_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g6_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g6_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g6_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g7_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g7_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g7_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g7_m02.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g8_m01.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g8_m01.dbf';
alter database rename file '+FRA/oradata/TESTDBPRD/redo_g8_m02.dbf' to '+DATA/TESTDBPRD/onlinelog/redo_g8_m02.dbf';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_9.292.812362187' to '+DATA/TESTDBPRD/onlinelog/group_9.292.812362187';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_9.293.812362187' to '+DATA/TESTDBPRD/onlinelog/group_9.293.812362187';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_10.294.812362321' to '+DATA/TESTDBPRD/onlinelog/group_10.294.812362321';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_10.295.812362323' to '+DATA/TESTDBPRD/onlinelog/group_10.295.812362323';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_11.296.812362331' to '+DATA/TESTDBPRD/onlinelog/group_11.296.812362331';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_11.297.812362333' to '+DATA/TESTDBPRD/onlinelog/group_11.297.812362333';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_12.299.812513579' to '+DATA/TESTDBPRD/onlinelog/group_12.299.812513579';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_12.298.812513581' to '+DATA/TESTDBPRD/onlinelog/group_12.298.812513581';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_13.300.812513589' to '+DATA/TESTDBPRD/onlinelog/group_13.300.812513589';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_13.301.812513591' to '+DATA/TESTDBPRD/onlinelog/group_13.301.812513591';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_14.302.812513721' to '+DATA/TESTDBPRD/onlinelog/group_14.302.812513721';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_14.303.812513723' to '+DATA/TESTDBPRD/onlinelog/group_14.303.812513723';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_15.304.812513735' to '+DATA/TESTDBPRD/onlinelog/group_15.304.812513735';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_15.305.812513737' to '+DATA/TESTDBPRD/onlinelog/group_15.305.812513737';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_16.306.812513745' to '+DATA/TESTDBPRD/onlinelog/group_16.306.812513745';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_16.307.812513747' to '+DATA/TESTDBPRD/onlinelog/group_16.307.812513747';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_17.308.812513765' to '+DATA/TESTDBPRD/onlinelog/group_17.308.812513765';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_17.309.812513767' to '+DATA/TESTDBPRD/onlinelog/group_17.309.812513767';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_18.310.812513775' to '+DATA/TESTDBPRD/onlinelog/group_18.310.812513775';
alter database rename file '+DATA1/TESTDBPRD/onlinelog/group_18.311.812513777' to '+DATA/TESTDBPRD/onlinelog/group_18.311.812513777';

idle> alter system set standby_file_management='AUTO' scope=spfile;
System altered.

idle> alter system set fal_client='NEWDBPRD';
System altered.

idle> alter system set fal_server='TESTADG';
System altered.

idle> alter system set db_create_online_log_dest_1='+DATA' scope=spfile;
System altered.

On testoldlabdb1:


SQL> alter system set log_archive_dest_3='SERVICE=NEWDBPRD ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=NEWDBPRD';

System altered.

SQL> alter system set log_archive_dest_state_3=ENABLE;
System altered.

SQL> alter system set log_archive_config='DG_CONFIG=(TESTDBPRD,TESTADG, NEWDBPRD)' scope=spfile;
System altered.

SQL> alter system set fal_server='TESTDBPRD,NEWDBPRD';
System altered.


 5.   Restore archives and apply to standby


In case real time archive sync not enabled below command can be used to restore archives from primary and applied to standby db

RUN {
configure device type disk parallelism 5;
ALLOCATE CHANNEL ch01 DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch02  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch03  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch04  DEVICE TYPE DISK ;
ALLOCATE CHANNEL ch05  DEVICE TYPE DISK ;
restore archivelog from sequence 268574  until sequence 268700 thread 2;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
RELEASE CHANNEL ch05;
}
EOF



What is Oracle Database ? Part I

$
0
0
An Oracle Database is a Relational Database management System used to store & retrieve the related information.

An Oracle Database server/instance consists of shared memory structurebackground processes & storage which handles the functional requirement to manage concurrent & shared data access by users.

Oracle Database product has evolve though its 8i, 9i, 10g & 11g version


Overview:
Oracle database server is a part of multitier architecture includes Client Machine/WebserverMiddleware Application & Database Server.
Client Machine/Webserver:
Client is the End user who accesses the DB to retrieve the information.
Various ways to access db by client are Sqlplus, Sql developer or other third Party Tools like TOAD/PLSQL Developer, Web URL. 
Client can be remote or local to DB servers which means that Webserver & Middleware layers are optional & DB can be retrieve from its local server itself.
In Complex & Critical Application Setup’s Multitier approach being followed to make efficient administration, security enforcement, patch/upgrades, backup, restoration, monitoring, license management, hardware management of every component.
Middleware Application:
It stands as a middleware layer to client before accessing database which consists of data retrieval policy, functions, application/java /plsql codes, user interface etc.  Oracle CRM, Fusion Middleware and other vendor application products are found in this layer
Database Server:
Here it comes the Oracle Database, located on Server supporting any platform like Windows, Solaris, AIX, HP-UX and Linux etc.
Will simplify the correlation between each of the basic (writing basic as 8i to 11g various new components being added by oracle but I have picked up the most common of all them & will be easy to understand rather than adding more confusion) database Components & their Usage in following section with reference to above Oracle Basic Architecture with below flow.



1.       Database Buffer
2.       Shared Pool
3.       Large Pool
4.       Java Pool
5.       Redo Buffer
6.       Fixed SGA
7.       Stream Pool
8.       Flash Back Buffer
9.       Program Global Area(PGA)
10.    User Global Area (UGA)


Memory components are divided into SGA, PGA & UGA based on their functionality, Manageability & types of the process which access them.

SGA is System Global Area constitutes the Oracle Instance along with background processes & physical/logical components of the database. SGA is an os shared memory hold by the oracle instance for its various internal memory components.

Upper limit of OS Memory that can be shared to oracle is defined in system parameter file of server along with other limits like stack, concurrent number files / blocks, semaphores, number of process that can be utilized by oracle & its dependent components. During DB startup OS Memory is allocated to SGA & same is released to OS during shutdown. Memory blocks inside the SGA Memory can be read/written by oracle process based on internal algorithm. SGA value set by parameter SGA_MAX_SIZE .SGA is known as dynamic for its feature to resize its components online without shut/startup of instance/DB. Unit of allocation of memory blocks are known as granule. Granule size in 4MB if SGA is < 128MB else 16 MB

Oracle maintains granule information for each of the components of SGA



What is oracle database ? Part II

$
0
0
Will walk through the SGA memory components in detail below


1. Database Buffer


Database buffer plays significant role in SGA by keeping blocks/granules read from datafile & allowing user processes to read/write the block concurrently. DB cache value is driven by parameter DB_CACHE_SIZE

Database buffer/Cache manages the blocks by an internal algorithm using write & LRU (Least Recently Used) lists





Write List holds all the dirty blocks, means the blocks which are modified by user processes in memory & should be written to DB file back again to retain consistent image of a row/data.

LRU list contains two ends, MRU (Most Recently Used) & LRU (Least Recently Used).

LRU end holds dirty, pined, free buffer/blocks. Pinned buffer means blocks which are currently in use & free is free J

Dirty blocks held by LRU end of LRU list are being moved to write list.








Whenever user process accesses the buffer it has been moved to MRU end of LRU list, mostly fresh/Recently read blocks from data files found in MRU end.


Cache hit/miss: First time if an oracle process requesting a block is found in database buffer is known as a cache hit, else it must fetch it from data file into buffer know as direct IO & should be considered as cache miss


Database buffer also holds static components keep (db_keep_cache_size) & recycle buffer (db_recycle_cache_size)
Data blocks of the segments allocated to KEEP buffer cache retained in memory
Database blocks of the segments allocated to RECYCLE are wiped out of memory as soon as they are no longer needed , making room for other RECYCLE segment blocks
DEFAULT buffer pool holds segment blocks which are not assigned to any of the above buffer pool
By default segments allocated to DEFAULT buffer pool
Oracle also supports non-default db block sizes in database buffer 2K, 4K, 8K, 16K, 32K by parameters DB_2K_CACHE_SIZE,
DB_4K_CACHE_SIZE,
DB_8K_CACHE_SIZE,
DB_16K_CACHE_SIZE,
DB_32K_CACHE_SIZE

DB buffer Flush occurs when...

-Checkpoint occurs/forced by alter system checkpoint;
-Dirty Buffer list is full & no more free block is available for incoming block
-Alter system flush BUFFER_POOL; is executed

Moving default segment pool to KEEP:

select owner,segment_name,buffer_pool from dba_segments where owner='SEBS' and segment_name='CDRV_RIC_PART';

alter table SEBS.CDRV_RIC_PART  storage ( buffer_pool keep);




Verifying Buffer Pool stats:
select name,BLOCK_SIZE,CURRENT_SIZE,BUFFERS,RESIZE_STATE  from  v$buffer_pool;





          2.  Shared Pool

Shared Pool in SGA is further divided into Library & Dictionary Cache. SHARED_POOL_SIZE parameter reserves space for shared pool

          

Library Cache:
It holds shared/private sql area, sql’s & plsql code like function procedures & control structures like locks/Enques
Each user process has its private sql area (in shared server mode) & shared sql area stored in shared pool.
Shared sql area holds parse trees, explain plan , compilation program unit information of the sql’s , procedure , function, triggers executed by a user process which is shared among all the other user processes executing similar statement
Each executing session has its own private sql area , in dedicated server mode its located in PGA whereas in shared server mode it’s in shared pool
LRU algorithm is used to remove least used library information & make way to new sql’s stats

Dictionary Cache:

Also known as row cache as it holds data as complete row instead of specific block
Dictionary contains metadata of the objects & views , structure & its users/privileges

Oracle flushes the shared pool when…
-Analyze statement is used to update the objects stats
-Objects is Modified
-Objects is Invalidate/Re-validated, re-compilation
-alter system flush shared_pool; is executed

Use below query to get all components of shared pool:


select pool, name, bytes   from v$sgastat where pool like '%shared_pool%' order by pool, name;

What is oracle database ? Part III

$
0
0
 3. Large Pool

Large pool was brought in to optimize shared pool by isolating heavy IO servers operation like Backup/restoration using parameter LARGE_POOL_SIZE.
Large Pool allocates memory required during disk IO server process operations of Backup & recovery.
Also parallel query buffers & Oracle XA memory allocation taken care by large pool

select pool, name, bytes   from v$sgastat where pool like '%large_pool%' order by pool, name;

    4. Java Pool

Java pool memory is used for all session-specific Java code and data within the JVM.
The Java Pool Advisor statistics provide information about library cache memory used for Java and predict how changes in the size of the Java pool can affect the parse rate. The Java Pool Advisor is internally turned on when statistics_level is set to TYPICAL or higher. These statistics resets when the advisor is turned off.

select pool, name, bytes   from v$sgastat where pool like '%java%' order by pool, name;


    5.  Redo Buffer

Redo Log Buffer is circular buffer residing in SGA. It holds redo entries generated due to DB changes. Redo Entries contains information to reconstruct the changes made to database by DML(insert, update,delete) & DDL (alter, create or replace , drop , truncate ) operations. Redo Buffer is flushed to Redo Log files required for Recovery.
log_buffer parameter sets the buffer value in SGA, which is not auto tuned by ASMM(Automatic Shared Memory Management).
The server processes generate redo data into the log buffer as they make changes to the data blocks in the buffer. LGWR subsequently writes entries from the redo log buffer to the online redo log 
   6. Fixed SGA

The fixed SGA is a un alterable component of the SGA that varies in size based on platform & release.
The fixed SGA contains references to the other components of the SGA and variables that contain the values of various parameters. 
Its bootstrap section used by Oracle internally to find the other bits and pieces of the SGA.

select pool, name, bytes   from v$sgastat where name like '%fixed_sga%'  order by pool, name;

  7.  Stream Pool

The streams pool is used exclusively by Oracle Streams.




It stores buffered queue messages, and it provides memory for Oracle Streams capture processes and apply processes.

Initial size of the stream pool set by streams_pool_size parameter & default value is zero.
The pool size grows dynamically as needed when Oracle Streams is used.


select pool, name, bytes   from v$sgastat where pool like '%stream%' order by pool, name; 

   8. Flash Back Buffer

Oracle Flashback feature supports retrieving the historical stat of the db object using Database flashback logs, undo or recyclebin.
Flashback requires past image of the objects retrieved using various methods e.g flashback query version to fetch data as on historical timestamp,  recyclebin to recover dropped table in which tables is renamed to hexadecimal naming format & retained till free space pressure arrives in particular tablespace

To support flashback mechanism flashback buffers stores altered/dirty buffers from database buffer before being moved to database flash back logs/disk by RVWR background process (will discuss in later stage).

   9. Program Global Area (PGA)

For every user connecting to DB a PGA area is created from PGA memory from OS RAM
PGA consists of stack space, session/cursor information & Private sql area (in dedicated server mode)
Oracle 10g onwards PGA size is managed by pga_aggregate_target & WORKAREA_SIZE_POLICY (value AUTO) parameter else it can managed by setting sort_area_size and hash_area_size parameters

select * from v$pga_target_advice order by pga_target_for_estimate;
select * from v$pgastat;
select max(pga_used_mem), max(pga_alloc_mem), max(pga_max_mem) from v$process;

The PGA has great impression performance due to queries involving huge sorts (ORDER by and GROUP BY commands in SQL)
Apart from this PGA supports Hash-join , Bitmap related operations , Write buffers used by bulk load operations
Below Query can be used for optimal re-sizing of PGA & to review PGA stats

select * from v$pga_target_advice order by pga_target_for_estimate;
select * from v$pgastat;
select max(pga_used_mem), max(pga_alloc_mem), max(pga_max_mem) from v$process;



   10. UGA


The User Global Area (UGA) is memory resides in OS RAM holds session information like sorts & hash joins of each user process.
In dedicated server mode UGA is a part of PGA being one to one relationship between User & Server Process
Whereas in shared server mode it has been moved to SGA as user sessions are served by multiple server processes



select name, sum(value/1024) "Value in KB"
 from v$statname n,
 v$session s,
 v$sesstat t
 where s.sid=t.sid
 and n.statistic# = t.statistic#
 and s.type = 'USER'
 and s.username is not NULL
 and n.name in ('session pga memory', 'session pga memory max',
 'session uga memory', 'session uga memory max')
 group by name
 /


What is oracle database ? Part IV

$
0
0




    1.   PMON
    2.   SMON
    3.   DBWn
    4.   LGWR
    5.   CKPT
    6.   ARCn
    7.   RECO
    8.   RVWR
    9.   MMON
  10.   MMNL
  11.   MMAN
  12.   CJQn






         1.  PMON

PMON is an oracle background process called process monitor.
PMON responsible for releasing Locks & cleaning up cache post abrupt termination of user process holding resources
PMON also communicates workload advisory to listener in real application cluster environment which helps listener to redirect connection to least loaded instance
PMON restarts dispatcher & server process if it fails
PMON is responsible for service registration to listener which avoids manual configuration of service in listener.ora file by supplying information like database/instance name & its current/maximum load, dispatcher/server mode (shared/dedicated) info.
         2.  SMON

SMON is system monitor process.
SMON is responsible for performing instance recovery during startup of DB post abrupt shutdown/termination of instance.
SMON performs two operation while performing instance recovery i.e. Roll forward & Roll Back during which it refers UNDO & Online Redo log file
SMON coalesces adjacent free extents into large free extents in dictionary managed tablespace
It wakes up every 5 min to perform Housekeeping activity, killing SMON background process terminates instance
In RAC, SMON process of one instance can perform instance recovery of other instance that has failed

SMON cleans up temporary segments that are no longer in use and recovers dead transactions which were skipped during system failure/instance recovery because of file-read errors or offline file status. Such transactions are recovered by SMON when the tablespace or data file is brought back online.  

        3. DBWn

DBWn is database writer background process, number of process n ranging from 0-9 , a-j  total 20 max
The initialization parameter DB_WRITER_PROCESSES specifies the number of DBWn processes.
It writes modified blocks from the database buffer cache to the datafiles.
Database selects an appropriate default setting for this initialization parameter based upon the number of CPUs and processor groups if it is not set at startup

DBWn writes buffers when:
- A DBWn timeout occurs (every 3 seconds).
- A normal or incremental checkpoint occurs.
- The number of dirty buffers reaches a threshold value.
- A process scans a specified number of blocks when scanning free buffers and cannot find any.
- A normal or temporary tablespace is placed offline.
- A tablespace is put into read-only mode. 
- A tablespace is dropped or truncated.
- ALTER TABLESPACE <tablespace_name> BEGIN BACKUP; is executed

Modified or new data is not necessarily written to a datafile immediately. To reduce the amount of disk access and to increase performance, data is pooled in memory and written to the appropriate data files all at once (in bulk mode), as determined by the background process database writer process (DBWn).

The disk write can happen before or after the commit.

After a COMMIT, the database writes the redo buffers to disk but does not immediately write data blocks to disk. Instead, database writer (DBWn) performs lazy writes in the background.

        4. LGWR

LGWR is Log writer background oracle process
LGWR process writes redo log buffer in to online redo log files & members simultaneously
It also signals archival process when a redo log group is about to get overwritten if DB is in ARCHIVELOG Mode

Oracle Database uses a fast commit mechanism to improve performance for committed transactions.
When a user issues a COMMIT statement, the transaction is assigned a system change number (SCN). LGWR puts a commit record in the redo log buffer and writes it to disk immediately, along with the commit SCN and transaction's redo entries.

The redo log buffer is circular. When LGWR writes redo entries from the redo log buffer to an online redo log file, server processes can copy new entries over the entries in the redo log buffer that have been written to disk.
LGWR normally writes fast enough to ensure that space is always available in the buffer for new entries, even when access to the online redo log is heavy.

The atomic write of the redo entry containing the transaction's commit record is the single event that determines the transaction has committed. Oracle Database returns a success code to the committing transaction although the data buffers have not yet been written to disk. The corresponding changes to data blocks are deferred until it is efficient for DBWn to write them to the data files.

LGWR can write redo log entries to disk before a transaction commits.
The redo entries become permanent only if the transaction later commits.
When activity is high, LGWR can use group commits.
For example, a user commits, causing LGWR to write the transaction's redo entries to disk. During this write to disk LGWR can write the list of redo entries of waiting transactions for other user processes (not yet committed) in one operation instead of performing IO followed by every user process commit. In this way, the database minimizes disk I/O and maximizes performance. If commits requests continue at a high rate, then every write by LGWR can contain multiple commit records.

LGWR writes synchronously to the active mirrored group of online redo log files. If a log file is inaccessible, then LGWR continues writing to other files in the group and writes an error to the LGWR trace file and the alert log. If all files in a group are damaged, or if the group is unavailable because it has not been archived, then LGWR cannot continue to function and DB hangs.

In the following circumstances, LGWR writes to redo log file:
 -A user commits a transaction
 -An online redo log switch occurs.
 -Three seconds have passed since LGWR last wrote.
 -The redo log buffer is one-third full or contains 1 MB of buffered data.
 -DBWn must write modified buffers to disk.


       5.  CKPT

CKPT is an oracle background process ensures that database is consistent by ensuring that all committed transactions have been written to datafiles
A checkpoint manages/ensures following three operations:
               a)       Every dirty block in the buffer cache is written to the data files.
        b)    The latest SCN is written (updated) into the datafile header.
        c)    The latest SCN is also written to the control files.

Events that trigger a checkpoint are:
- Redo log switch
- LOG_CHECKPOINT_TIMEOUT has expired
- LOG_CHECKPOINT_INTERVAL has been reached
- alter system checkpoint; is executed
- Tablespaces/database put in  hot backup

Note: redo log switches cause a checkpoint, checkpoints don't cause a log switch.
Set LOG_CHECKPOINTS_TO_ALERT=TRUE to see checkpoint information in alert log

Types of Checkpoint




In Incremental Checkpoint, checkpoint information is written to the control file. In the following cases:

1. Every three second.
2. At the time of log switch - Sometimes log switches may trigger a complete checkpoint, if the next log where the log switch is to take place is Active.

In Complete Checkpoint, checkpoint information is written in control file, datafile header and also dirty block is written by DBWR to the datafiles.

 Full Checkpoint happens in the following cases.

 1. To meet fast_start_mttr_target
 2. before Clean Shutdown
 3. Some log switches may trigger a complete checkpoint , if the next log where the log switch is to take place is Active.
 This has more chance of happening when the Redo Log files are small in size and continuous transactions are taking place.
 4. when the 'alter system checkpoint' command is issued

Partial Checkpoint happens in the following cases.

 1. Before begin backup.
 2. before tablespace offline.
 3. before placing tablespace in read only.
 4. before dropping tablespace.
 5. before taking datafile offline.
 6. When checkpoint queue exceeds its threshold.
 7. Before segment is dropped.


 8. Before adding and removing columns from table.

What is oracle database ? Part V

$
0
0
   6. ARCn

ARCn is background process spawn in ARCHIVELOG DB mode, where n ranges from 0-9
ARCn copies online redo log files to a designated storage device after
- A log switch has occurred
- alter database archivelog current; is executed
- No more online redo log file is available & to be overwritten

An Oracle instance can have up to 10 ARCn processes (ARC0 to ARC9). The LGWR process starts a new ARCn process whenever the current number of ARCn processes is insufficient to handle the workload. The alert file keeps a record of when LGWR starts a new ARCn process.

Dynamic LOG_ARCHIVE_MAX_PROCESSES can be set to max 10.
Starting from one ARCn process oracle automatically starts up more ARCn processes till LOG_ARCHIVE_MAX_PROCESSES when the database workload requires more.

Arch can be stopped and started dynamically with alter system archive log stop|start or using below commands (deprecated 10g onwards)

archive log list
archive log stop
archive log start
archive log next
archive log all
archive log n

Query v$archive_processes to find out how many arch processes are running

       7. RECO

In a distributed database, the recoverer process (RECO) automatically resolves failures in distributed transactions.
The RECO process of a node automatically connects to other databases involved in an in-doubt distributed transaction. When RECO re-establishes a connection between the databases, it automatically resolves all in-doubt transactions, removing from each database's pending transaction table any rows that correspond to the resolved transactions

       8. RVWR

The Recovery Writer process is responsible for writing to the flashback logs in the flash recovery area.

These logs are required to restore the database to a previous point in time by using the "flashback" option for Oracle databases (Oracle 10g and later)

       9. MMON

MMON is a Memory Monitor background process (10g onwards)
MMON gathers memory statistics (snapshots) stores this information in the AWR (automatic workload repository).
MMON is also responsible for issuing alerts for metrics that exceed their thresholds.
Statistics gathered by MMON snaps are used by ADDM (Automatic Database Diagnostic Monitor) to generate database workload & performance report helpful for tuning
MMON computes short duration metrics every 15 seconds and long duration metrics every 60 seconds

     10. MMNL

MMNL is a Memory Monitor Light background process that assists the MMON process.
This process will flush the ASH buffer to AWR tables when the buffer is full or a snapshot is taken.

      11.  MMAN

MMAN is Memory Manager Background process (10g onwards)
MMAN manages ASSM (Automatic Shared Memory management) by dynamically resizing SGA dynamic components
MMAN is spawn whenever SGA_TARGET parameter is set to non-zero value i.e. when ASSM is enabled
It dynamically resizes Database buffer, Shared Pool, Large Pool, Java Pool memory components based on workload
v$sga_dynamic_components view shows memory components & their dynamic values

     12. CJQn

CJQn is a Job Queue background Process.
Oracle Database uses job queue processes to run user jobs, often in batch mode.

A job is a user-defined task scheduled to run one or more times. For example, you can use a job queue to schedule a long-running update in the background. Given a start date and a time interval, the job queue processes attempt to run the job at the next occurrence of the interval.

Oracle Database manages job queue processes dynamically, thereby enabling job queue clients to use more job queue processes when required. The database releases resources used by the new processes when they are idle.
Dynamic job queue processes can run a large number of jobs concurrently at a given interval. The sequence of events is as follows:

The job coordinator process (CJQ0) is automatically started and stopped as needed by Oracle Scheduler.
The coordinator process periodically selects jobs that need to be run from the system JOB$ table.
New jobs selected are ordered by time.

The coordinator process dynamically spawns job queue slave processes (Jnnn) to run the jobs.
The job queue process runs one of the jobs that was selected by the CJQ0 process for execution. Each job queue process runs one job at a time to completion.

After the process finishes execution of a single job, it polls for more jobs. If no jobs are scheduled for execution, then it enters a sleep state, from which it wakes up at periodic intervals and polls for more jobs. If the process does not find any new jobs, then it terminates after a preset interval.

The initialization parameter JOB_QUEUE_PROCESSES represents the maximum number of job queue processes that can concurrently run on an instance. However, clients should not assume that all job queue processes are available for job execution.

The coordinator process is not started if the initialization parameter JOB_QUEUE_PROCESSES is set to 0.

What is oracle database ? Part VI

$
0
0


  1.  Parameter 
  2.  Password
  3.  tnsnames
  4.  Listener
  5.  Sqlnet
  6.  Control file
  7.  Data files
  8.  Temp file
  9.  Online Redo Log File
10. Archive Log


          1.  Parameter

Parameter is a mandatory file required to start database instance in nomount stage by reading instance characteristics
Parameter files hold DB parameter & its respective values
Below Query can be used to find parameter file being used during db startup

SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"  FROM v$parameter WHERE name = 'spfile';

Parameter files located in default location $ORACLE_HOME/dbs (UNIX) & %ORACLE_HOME%database (Windows)


PFILE:

PFILE is a text file & editable using editors like  vi in Unix & notepad  in windows
PFILE is the static parameter file i.e. to reflect modified parameter values requires restart of the instance
Although PFILE is supported in all DB Versions it was the only supported parameters file in oracle 8i & lower

SPFILE

SPFILE is a binary file can be updated using “ALTER SYSTEM SET <parameter>=<value>”
If SPFILE is modified using editor then it returns below error while starting up DB

ORA-01078:falilure in processing system parameters
ORA-01565: error in identifying file 'C:\oracle\SPFILEMRTEDEV.ora'
ORA-27046:file size is not a multiple of logical block size

SPFILE can be backed up using RMAN

CONFIGURE CONTROLFILE AUTOBACKUP ON;
BACKUP CURRENT CONTROLFILE FORMAT ‘<location>/ctl_%U’;

Dynamic parameters can be updated in SPFILE without need of instance re-start

Identifying Parameter’s characteristics:

ISDEFAULT –
TRUE if value default and not changed since instance creation.
Also note event if value is set to default value again post changes it needs db restart followed by “alter system reset <parameter>” to reflect value as TRUE in view
FALSE if value is modified or it could be default value changes at least once since instance creation without reset/restart

ISSES_MODIFIABLE –
TRUE if parameter can be modified by “alter session set <parameter>=<value>;” else FALSE

ISSYS_MODIFIABLE –
Has below values based on ability to modify parameters using “ALTER SYSTEM SET <parameter>=<value>;”
IMMEDIATE — can be altered regardless of what type of parameter file was used to start the instance and changes take effect immediately
DEFERRED — can be altered regardless of what type of parameter file was used to start the instance and change will take effect in subsequent sessions
FALSE — can only be changed when a SPFILE is used, you need to bounce the instance.

ISINSTANCE_MODIFIABLE –


It is related to RAC.
If this value is set to ‘TRUE’ for a parameter, it means that there can be different value of the same parameter in different instance in RAC.
If the value is set to ‘FALSE’, it means that particular parameter should always have the same value in all RAC instances.
If issys_modifiable value is ‘FALSE’ for the specific parameter then ISINSTANCE_MODIFIABLE is always ‘FALSE’ for the same parameter.


ISMODIFIED –

MODIFIED - Parameter has been modified with ALTER SESSION
SYSTEM_MOD - Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions' values to be modified)
FALSE - Parameter has not been modified after instance startup

ISADJUSTED –

Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

ISDEPRECATED –

Indicates whether the parameter has been deprecated (TRUE) or not (FALSE)

Parameter Modification Options:

Parameters can be modified using “ALTER SYSTEM SET <parameter>=<value> SCOPE=<SPFILE/MEMORY/BOTH>”
Where,
SCOPE = SPFILE  (For both static and dynamic parameters, changes are recorded in the spfile, takes effect on restart)
SCOPE = MEMORY (For dynamic parameters, changes are applied in memory only. No static parameter change is allowed.)
SCOPE = BOTH (For dynamic parameters, the change is applied in both the server parameter file and memory. No static parameter change is allowed.)
For dynamic parameters, we can also specify the DEFERRED keyword. When specified, the change is effective only for future sessions
ALTER SYSTEM SET <parameter> = <value> [DEFERRED]

What is oracle database ? Part VII

$
0
0

     2. Password

If the DBA wants to startup a stopped oracle instance whose database dictionary is not accessible how oracle would authenticate the DBA?
With the Help of password file & parameter remote_login_passwordfile or using OS authentication
This will allow authentication of the DBA to happen outside of the database either using password file or through the operating system (sqlplus “/ as sysdba”) from oracle owner.
The init parameter remote_login_passwordfile specifies if a password file is used to authenticate the DBA or not. If it set either to shared or exclusive a password file will be used.
The default location for the password file is: $ORACLE_HOME/dbs/orapw$ORACLE_SID on Unix and %ORACLE_HOME%\database\PWD%ORACLE_SID%.ora on Windows.

Password files creation:



orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>
Where

FILE
Complete file name path to be specified along with name e.g. FILE=/u01/app/ora11g/product/11.2.0/dbhome_1/orapwMYDB.
Supplying only a file name will create password file in current directory
The contents of this file are encrypted.

ENTRIES
Number of entries/distinct users allowed connecting DB using SYSDBA/SYSOPER
Entries can be reused as users are added to and removed from the password file
Refer below snaps to identify how ENTRIES can be validated using v$pwfile_users






FORCE
If set to Y, overwrite an existing password file.
If not set or set to N an error is returned if a password file of the same name already exists

IGNORECASE
If set to y, passwords are case-insensitive.
If not set or set to N password is case-sensitive.

Setting REMOTE_LOGIN_ PASSWORDFILE

In addition to creating the password file, initialization parameter REMOTE_LOGIN_PASSWORDFILE should be set to the appropriate value. The possible values are:

NONE: Oracle Database to behave as if the password file does not exist. That is, no privileged connections are allowed over nonsecure connections.

EXCLUSIVE: (default) An EXCLUSIVE password file can be used with only one instance of one database. It enables to add, modify, and delete users & to change the SYS password with the ALTER USER command.

SHARED: A SHARED password file can be used by multiple databases running on the same server, or multiple instances of an Oracle Real Application Clusters (RAC) database. A SHARED password file cannot be modified. This means that you cannot add users to a SHARED password file. Any attempt to do so or to change the password of SYS or other users with the SYSDBA or SYSOPER privileges generates an error. All users needing SYSDBA or SYSOPER system privileges must be added to the password file when REMOTE_LOGIN_PASSWORDFILE is set to EXCLUSIVE. After all users are added, you can change REMOTE_LOGIN_PASSWORDFILE to SHARED, and then share the file.
This option is useful if you are administering multiple databases or a RAC database.

If REMOTE_LOGIN_PASSWORDFILE is set to EXCLUSIVE or SHARED and the password file is missing, this is equivalent to setting REMOTE_LOGIN_PASSWORDFILE to NONE.

        3. Tnsnames

tnsnams.ora is a configuration file mostly required by clients (but located on both client & Server)  connecting to DB for resolving the connection specification which contains net service names mapped to connect descriptors or net service names mapped to listener protocol addresses.
File Located in $ORACLE_HOME/network/admin

Sample TNS entry:

REMTST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = remedy-ebu-test-db1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = REMTST)
    )
  )

A successful connection can be made it tnsping, ping, telnet to specified host/IP resolves

[ora11g@remedy-ebu-test-db1 ~]$ tnsping REMTST
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 04-DEC-2012 18:07:14
Copyright (c) 1997, 2011, Oracle.  All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = remedy-ebu-test-db1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = REMTST)))
OK (50 msec)

       4.  Listener
Listener.ora is a SQL*Net configuration file used to configure Oracle Database Listeners required to accept remote connection requests
File Located in $ORACLE_HOME/network/admin

LISTENER_REMTST =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) (HOST = remedy-ebu-test-db1)(PORT = 1526))
    )


  )

What is oracle database ? Part VIII

$
0
0
      5. Sqlnet

The "sqlnet.ora" file contains client side network configuration parameters located at "$ORACLE_HOME/network/admin" or "$ORACLE_HOME/net80/admin" directory on the client.
This file will also be present on the server if client style connections are used on the server itself.
Here is an example of an "sqlnet.ora" file.

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH set to specify the order of the naming methods used for client name resolution lookups

Tnsnames Set to resolve a net service name through the tnsnames.ora file on the client
Ldap Set to resolve a database service name, net service name, or net service alias through a directory server.
ezconnect or hostname Select to enable clients to use a TCP/IP connect identifier, consisting of a host name and optional port and service name
cds Set to resolve an Oracle database name in a Distributed Computing Environment (DCE) environment.
Nis Set to resolve an Oracle database name in a Distributed Computing Environment (DCE) environment.

SQLNET.AUTHENTICATION_SERVICES used to enable one or more authentication services.
If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.

NONE for no authentication methods. A valid username and password can be used to access the database.
ALL for all authentication methods
NTS for Windows NT native authentication

       6. Control file

Control file is a small binary file that records the physical structure of the database. The control file also includes:

-The database name
-Names and locations of associated datafiles and redo log files
-The timestamp of the database creation
-The current log sequence number
-Checkpoint information

The control file must be available for writing by the Oracle Database server whenever the database is open.
It is being read/written in Mount stage.
Without the control file, the database cannot be mounted.

The control file of an Oracle Database is created at the same time as the database. By default, at least one copy of the control file is created during database creation. More than one copy of contolfile is recommended

select * from v$controlfile;



       7. Data files

Datafiles are physical files stored on disk which consists of User, System, Undo segments.
Data file constitutes the actual database & it holds almost 90% of the actual database size
Database datafiles are only written to by the DBWR processes that we introduced you to earlier.
These database datafiles are associated with Oracle “Tablespaces”, which are “logical” containers for tables and indexes. 

To get DB file details:

select * from v$datafile;  <Used generally when db is in mount/open stage>
select * from dba_data_files;  <Used generally when db is in open stage>

To get free space in dbfiles:
select dt.tablespace_name,round(sum(df.bytes)/1024/1024/1024,0) "Free_GB"
from dba_free_space df,dba_tablespaces dt
where df.tablespace_name=dt.tablespace_name(+)
and df.tablespace_name not in (select tablespace_name from dba_temp_files)
group by dt.tablespace_name
order by 1;

To get allocated space in dbfiles:

select dt.tablespace_name,round(sum(bytes)/1024/1024/1024,0) "GB"
from dba_data_files df,dba_tablespaces dt
where df.tablespace_name=dt.tablespace_name(+)
and df.tablespace_name not in (select tablespace_name from dba_temp_files)
group by dt.tablespace_name
order by 1;

DB files are integral part of database recorded in contolfile, loss of any online db file lead to db crash until it is taken offline or replaced with valid backup followed by recovery

        8. Temp file

Temporary tablespaces are used to manage space for database sort operations and for storing global temporary tables.
For example, if you join two large tables, and Oracle cannot do the sort in memory, space will be allocated in a temporary tablespace for doing the sort operation.
Other SQL operations that might require disk sorting are: CREATE INDEX, ANALYZE, Select DISTINCT, ORDER BY, GROUP BY, UNION, INTERSECT, MINUS, Sort-Merge joins, etc.

To get temp file details:
select * from v$tempfile; <Used generally when db is in mount/open stage>
select  * from dba_temp_files; <Used generally when db is in open stage>

To get  free space in Temp tablespace :

select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
select TABLESPACE_NAME,round(sum(FREE_SPACE)/1024/1024,0) "FREE_MB" from dba_temp_free_space group by tablespace_name; <11g onwards>

As temp files are not recorded in control file, absence of temp file can be tolerated but SYSTEM tablespace will act as TEMP tablespace

          9.  Online Redo Log File

Online redo log holds redo entry for every sql statement processed in database written by LGWR sequentially in available redo log file groups
Redo log plays important role in DB/Instance recovery post DB crash to identify the status of the transaction (committed/uncommitted)

Each DB holds minimum two Online redo log file group , one as a current redo log being written & other for archiving
After each log switch a new unique sequential number has been assigned to every redo thread



log switch is the point at which Oracle ends writing to current  online redo log file and begins writing to next available.. Manually log switch can happen using “alter system switch logfile;”
Single instance DB contains single thread with minimum two groups & a member
In RAC, number of thread equivalent to number of instances running in cluster with each thread representing/Used by an instance
Redo log Members helps in Multiplexing the redo log files to safe guard against damage/loss of the disk
Multiple members under a same group/thread hold the duplicate copy of the redo file
Each member of a group can be spanned across multiple disk controllers so that failure of a single disk would not lead to loss of a complete redo group

       10.  Archive Log

Archive log files are historical image of online redo log file.
When database in ARCHIVELOG Mode, before a redo log file gets overwritten content of that redo log copied to archive log files in the archive destination specified by init parameter log_archive_dest & in the format specified by log_archive_format

Archive log file name formed by sequence#, thread# & reset log id (10g onwards)

Archive log files can be backed using RMAN & required for recovery

Archive log list provide details of the archive mode, current /archived redo sequence & location of the archive destination



Thats It !!!

sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory

$
0
0
Error:

Post Client installation receiving error as 

[oracle@testlaba ~]$ sqlplus "/ as sysdba"

sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory


Possible Cause:

i.  Incomplete installation 
ii. Missing library files
iii. Missing prerequisites OS packages
iv. In appropriate environment setting 


Will go through steps to troubleshoot the issue to get resolution 

Troubleshooting:

i.  OS level command Tracing 
[oracle@testlaba ~]$ strace sqlplus "/ as sysdba"
execve("/rdbms/app/12.1.0.2/bin/sqlplus", ["sqlplus", "/ as sysdba"], [/* 30 vars */]) = 0
brk(0)                                  = 0xab0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe27ec7b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/rdbms/app/12.1.0.2/lib/tls/x86_64/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/rdbms/app/12.1.0.2/lib/tls/x86_64", 0x7fff731bb930) = -1 ENOENT (No such file or directory)
open("/rdbms/app/12.1.0.2/lib/tls/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/rdbms/app/12.1.0.2/lib/tls", 0x7fff731bb930) = -1 ENOENT (No such file or directory)
open("/rdbms/app/12.1.0.2/lib/x86_64/libsqlplus.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/rdbms/app/12.1.0.2/lib/x86_64", 0x7fff731bb930) = -1 ENOENT (No such file or directory)
open("/rdbms/app/12.1.0.2/lib/libsqlplus.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\374\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1546540, ...}) = 0
mmap(NULL, 3112424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe27e983000
mprotect(0x7fe27ea6d000, 2093056, PROT_NONE) = 0
mmap(0x7fe27ec6c000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe9000) = 0x7fe27ec6c000
close(3)                                = 0
open("/rdbms/app/12.1.0.2/lib/libclntsh.so.12.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\233N\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=58793741, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe27e982000
mmap(NULL, 50056080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe27b9c5000
mprotect(0x7fe27e580000, 2097152, PROT_NONE) = 0
mmap(0x7fe27e780000, 1974272, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2bbb000) = 0x7fe27e780000
mmap(0x7fe27e962000, 129936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe27e962000
mprotect(0x7fff731bc000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = 0
close(3)                                = 0
open("/rdbms/app/12.1.0.2/lib/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=40181, ...}) = 0
mmap(NULL, 40181, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe27b9bb000
close(3)                                = 0
open("/lib64/tls/x86_64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fff731bb8d0) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/lib64/x86_64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fff731bb8d0)   = -1 ENOENT (No such file or directory)
open("/lib64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0555, st_size=12288, ...}) = 0
open("/usr/lib64/tls/x86_64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7fff731bb8d0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/usr/lib64/x86_64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7fff731bb8d0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libclntshcore.so.12.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=36864, ...}) = 0
writev(2, [{"sqlplus", 7}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libclntshcore.so.12.1", 21}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory
) = 128
exit_group(127)                         = ?

+++ exited with 127 +++

It looks like missing lib files post installation , let's search for missing lib files


ii. In Search if missing library file

[oracle@testlaba ]$ cd $ORACLE_HOME/lib

[oracle@testlaba lib]$ ls -lrt
total 418140
-rw-r--r--. 1 oracle oracle    56899 Sep 25  2000 jdev-rt.zip
-rw-r--r--. 1 oracle oracle   280984 Oct 23  2001 mail.jar
-rw-r--r--. 1 oracle oracle    45386 Oct 23  2001 activation.jar
-rw-r--r--. 1 oracle oracle    37948 Jun  9  2006 jcr-1.0.jar
-rw-------. 1 oracle oracle   408282 Nov  8  2011 libexpat.so.1.5.2
-rw-------. 1 oracle oracle   408282 Nov  8  2011 libexpat.so.1
-rw-------. 1 oracle oracle   408282 Nov  8  2011 libexpat.so
-rw-------. 1 oracle oracle      793 Nov  8  2011 libexpat.la
-rw-------. 1 oracle oracle   617772 Nov  8  2011 libexpat.a
-rw-r--r--. 1 oracle oracle   358124 Jan 31  2013 libwwg.a
-rw-r--r--. 1 oracle oracle        0 Oct 17  2013 clntsh.map
-rw-r--r--. 1 oracle oracle   812074 Nov 14  2013 libccme_ecc_accel_fips.so
-rw-r--r--. 1 oracle oracle   129660 Dec  3  2013 libipp_z.a
-rw-r--r--. 1 oracle oracle 47924222 Dec  3  2013 libippsmerged.a
-rw-r--r--. 1 oracle oracle  4971338 Dec  3  2013 libippsemerged.a
-rw-r--r--. 1 oracle oracle  2652644 Dec  3  2013 libippdcmerged.a
-rw-r--r--. 1 oracle oracle   339570 Dec  3  2013 libippdcemerged.a
-rw-r--r--. 1 oracle oracle   103952 Dec  3  2013 libippcore.a
-rw-r--r--. 1 oracle oracle   116302 Dec  3  2013 libipp_bz2.a
-rw-r--r--. 1 oracle oracle   445946 Jan  2  2014 libcryptocme.so
-rw-r--r--. 1 oracle oracle     2638 Jan  2  2014 libcryptocme.sig
-rw-r--r--. 1 oracle oracle   709631 Jan  2  2014 libccme_ecc.so
-rw-r--r--. 1 oracle oracle   555820 Jan  2  2014 libccme_base.so
-rw-r--r--. 1 oracle oracle   415660 Jan  2  2014 libccme_asym.so
-rw-r--r--. 1 oracle oracle   461494 May  6  2014 libccme_ecc_non_fips.so
-rw-r--r--. 1 oracle oracle    91568 Jun 18  2014 libowm2.so
-rw-r--r--. 1 oracle oracle    75510 Jun 18  2014 libldapjclnt12.so
-rw-r--r--. 1 oracle oracle 20829764 Jun 18  2014 libnnzst12.a
-rw-r--r--. 1 oracle oracle  2457778 Jun 18  2014 libipc1.a
-rw-r--r--. 1 oracle oracle   666598 Jun 18  2014 libmql1.a
-rw-r--r--. 1 oracle oracle   544150 Jun 18  2014 libmql1.so
-rw-r--r--. 1 oracle oracle  1768370 Jun 18  2014 libipc1.so
-rw-r--r--. 1 oracle oracle   265906 Jun 19  2014 libunls12.a
-rw-r--r--. 1 oracle oracle   356272 Jun 19  2014 libsnls12.a
-rw-r--r--. 1 oracle oracle  2919180 Jun 19  2014 libnls12.a
-rw-r--r--. 1 oracle oracle   120118 Jun 19  2014 liblxled.a
-rw-r--r--. 1 oracle oracle   197030 Jun 26  2014 libncrypt12.a
-rw-r--r--. 1 oracle oracle     5784 Jun 26  2014 nautab.o
-rw-r--r--. 1 oracle oracle   353883 Jun 26  2014 ojcr.jar
-rw-r--r--. 1 oracle oracle  1540260 Jun 27  2014 libnl12.a
-rw-r--r--. 1 oracle oracle 11448910 Jun 27  2014 libxml12.a
-rw-r--r--. 1 oracle oracle    40130 Jun 27  2014 libntns12.a
-rw-r--r--. 1 oracle oracle    29204 Jun 27  2014 libnhost12.a
-rw-r--r--. 1 oracle oracle    13162 Jun 27  2014 libnoname12.a
-rw-r--r--. 1 oracle oracle   329216 Jun 27  2014 libnldap12.a
-rw-r--r--. 1 oracle oracle   203755 Jun 27  2014 xsu12.jar
-rw-r--r--. 1 oracle oracle   596274 Jun 27  2014 xml.jar
-rw-r--r--. 1 oracle oracle    97280 Jun 27  2014 xmlcomp.jar
.
.
.
.
-rw-r--r--. 1 oracle oracle    96003 Jul  7  2014 libnfsodm12.so
-rw-r--r--. 1 oracle oracle  2576030 Jul  7  2014 libocci.so.12.1
-rw-r--r--. 1 oracle oracle   406094 Jul  7  2014 libxdb.so
-rw-r--r--. 1 oracle oracle  1670948 Jul  7  2014 libasmclntsh12.so
-rw-r--r--. 1 oracle oracle  1135218 Jul  7  2014 libskgxpg.so
-rw-r--r--. 1 oracle oracle  1135218 Jul  7  2014 libskgxp12.so
-rw-r--r--. 1 oracle oracle    10046 Jul  7  2014 libvsn12_std.a.dbl
-rw-r--r--. 1 oracle oracle    10070 Jul  7  2014 libvsn12_cse.a.dbl
-rw-r--r--. 1 oracle oracle    10078 Jul  7  2014 libvsn12_cee.a.dbl
-rw-r--r--. 1 oracle oracle    10030 Jul  7  2014 libvsn12.a
-rw-r--r--. 1 oracle oracle    13906 Jul  7  2014 libskgxn2.so
-rw-r--r--. 1 oracle oracle  2530064 Jul  7  2014 libagtsh.so.1.0
-rw-r--r--. 1 oracle oracle  6791124 Jul  7  2014 libcell12.so
-rw-r--r--. 1 oracle oracle        0 Jul  7  2014 libclntst12.a
drwxr-xr-x. 2 oracle oracle     4096 Jul 19 12:59 stubs
lrwxrwxrwx. 1 oracle oracle       15 Jul 19 13:00 libocci.so -> libocci.so.12.1
lrwxrwxrwx. 1 oracle oracle       15 Jul 19 13:00 libagtsh.so -> libagtsh.so.1.0
lrwxrwxrwx. 1 oracle oracle       41 Jul 19 13:00 libclntsh.so -> /rdbms/app/12.1.0.2/lib/libclntsh.so.12.1
-rw-r--r--. 1 oracle oracle      115 Jul 19 13:22 ldflagsO
-rw-r--r--. 1 oracle oracle      115 Jul 19 13:22 ldflags
-rw-r--r--. 1 oracle oracle     2512 Jul 19 13:22 ntcontab.o
-rw-r--r--. 1 oracle oracle     1968 Jul 19 13:22 nnfgt.o
-rw-r--r--. 1 oracle oracle  9169174 Jul 19 13:22 libn12.a
-rw-r--r--. 1 oracle oracle        0 Jul 19 13:22 clntshcore.map
[oracle@testlaba lib]$ pwd
/rdbms/app/12.1.0.2/lib
[oracle@testlaba lib]$ pwd
/rdbms/app/12.1.0.2/lib
[oracle@testlaba lib]$ sqlplus -c
sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory
[oracle@testlaba lib]$ ls -lrt libclntshcore.so.12.1
ls: cannot access libclntshcore.so.12.1: No such file or directory
[oracle@testlaba lib]$ sudo -l
[sudo] password for oracle:
Matching Defaults entries for oracle on this host:
    logfile=/var/log/sudolog, timestamp_timeout=30, tty_tickets, env_delete+=SUDO_USER
User oracle may run the following commands on this host:
    (root) ALL
[oracle@testlaba lib]$ sudo find -name "libclntshcore.so.12.1"
[oracle@testlaba lib]$ sudo find / -name "libclntshcore.so.12.1"

[oracle@testlaba lib]$ pwd

/rdbms/app/12.1.0.2/lib



No Luck , Can't find the missing lib


sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory

$
0
0

iii. Client re-installation 

Cleanup up old binaries 

[oracle@testlaba /]$ cd /rdbms
[oracle@testlaba rdbms]$ ls -lrt
total 28
drwx------. 2 oracle root   16384 Jul 14 17:47 lost+found
drwx------. 3 oracle oracle  4096 Jul 19 12:47 client_dump
drwxr-xr-x. 2 oracle oracle  4096 Jul 19 12:59 oraInventory
drwx------. 6 oracle oracle  4096 Jul 19 13:49 app

[oracle@testlaba rdbms]$ rm -rf app oraInventory
[oracle@testlaba response]$ mkdir -p /rdbms/app/oraInventory


Prepare response file for silent installation 


[oracle@testlaba response]$ ls -lrt
total 24
-rwxrwxr-x. 1 oracle oracle 6038 Jan 24  2014 netca.rsp
-rw-------. 1 oracle oracle 8029 Jul 19 12:48 client_install.rsp_1
-rw-rw-r--. 1 oracle oracle 8121 Jul 19 12:55 client_install.rsp
[oracle@testlaba response]$ more client_install.rsp
###############################################################################
## Copyright(c) Oracle Corporation 1998,2014. All rights reserved.           ##
##                                                                           ##
## Specify values for the variables listed below to customize                ##
## your installation.                                                        ##
##                                                                           ##
## Each variable is associated with a comment. The comment                   ##
## can help to populate the variables with the appropriate                   ##
## values.                                                                   ##
##                                                                           ##
###############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v12.1.0
#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user.
# It can be used to force the installation to use an alternative
# hostname rather than using the first hostname found on the system
# (e.g., for systems with multiple hostnames and network interfaces).
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=testlaba.msdk.co.in
#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=dba
#-------------------------------------------------------------------------------
# Inventory location.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/rdbms/app/oraInventory
#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.
#
# en   : English                  ja   : Japanese
# fr   : French                   ko   : Korean
# ar   : Arabic                   es   : Latin American Spanish
# bn   : Bengali                  lv   : Latvian
# pt_BR: Brazilian Portuguese     lt   : Lithuanian
# bg   : Bulgarian                ms   : Malay
# fr_CA: Canadian French          es_MX: Mexican Spanish
# ca   : Catalan                  no   : Norwegian
# hr   : Croatian                 pl   : Polish
# cs   : Czech                    pt   : Portuguese
# da   : Danish                   ro   : Romanian
# nl   : Dutch                    ru   : Russian
# ar_EG: Egyptian                 zh_CN: Simplified Chinese
# en_GB: English (Great Britain)  sk   : Slovak
# et   : Estonian                 sl   : Slovenian
# fi   : Finnish                  es_ES: Spanish
# de   : German                   sv   : Swedish
# el   : Greek                    th   : Thai
# iw   : Hebrew                   zh_TW: Traditional Chinese
# hu   : Hungarian                tr   : Turkish
# is   : Icelandic                uk   : Ukrainian
# in   : Indonesian               vi   : Vietnamese
# it   : Italian
#
# all_langs   : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
#-------------------------------------------------------------------------------
ORACLE_HOME=/rdbms/app/12.1.0.2
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=/rdbms/app
#------------------------------------------------------------------------------
#Name       : INSTALL_TYPE
#Datatype   : String
#Description: Installation type of the component.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#               - InstantClient
#               - Administrator
#               - Runtime
#               - Custom
#
#Example    : INSTALL_TYPE = Administrator
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator
#-------------------------------------------------------------------------------
# Name       : oracle.install.client.customComponents
# Datatype   : StringList
#
# This property is considered only if INSTALL_TYPE is set to "Custom"
#
# Description: List of Client Components you would like to install
#
#   The following choices are available. You may specify any
#   combination of these choices.  The components you choose should
#   be specified in the form "internal-component-name:version"
#   Below is a list of components you may specify to install.
#
# oracle.sqlj:12.1.0.2.0 -- "Oracle SQLJ"
# oracle.rdbms.util:12.1.0.2.0 -- "Oracle Database Utilities"
# oracle.javavm.client:12.1.0.2.0 -- "Oracle Java Client"
# oracle.sqlplus:12.1.0.2.0 -- "SQL*Plus"
# oracle.dbjava.jdbc:12.1.0.2.0 -- "Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:12.1.0.2.0 -- "Oracle Internet Directory Client"
# oracle.rdbms.oci:12.1.0.2.0 -- "Oracle Call Interface (OCI)"
# oracle.precomp:12.1.0.2.0 -- "Oracle Programmer"
# oracle.xdk:12.1.0.2.0 -- "Oracle XML Development Kit"
# oracle.network.aso:12.1.0.2.0 -- "Oracle Advanced Security"
# oracle.oraolap.mgmt:12.1.0.2.0 -- "OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:12.1.0.2.0 -- "Oracle Net"
# oracle.network.cman:12.1.0.2.0 -- "Oracle Connection Manager"
# oracle.network.listener:12.1.0.2.0 -- "Oracle Net Listener"
# oracle.ordim.client:12.1.0.2.0 -- "Oracle Multimedia Client Option"
# oracle.odbc:12.1.0.2.0 -- "Oracle ODBC Driver"
# oracle.has.client:12.1.0.2.0 -- "Oracle Clusterware High Availability API"
# oracle.dbdev:12.1.0.2.0 -- "Oracle SQL Developer"
# oracle.rdbms.scheduler:12.1.0.2.0 -- "Oracle Scheduler Agent"
#
# Example    : oracle.install.client.customComponents="oracle.precomp:12.1.0.2.0","oracle.oraolap.mgmt:12.1.0.2.0","oracle.rdbms.scheduler:12.1.0.2.0"
#-------------------------------------------------------------------------------
oracle.install.client.customComponents=
#-------------------------------------------------------------------------------
# Host name to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example    : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=
#------------------------------------------------------------------------------
# Port number to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example: oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------

oracle.install.client.schedulerAgentPortNumber=


Initiate installation and search in logs in case any error  


[oracle@testlaba response]$ pwd
/rdbms/client_dump/client/response
[oracle@testlaba response]$ cd ..
[oracle@testlaba client]$ ls -lrt
total 28
-rwxrwxr-x.  1 oracle oracle  500 Feb  7  2013 welcome.html
-rwxr-xr-x.  1 oracle oracle 8537 Jul  7  2014 runInstaller
drwxr-xr-x.  4 oracle oracle 4096 Jul  7  2014 install
drwxr-xr-x. 14 oracle oracle 4096 Jul  7  2014 stage

drwxrwxr-x.  2 oracle oracle 4096 Jul 19 13:46 response

[oracle@testlaba client]$ ./runInstaller -silent -responsefile  /rdbms/client_dump/client/response/client_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 415 MB.   Actual 4168 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 7990 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-07-19_01-48-11PM. Please wait ...[oracle@testlaba client]$ [WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /rdbms/app/oraInventory/logs/installActions2017-07-19_01-48-11PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /rdbms/app/oraInventory/logs/installActions2017-07-19_01-48-11PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:

 /rdbms/app/oraInventory/logs/installActions2017-07-19_01-48-11PM.log


Located missing OS package errors in log



[oracle@testlaba client]$ more /rdbms/app/oraInventory/logs/installActions2017-07-19_01-48-11PM.log..INFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:compat-libcap1-1.10INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available....INFO: OverallStatus:VERIFICATION_FAILEDINFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:compat-libstdc++-33(x86_64)-3.2.3INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available.INFO: -----------------------------------------------....INFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:libstdc++-devel(x86_64)-4.4.4INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "libstdc++-devel(x86_64)" is missing on node "testlaba"..INFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:gcc-4.4.4INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "gcc" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available...INFO: Verification Result for Node:testlabaINFO: Expected Value:gcc-c++-4.4.4INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "gcc-c++" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available...INFO: OverallStatus:VERIFICATION_FAILEDINFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:kshINFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "ksh" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available.INFO: -----------------------------------------------INFO: *********************************************..INFO: -----------------------------------------------INFO: Verification Result for Node:testlabaINFO: Expected Value:libaio-devel(x86_64)-0.3.107INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "libaio-devel(x86_64)" is missing on node "testlaba"INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.INFO: Action: Ensure that the required package is installed and available.INFO: -----------------------------------------------..INFO: FINE: [VerificationCommand.execute:297]Output: '<CV_VAL>package compat-libcap1 is not installed</CV_VAL><CV_VRES>0</CV_VRES><CV_LOG>Exectask: Package information retrieval successful</CV_LOG><CV_CMDLOG><CV_INITCMD>/tmp/CVU_12.1.0.2.0_oracle/exectask -chkpackage compat-libcap1 </CV_INITCMD><CV_CMD>/bin/rpm -q --queryformat '<PACKAGE><NAME,%{NAME}><ARCH,%{ARCH}><VERSION,%{VERSION}-%{RELEASE}></PACKAGE>' compat-libcap1 | /bin/sort -u</CV_CMD><CV_CMDOUT> package compat-libcap1 is not installed</CV_CMDOUT><CV_CMDSTAT>0</CV_CMDSTAT></CV_CMDLOG><CV_ERES>0</CV_ERES>'INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"INFO: FINE: [Task.perform:594]TaskPackage:Package: compat-libcap1-1.10[TASKPACKAGE]:TASK_SUMMARY:FAILED:IGNORABLE:VERIFICATION_FAILED          ERRORMSG(testlaba): PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"INFO: FINE: [Task.perform:493]

Generic search for all missing errors


[oracle@testlaba client]$ cat /rdbms/app/oraInventory/logs/installActions2017-07-19_01-48-11PM.log | grep -i missingINFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "libstdc++-devel(x86_64)" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "gcc" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "gcc-c++" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "ksh" is missing on node "testlaba"INFO: Actual Value:missingINFO: Error Message:PRVF-7532 : Package "libaio-devel(x86_64)" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "compat-libcap1" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "libstdc++-devel(x86_64)" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "libstdc++-devel(x86_64)" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "gcc" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "gcc" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "gcc-c++" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "gcc-c++" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "ksh" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "ksh" is missing on node "testlaba"INFO: ERROR: [Result.addErrorDescription:624]  PRVF-7532 : Package "libaio-devel(x86_64)" is missing on node "testlaba"          ERRORMSG(testlaba): PRVF-7532 : Package "libaio-devel(x86_64)" is missing on node "testlaba"INFO: OUI-10066:Not all the dependencies for the component Oracle Client 12c 12.1.0.2.0  could be found. Missing component oracle.doc 12.1.0.2.0.INFO: OUI-10066:Not all the dependencies for the component Required Support Files 12.1.0.2.0  could be found. Missing component oracle.rsf.hybrid 12.1.0.2.0.


sqlplus: error while loading shared libraries: libclntshcore.so.12.1: cannot open shared object file: No such file or directory

$
0
0


iv. Fix-up errors , missing OS packages 


[oracle@testlaba client]$ yum install compat-libcap1
Loaded plugins: product-id, rhnplugin, security, subscription-manager
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
You need to be root to perform this command.
[oracle@testlaba client]$ sudo yum install compat-libcap1
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
rhel-x86_64-server-6                                         | 1.8 kB     00:00
rhel-x86_64-server-6/primary                                 |  28 MB     00:06
rhel-x86_64-server-6                                         19612/19612
Resolving Dependencies
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package       Arch      Version           Repository                     Size
==================================================================================
Installing:
 compat-libcap1         x86_64    1.10-1    rhel-x86_64-server-6           17 k

Transaction Summary
==================================================================================
Install       1 Package(s)

Total download size: 17 k
Installed size: 29 k
Is this ok [y/N]: y
Downloading Packages:
compat-libcap1-1.10-1.x86_64.rpm                           |  17 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : compat-libcap1-1.10-1.x86_64                               1/1
  Verifying  : compat-libcap1-1.10-1.x86_64                               1/1

Installed:
  compat-libcap1.x86_64 0:1.10-1

Complete!

[oracle@testlaba client]$ sudo yum install libaio-devel
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
 Package          Arch    Version       Repository                        Size
=================================================================================
Installing:
 libaio-devel   x86_64  0.3.107-10.el6  rhel-x86_64-server-6              13 k

Transaction Summary
=================================================================================
Install       1 Package(s)

Total download size: 13 k
Installed size: 23 k
Is this ok [y/N]: y
Downloading Packages:
libaio-devel-0.3.107-10.el6.x86_64.rpm                     |  13 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libaio-devel-0.3.107-10.el6.x86_64                              1/1
  Verifying  : libaio-devel-0.3.107-10.el6.x86_64                              1/1

Installed:
  libaio-devel.x86_64 0:0.3.107-10.el6

Complete!
[oracle@testlaba client]$ sudo yum install compat-libstdc++-33
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version       Repository                Size
================================================================================
Installing:
 compat-libstdc++-33    x86_64  3.2.3-69.el6    rhel-x86_64-server-6       183 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 183 k
Installed size: 806 k
Is this ok [y/N]: y
Downloading Packages:
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm           | 183 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                  1/1
  Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                  1/1

Installed:
  compat-libstdc++-33.x86_64 0:3.2.3-69.el6

Complete!
[oracle@testlaba client]$ sudo yum install libstdc++-devel
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libstdc++-devel.x86_64 0:4.4.7-18.el6 will be installed
--> Processing Dependency: libstdc++(x86-64) = 4.4.7-18.el6 for package: libstdc++-devel-4.4.7-18.el6.x86_64
--> Running transaction check
---> Package libstdc++.x86_64 0:4.4.7-16.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-18.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch      Version      Repository                     Size
=================================================================================
Installing:
 libstdc++-devel    x86_64    4.4.7-18.el6    rhel-x86_64-server-6        1.6 M
Updating for dependencies:
 libstdc++     x86_64    4.4.7-18.el6     rhel-x86_64-server-6           295 k

Transaction Summary
==================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 1.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): libstdc++-4.4.7-18.el6.x86_64.rpm               | 295 kB     00:02
(2/2): libstdc++-devel-4.4.7-18.el6.x86_64.rpm         | 1.6 MB     00:04
-----------------------------------------------------------------------------------
Total                                        206 kB/s | 1.9 MB     00:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libstdc++-4.4.7-18.el6.x86_64                                1/3
  Installing : libstdc++-devel-4.4.7-18.el6.x86_64                          2/3
  Cleanup    : libstdc++-4.4.7-16.el6.x86_64                                3/3
  Verifying  : libstdc++-devel-4.4.7-18.el6.x86_64                          1/3
  Verifying  : libstdc++-4.4.7-18.el6.x86_64                                2/3
  Verifying  : libstdc++-4.4.7-16.el6.x86_64                                3/3

Installed:
  libstdc++-devel.x86_64 0:4.4.7-18.el6

Dependency Updated:
  libstdc++.x86_64 0:4.4.7-18.el6

Complete!
[oracle@testlaba client]$ sudo yum install gcc
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-18.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-18.el6 for package: gcc-4.4.7-18.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-18.el6 for package: gcc-4.4.7-18.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-18.el6 for package: gcc-4.4.7-18.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-18.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-18.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-18.el6.x86_64
---> Package libgcc.x86_64 0:4.4.7-16.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-18.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-16.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-18.el6 will be an update
--> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
 Package         Arch     Version         Repository                        Size
=================================================================================
Installing:
 gcc             x86_64      4.4.7-18.el6       rhel-x86_64-server-6         10 M
Installing for dependencies:
 cloog-ppl       x86_64      0.15.7-1.2.el6      rhel-x86_64-server-6       93 k
 cpp             x86_64     4.4.7-18.el6        rhel-x86_64-server-6       3.7 M
 mpfr            x86_64      2.4.1-6.el6       rhel-x86_64-server-6        156 k
 ppl             x86_64      0.10.2-11.el6    rhel-x86_64-server-6         1.3 M
Updating for dependencies:
 libgcc          x86_64      4.4.7-18.el6      rhel-x86_64-server-6         103 k
 libgomp         x86_64      4.4.7-18.el6      rhel-x86_64-server-6         134 k

Transaction Summary
=================================================================================
Install       5 Package(s)
Upgrade       2 Package(s)

Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                 |  93 kB     00:00
(2/7): cpp-4.4.7-18.el6.x86_64.rpm                          | 3.7 MB     00:05
(3/7): gcc-4.4.7-18.el6.x86_64.rpm                     |  10 MB     00:04
(4/7): libgcc-4.4.7-18.el6.x86_64.rpm                        | 103 kB     00:00
(5/7): libgomp-4.4.7-18.el6.x86_64.rpm                         | 134 kB     00:00
(6/7): mpfr-2.4.1-6.el6.x86_64.rpm                            | 156 kB     00:00
(7/7): ppl-0.10.2-11.el6.x86_64.rpm                          | 1.3 MB     00:02
----------------------------------------------------------------------------------
Total                                                                                                                                   729 kB/s |  16 MB     00:21
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libgcc-4.4.7-18.el6.x86_64                                       1/9
  Installing : ppl-0.10.2-11.el6.x86_64                                         2/9
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                  3/9
  Installing : mpfr-2.4.1-6.el6.x86_64                                          4/9
  Installing : cpp-4.4.7-18.el6.x86_64                                          5/9
  Updating   : libgomp-4.4.7-18.el6.x86_64                                      6/9
  Installing : gcc-4.4.7-18.el6.x86_64                                          7/9
  Cleanup    : libgcc-4.4.7-16.el6.x86_64                                       8/9
  Cleanup    : libgomp-4.4.7-16.el6.x86_64                                      9/9
  Verifying  : cpp-4.4.7-18.el6.x86_64                                          1/9
  Verifying  : libgomp-4.4.7-18.el6.x86_64                                      2/9
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                          3/9
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                  4/9
  Verifying  : libgcc-4.4.7-18.el6.x86_64                                       5/9
  Verifying  : gcc-4.4.7-18.el6.x86_64                                          6/9
  Verifying  : ppl-0.10.2-11.el6.x86_64                                         7/9
  Verifying  : libgomp-4.4.7-16.el6.x86_64                                      8/9
  Verifying  : libgcc-4.4.7-16.el6.x86_64                                       9/9

Installed:
  gcc.x86_64 0:4.4.7-18.el6

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6              cpp.x86_64 0:4.4.7-18.el6              mpfr.x86_64 0:2.4.1-6.el6              ppl.x86_64 0:0.10.2-11.el6

Dependency Updated:
  libgcc.x86_64 0:4.4.7-18.el6                                                       libgomp.x86_64 0:4.4.7-18.el6

Complete!
[oracle@testlaba client]$ sudo yum install ksh
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ksh.x86_64 0:20120801-35.el6_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package       Arch          Version             Repository                 Size
===================================================================================
Installing:
 ksh         x86_64     20120801-35.el6_9    rhel-x86_64-server-6           761 k
Transaction Summary
==================================================================================
Install       1 Package(s)

Total download size: 761 k
Installed size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
ksh-20120801-35.el6_9.x86_64.rpm                                                                                                                 | 761 kB     00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ksh-20120801-35.el6_9.x86_64                                    1/1
  Verifying  : ksh-20120801-35.el6_9.x86_64                                    1/1

Installed:
  ksh.x86_64 0:20120801-35.el6_9

Complete!
[oracle@testlaba client]$ sudo yum install gcc-c++
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-18.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package          Arch         Version            Repository               Size
==================================================================================
Installing:
 gcc-c++          x86_64     4.4.7-18.el6    rhel-x86_64-server-6      4.7 M

Transaction Summary
======================================================================================
Install       1 Package(s)

Total download size: 4.7 M
Installed size: 11 M
Is this ok [y/N]: y
Downloading Packages:
gcc-c++-4.4.7-18.el6.x86_64.rpm                             | 4.7 MB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : gcc-c++-4.4.7-18.el6.x86_64                                     1/1
  Verifying  : gcc-c++-4.4.7-18.el6.x86_64                                     1/1

Installed:
  gcc-c++.x86_64 0:4.4.7-18.el6

Complete!
[oracle@testlaba client]$ sudo yum install libaio-devel
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Package libaio-devel-0.3.107-10.el6.x86_64 already installed and latest version

Nothing to do

v. Install client post fix-up 

[oracle@testlaba client]$ ./runInstaller  -silent -responsefile  /rdbms/client_dump/client/response/client_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 415 MB.   Actual 4168 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 7990 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-07-19_01-58-19PM. Please wait ...[oracle@testlaba client]$ You can find the log of this install session at:

 /rdbms/app/oraInventory/logs/installActions2017-07-19_01-58-19PM.log


[oracle@testlaba client]$ The installation of Oracle Client 12c was successful.

Please check '/rdbms/app/oraInventory/logs/silentInstall2017-07-19_01-58-19PM.log' for more details.

Successfully Setup Software.


Check if any missing errors

[oracle@testlaba client]$ cat /rdbms/app/oraInventory/logs/installActions2017-07-19_01-58-19PM.log | grep -i missing
INFO: OUI-10066:Not all the dependencies for the component Oracle Client 12c 12.1.0.2.0  could be found. Missing component oracle.doc 12.1.0.2.0.
INFO: OUI-10066:Not all the dependencies for the component Required Support Files 12.1.0.2.0  could be found. Missing component oracle.rsf.hybrid 12.1.0.2.0.
INFO: OUI-10066:Not all the dependencies for the component Oracle Universal Installer 12.1.0.2.0  could be found. Missing component oracle.sysman.ccr 10.3.1.0.0.
[oracle@testlaba client]$ cat /rdbms/app/oraInventory/logs/installActions2017-07-19_01-58-19PM.log | grep -i missing
INFO: OUI-10066:Not all the dependencies for the component Oracle Client 12c 12.1.0.2.0  could be found. Missing component oracle.doc 12.1.0.2.0.
INFO: OUI-10066:Not all the dependencies for the component Required Support Files 12.1.0.2.0  could be found. Missing component oracle.rsf.hybrid 12.1.0.2.0.

INFO: OUI-10066:Not all the dependencies for the component Oracle Universal Installer 12.1.0.2.0  could be found. Missing component oracle.sysman.ccr 10.3.1.0.0.

[oracle@testlaba client]$ sqlplus -v

SQL*Plus: Release 12.1.0.2.0 Production


Success ! ! !

steps to get adsense approval for your website or blog

$
0
0


Getting Google AdSense approval for your website or blogging site requires consistent effort with discipline And has no shortcuts or tricks


Following steps will guide you to know the prerequisites for creating a good website and will increase chances to get your website approved by AdSense


1. Know your subject

Congratulations ! For making your mind agree to create your own website which puts you in blogger/writer category.

Any website need a unique topic which acts as a brand throughout the life cycle , so it has to be so strong to keep you thinking for long time without any deviation.

Identify your subject for the website which could relate to you in day to day life and helps to write with ease than a burden.

2. Sketch down your thinking

Having subject in mind gives you food for thought , each and every action will derive findings.

Get your thinking collated at every stage which could be converted into a successful story

Making notes or adding reminders to keep track of the ideas is very much important.

3. Choose website designer

Search for a good website designer which could be either www.blogger.com or www.wordpress.com or any of your own custom style

Creating website in blogger has upper hand as it belongs to Google , most of the searches all over the world are ignites from the google search engine itself

Choose a unique website name which could retrieve less number of pages when searched.

4. Create website template

Get your website template ready which should be attractive and suits your subject.

Not mandatory to freeze your design as it may vary as you go on , but make sure it looks relevant and doesn't impact the content formatting during changes


5. Startup with content

At this stage you are ready to bring your first content on webpad. Create a simple blog with at least 50 lines without a glitch in spells and meaning

Always verify your each paragraph and review it again before publishing it post a preview.

6. Create set of blogs/posts

Create at least 20-25 webpages on your websites over a period of 1-2 months , keep consistency in creating posts.

Regulate the frequency with which you publish your content online say 4 posts a week with adequate content useful to users 

7. Perform analysis

By this stage you have got hands on in creating web blogs with knowledge on content to showcase , look and feel of the website to attract the user community 

Its time to analyze your efforts through analytics.google.com

Get your website added to monitoring various metrics like user count , sessions , avg session duration and many more.

Stats from Google analytic or from blogger will help to identify the requirement of users and you will try to put more efforts in topics received highest page views

8. Get your own domain wisely

Based on the stats you analyzed , its time to get you own domain name and remove blogspot.com or wordpress.com from your website

However , this is important step for the life of your blog and you need to be honest here.

I have seen over the past years many bloggers have felt themselves in wrong lane post getting the domain and many of them end up their website due to cost/disapproval factor

Now why is it so important and what is to be done ? 

i. get your stats on correct path. At this stage you should be having over 20-25 web blogs almost older by 1-2 months.  

ii. genuine hits on the blogs should be minimum 100 per day , i said genuine means you have either not generated yourself nor asked your friends to do same within same subnet

iii. domain provider that you will select should have good reputation and will help to hold your pages ahead in search engine. my favorite www.enom.com

As you will be putting 1o-15$ to launch your website on your own domain so the expectations to manage the cost would also go high. And you will desperately look to get your adsense account approved. but you need to hold on .... 

loosing patience here may land you in risk i specified earlier in this point ..

9. Keep it going

You have got you own domain Such as www.moreajays.com  So be happy !

Now all your users and famous web pages will get redirect to the domain and will take couple of weeks time to get new stats on new domain. Do make a change for the same in google analytics

You need to wait for at least 1 more month without stopping blog creation 

Take you blog count to 30+ and analyse the stats.

10. Apply for AdSense

Here we go , time has arrived to monetized your website by applying at www.google.com/adsense

Google will monitor your website for genuine user hits along with other copyright checks over a week or two and one fine day you will get google adsense approval mail in inbox as below



11. Avoid this !


  • Do not copy content from other website , you can provide link of the other website if relevant
  • Do not hit your website on your own or ask friends to do same which will decrease your chance of approval
  • Do not put auto refresh in webpage
  • Do not keep changing the template every week which will annoy the users
  • Do not change the domain and keep it in auto renewal payment mode to avoid loosing your brand name
  • Do not take more than a week's gap to post new blog


Happy blogging !



CRS-4013: This command is not supported in a single-node configuration

$
0
0
Issue:Getting CRS-4013 , CRS-4000 error while starting up cluster services


CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Start failed, or completed with errors.

One of the cluster node is reporting the CRS-4013 , CRS-4000 error while other node is up in 2 node RAC cluster 

Solution:

1. Error while starting up cluster on problematic node(mytestlab1283)

[ora12c@mytestlab1283 ~]$ ps -ef | grep pmon
ora12c  8572 8540  0 10:59 pts/0    00:00:00 grep --color=auto pmon

[ora12c@mytestlab1283 ~]$ . ./.bash_profile_asm
[ora12c@mytestlab1283 ~]$ which crsctl
/rdbms/app/12.1.0.2/grid/bin/crsctl

[ora12c@mytestlab1283 ~]$ sudo /rdbms/app/12.1.0.2/grid/bin/crsctl start crs
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Start failed, or completed with errors.

2.  Check resource status on working node (mytestlab12834) 

[ora12c@mytestlab1284 ~]$ ps -ef | grep pmon
ora12c    2601  2550  0 11:09 pts/0  00:00:00 grep --color=auto pmon
ora12c   23415     1  0 May09 ?      00:10:50 asm_pmon_+ASM2
ora12c   23517     1  0 May09 ?      00:12:00 ora_pmon_oemdbmn2

[ora12c@mytestlab1283 ~]$ sudo /rdbms/app/12.1.0.2/grid/bin/crsctl stop crs -f
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Stop failed, or completed with errors.

[ora12c@mytestlab1283 ~]$ crsctl check css
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.

[ora12c@mytestlab1284 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[ora12c@mytestlab1284 ~]$ crsctl status res -t
------------------------------------------------------------
Name    Target State   Server   State details Local Resources
-------------------------------------------------------------
ora.DATA.dg ONLINE  ONLINE       mytestlab1284            STABLE
ora.FRA.dg  ONLINE  ONLINE       mytestlab1284            STABLE
ora.LISTENER.lsnr ONLINE  ONLINE   mytestlab1284          STABLE
ora.OCR_VOTING.dg  ONLINE  ONLINE   mytestlab1284         STABLE
ora.asm  ONLINE  ONLINE       mytestlab1284         Started,STABLE
ora.net1.network   ONLINE  ONLINE   mytestlab1284         STABLE
ora.ons   ONLINE  ONLINE    mytestlab1284                 STABLE
--------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr 1  ONLINE  ONLINE mytestlab1284    STABLE
ora.LISTENER_SCAN2.lsnr 1  ONLINE  ONLINE  mytestlab1284   STABLE
ora.LISTENER_SCAN3.lsnr 1 ONLINE  ONLINE   mytestlab1284   STABLE
ora.MGMTLSNR      1       OFFLINE  OFFLINE                 STABLE 
ora.cvu       1    ONLINE ONLINE    mytestlab1284          STABLE
ora.mytestlab1283.vip 1 ONLINE INTERMEDIATE mytestlab1284  FAILED OVER,STABLE
ora.mytestlab1284.vip  1 ONLINE ONLINE mytestlab1284       STABLE
ora.oc4j    1    ONLINE ONLINE    mytestlab1284            STABLE
ora.oemdbmn.db  1    ONLINE  OFFLINE                       STABLE
                2    ONLINE  ONLINE  mytestlab1284 Open,STABLE 
ora.scan1.vip    1     ONLINE  ONLINE   mytestlab1284    STABLE
ora.scan2.vip    1     ONLINE  ONLINE   mytestlab1284    STABLE
ora.scan3.vip    1     ONLINE  ONLINE   mytestlab1284    STABLE
-------------------------------------------------------------------


[ora12c@mytestlab1284 trace]$ srvctl config database -d oemdbmn
Database unique name: oemdbmn
Database name: oemdbmn
Oracle home: /rdbms/app/oracle/12.1.0.2/db
Oracle user: ora12c
Spfile: +DATA/OEMDBMN/PARAMETERFILE/spfile.268.943049417
Password file: +DATA/OEMDBMN/PASSWORD/pwdoemdbmn.256.943049111
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: dba
Database instances: oemdbmn1,oemdbmn2
Configured nodes: mytestlab1283,mytestlab1284
Database is administrator managed


3.  Stop crs on working node (mytestlab12834) 

[ora12c@mytestlab1284 ~]$ sudo /rdbms/app/12.1.0.2/grid/bin/crsctl stop crs
[sudo] password for ora12c:
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'mytestlab1284'
CRS-2673: Attempting to stop 'ora.crsd' on 'mytestlab1284'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'mytestlab1284'
CRS-2673: Attempting to stop 'ora.oemdbmn.db' on 'mytestlab1284'
CRS-2673: Attempting to stop 'ora.oc4j' on 'mytestlab1284'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'mytestlab1284'
.
.
.
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'mytestlab1284' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'mytestlab1284'
CRS-2677: Stop of 'ora.cssd' on 'mytestlab1284' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'mytestlab1284'
CRS-2677: Stop of 'ora.gipcd' on 'mytestlab1284' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'mytestlab1284' has completed
CRS-4133: Oracle High Availability Services has been stopped.

[ora12c@mytestlab1284 ~]$ ps -ef | grep pmon
ora12c    6311  5970  0 11:29 pts/1    00:00:00 grep --color=auto pmon

4. Execute below on problematic node (mytestlab1283) 

[ora12c@mytestlab1283 ~]$ sudo /rdbms/app/12.1.0.2/grid/bin/crsctl start crs
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Start failed, or completed with errors.


sudo /rdbms/app/12.1.0.2/grid/crs/install/rootcrs.sh -deconfig -force

sudo /rdbms/app/12.1.0.2/grid/root.sh




5. Verify logs and crs process status on OS 

[ora12c@mytestlab1283 ~]$ ps -ef | grep -i crs
root     25735 25646  0 12:55 pts/0    00:00:00 /bin/sh /rdbms/app/12.1.0.2/grid/crs/config/rootconfig.sh
root     25744 25735  0 12:55 pts/0    00:00:00 /rdbms/app/12.1.0.2/grid/perl/bin/perl -I/rdbms/app/12.1.0.2/grid/perl/lib -I/rdbms/app/12.1.0.2/grid/crs/install /rdbms/app/12.1.0.2/grid/crs/install/rootcrs.pl
root     25763 25744  0 12:55 pts/0    00:00:00 /bin/sh /rdbms/app/12.1.0.2/grid/crs/install/tfa_setup -silent -crshome /rdbms/app/12.1.0.2/grid
ora12c   26600 26372  0 12:57 pts/1    00:00:00 grep --color=auto -i crs

[ora12c@mytestlab1283 ~]$ ps -ef | grep -i crs
root     25735 25646  0 12:55 pts/0    00:00:00 /bin/sh /rdbms/app/12.1.0.2/grid/crs/config/rootconfig.sh
root     25744 25735  0 12:55 pts/0    00:00:00 /rdbms/app/12.1.0.2/grid/perl/bin/perl -I/rdbms/app/12.1.0.2/grid/perl/lib -I/rdbms/app/12.1.0.2/grid/crs/install /rdbms/app/12.1.0.2/grid/crs/install/rootcrs.pl
root     28153 25744  0 12:58 pts/0    00:00:00 sh -c /bin/su ora12c -c ' echo CLSRSC_START; /rdbms/app/12.1.0.2/grid/bin/cluutil -ckpt -oraclebase /rdbms/app/oracle -chkckpt -name ROOTCRS_INITRES ' 2>&1
root     28154 28153  0 12:58 pts/0    00:00:00 /bin/su ora12c -c  echo CLSRSC_START; /rdbms/app/12.1.0.2/grid/bin/cluutil -ckpt -oraclebase /rdbms/app/oracle -chkckpt -name ROOTCRS_INITRES
ora12c   28155 28154  0 12:58 ?        00:00:00 bash -c  echo CLSRSC_START; /rdbms/app/12.1.0.2/grid/bin/cluutil -ckpt -oraclebase /rdbms/app/oracle -chkckpt -name ROO CRS_INITRES
ora12c   28156 28155  0 12:58 ?        00:00:00 /bin/sh /rdbms/app/12.1.0.2/grid/bin/cluutil -ckpt -oraclebase /rdbms/app/oracle -chkckpt -name ROOTCRS_INITRES
ora12c   28159 28156  0 12:58 ?        00:00:00 /rdbms/app/12.1.0.2/grid/jdk/bin/java -DTRACING.ENABLED=true -DTRACING.LEVEL=2 -classpath /rdbms/app/12.1.0.2/grid/jlib/srvm.jar:/rdbms/app/12.1.0.2/grid/jlib/srvmhas.jar:/rdbms/app/12.1.0.2/grid/oui/jlib/OraCheckPoint.jar:/rdbms/app/12.1.0.2/grid/oui/jlib/OraInstaller.jar:/rdbms/app/12.1.0.2/grid/oui/jlib/xmlparserv2.jar oracle.ops.util.ClusterUtil -ckpt -oraclebase /rdbms/app/oracle -chkckpt -name ROOTCRS_INITRES
ora12c   28172 26372  0 12:58 pts/1    00:00:00 grep --color=auto -i crs


[ora12c@mytestlab1283 ~]$ tail -f /rdbms/app/12.1.0.2/grid/install/root_mytestlab1283.vsnl.co.in_2017-08-10_13-01-13.log
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /rdbms/app/12.1.0.2/grid/crs/install/crsconfig_params
2017/08/10 13:01:14 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2017/08/10 13:03:00 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2017/08/10 13:03:01 CLSRSC-363: User ignored prerequisites during installation
2017/08/10 13:04:06 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'mytestlab1283'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'mytestlab1283'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'mytestlab1283'
CRS-2673: Attempting to stop 'ora.gipcd' on 'mytestlab1283'
CRS-2673: Attempting to stop 'ora.evmd' on 'mytestlab1283'
CRS-2677: Stop of 'ora.gpnpd' on 'mytestlab1283' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'mytestlab1283' succeeded
CRS-2677: Stop of 'ora.evmd' on 'mytestlab1283' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'mytestlab1283' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'mytestlab1283' has completed
.
.
.
.
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'mytestlab1283'
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'mytestlab1283' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'mytestlab1283' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'mytestlab1283' succeeded
CRS-2672: Attempting to start 'ora.oemdbmn.db' on 'mytestlab1283'
CRS-2676: Start of 'ora.oc4j' on 'mytestlab1283' succeeded
CRS-2676: Start of 'ora.oemdbmn.db' on 'mytestlab1283' succeeded
CRS-6016: Resource auto-start has completed for server mytestlab1283
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2017/08/10 13:07:53 CLSRSC-343: Successfully started Oracle Clusterware stack
PRKO-2190 : VIP exists for node mytestlab1283, VIP name mytestlab1283-vip.vsnl.co.in
PRKZ-1072 : SCAN name "XPDBoemdbmn" is already registered on network 1
PRCS-1028 : Single Client Access Name (SCAN) listener resources already exist on network 1
PRCN-3004 : Listener MGMTLSNR already exists
PRCR-1086 : resource ora.cvu is already registered
PRCC-1014 : scan1 was already running
PRCR-1004 : Resource ora.scan1.vip is already running
PRCR-1079 : Failed to start resource ora.scan1.vip
CRS-5702: Resource 'ora.scan1.vip' is already running on 'mytestlab1283'
.
.
PRCC-1014 : cvu was already running
PRCR-1004 : Resource ora.cvu is already running
PRCR-1079 : Failed to start resource ora.cvu
CRS-5702: Resource 'ora.cvu' is already running on 'mytestlab1283'
Preparing packages...
cvuqdisk-1.0.9-1.x86_64
PRCN-3004 : Listener LISTENER already exists
PRCC-1015 : LISTENER was already running on mytestlab1283
PRCR-1004 : Resource ora.LISTENER.lsnr is already running

2017/08/10 13:08:36 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

common mistakes by DBA

$
0
0


Listing down common mistakes that every DBA makes at least once in his career , there are few which are common for beginner but more often for "good experienced DBA's" too. 

Here i highlighted experience DBA's are always good ,even though they make mistake but keeps courage to recover and learn from it :)  



1 : Attempt to start the DB which is already running !

yeah ! i knew it you have done that , so even i.  

This mostly happens during planned activity , OS admin asked to startup DB but its already up through cluster through init services. 

DBA has missed to check status of DB or process before going for startup of DB


2 : No issue in Database 

A common reply from DBA to application questions about slowness or error

DBA's always try to rely on their monitoring or performance related alert , if no alert means no issue in DB.  

yes ! it is correct in 98% of the cases , but what if alert did not received due to monitoring issue or kind of new issue which is not configured or configurable.

DBA has missed to do a basic health check and given hands off to application with overconfidence 


3: Shutdown wrong database




Yeah , this is the reaction immediately once you realize that it's gone !




DBA has shut down production db while working on development assignment.

DBA has missed to use color code for access terminal , lower env should be yellow and green for prod. (my preference)


4: All tablespace free space ok but ..

DBA will always check users tablespace available space and overlook the system tablespace like sysaux / temp / undo / system.

Many occasions the inadequate space in undo/temp tablespaces (although they get recycled) being ignored and could lead to hanged application sessions waiting for their turn post auto space free up.


5:  Wrong table /partition dropped 













Although their are feature's available to recover drop table /partitions quickly , DBA's do make mistake during planned maintenance activity of dropping/ truncating wrong table.

DBA has missed to draw the action plan  or attempted to use own created commands during activity instead of following planned one.


6: Taking App/Dev for ride ....











Most of the DBA's just to buy some time , misguide their app support or developers.

App/Dev has no support than DBA's in crisis , and they always listen to DBA's honestly and follow as they say ...

I have experienced these mostly in performance tuning and network connectivity to db or during app/db compatibility checks 

7: Delayed response created havoc 


DBA's always remain busy (if no social site restriction then too much busy :)) , and misses a critical notification or alert which later becomes root cause for unplanned outage

DBA has missed here to judge the impact of not taking action in early phase.


8: Copy paste 

What wrong can go with copy paste ? 

You copied something like "shu" and pasted on oracle database sqlplus through right click , See the magic how fast db/sessions will go down.

Toggling between two sessions , copying command from one session to other , OS command on db prompts and vice versa are common things which may lead to tense situation if any of the words you copied interprets to command !

9: User expiry 

Application critical user created on DB with good tablespace , temp space , quota , permission etc.

But forgot to give appropriate profile with unlimited or defined expiry , one fine weekend when you will be enjoying sunbath ,  your application guy will disturb you "application is down as password has expired" and you have to set the old password as is with root cause analysis by monday !

10: Unrecoverable backups

Last but not the least "useless backups..."

You have been baking-up db quite long time and showing client that no need to worry we can recover from any point of time ...

but backups were designed with very less archive retention policy and in crisis that got back fired !



Hope you agree to this , do let me know ..which one you did?

ASMCMD-8016 unable to copy controlfile in ASM

$
0
0

During DB cloning or duplication , we may encounter below error while backing up control file or any other ASM db file within ASM disk group or on local file system

Error:

ASMCMD> cd +RECO/testdb/controlfile/
ASMCMD> cp control02.dbf /u01/oneoffpatches
copying +RECO/testdb/controlfile/control02.dbf -> /u01/oneoffpatches/control02.dbf
ASMCMD-8016: copy source '+RECO/testdb/controlfile/control02.dbf' and target '/u01/oracle/control02.dbf' failed
ORA-06550: line 3, column 9:
PLS-00306: wrong number or types of arguments in call to 'COPY'
ORA-06550: line 3, column 9:
PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 23 in '
begin
<*>dbms_diskgroup.copy('', '', '', :src_path, :src_ftyp, :src_blksz,
:src_fsiz, '','','', :dst_path, 1);
end;
')




Although i did not find the exact solution but derived multiple checks through which it can be avoided.


1. During db cloning we may encounter multiple issue listing few of them as below.


RMAN-00600: internal error, arguments [7038] [rec_cl_delarc]
RMAN-05501: aborting duplication of target database
RMAN-03002: failure of Duplicate Db command

DB restoration failure forces us to redo certain steps like re-creating control file or changing db names in spfile etc.

Special attention required while moving these files withing ASM or out of ASM as it could be a alias to actual files as below

ASMCMD> ls control01.dbf
CONTROLFILE  HIGH    FINE     NOV 09 04:00:00  N    control01.dbf => +DATA/TESTDB/CONTROLFILE/backup.1843.564192846

2. Check the existence of the source file to be moved if it belongs the absolute path and not a soft link

3. Destination directory to which ASM files being moved has sufficient space and appropriate permissions.

4. One of the most important check is to ensure the DISK group involved in source/destination copy is mounted.

5. File being moved is not being used currently by any of the live instance (mounted/OPEN DB)

6. Any ongoing restoration/recovery to be verified before copy or move to ensure the ongoing cloning does not disturb


You may post exact solution to mentioned error which will be helpul for DBA's

ORA-02049: timeout: distributed transaction waiting for lock

$
0
0


Issue: ORA-02049: timeout: distributed transaction waiting for lock

Background:
Application has reported the error ORA-02049 during transaction workflow involving DB link to Oracle9i two nodes RAC. Just before this error starts appearing the new code was deployed on production database at source which is 11g two node RAC.


Analysis:
In first sight it looked like an application code issue without proper commit; within the transactions/DML’s.

ORA-02049 appears generally in RAC environments where more the one node is available to process the transaction. Multiple nodes executing distributed transaction are unable to acquire or acknowledge the lock on same resource across the instance till time limit specified by init parameter distributed_lock_timeout (default 60 seconds) has reached.

After 60 seconds this situation is treated similar as deadlock where distributed transaction involving sessions get killed with acknowledged message as “ORA-02049: timeout: distributed transaction waiting for lock” back to client

Solution:
We have made below attempts to resolve the issue

    1.  Identifying in-doubt  transaction
Below queries can be executed on remote database to which database link is pointing to identify if any in doubt transactions waiting for manual rollback or commit;
Unfortunately, in our case no in doubt transactions were found.

column local_tran_id new_value TRANS_ID
select local_tran_id from dba_2pc_pending;

select 'rollback force '''||local_tran_id||''';' from dba_2pc_pending;
select 'exec dbms_transaction.purge_lost_db_entry('''||local_tran_id||''');' from dba_2pc_pending;
select 'commit force '''||local_tran_id||''';' from dba_2pc_pending;

e.g.
rollback force '13.87.427441';
exec dbms_transaction.purge_lost_db_entry('13.87.427441');

    2.  OPEN_LINKS parameter

open_links init parameter which restricts the number of concurrent db link executions per session to 4 (default) which could be the possible cause of this error and same has been increased to 20
 
 alter system set open_links=20 scope=spfile;
 alter system set open_links_per_instance=20 scope=spfile;



    3.  Wait event of the running queries

Wait event of the running queries identified using below but it was not much useful as error being observed intermittently & it was nowhere logged than application error logs 

col sql_text for a80
set pages 200
set line 900
col PROGRAM for a20
col MACHINE for a20
col CPU 9999999999
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
col event for a40
select *
  from (select /*+ rule */          sa.sql_id,         sa.CPU_TIME "CPU",         s.sid "SID",         s.serial# "SERIAL",         s.program "PROGRAM",         s.machine "MACHINE",         sa.SQL_TEXT "SQL_TEXT",
         vp.spid,         sw.event,         s.logon_time,         s.last_call_et / 60,         s.username,         s.status
          from v$sqlarea sa, v$session s, v$process vp, v$session_wait sw
         where sa.address = s.sql_address
           and sw.sid = s.sid
           and s.paddr = vp.addr
         order by CPU_TIME desc)
 where rownum < 10;

    4.TOP 5 event in AWR
enq: TX row lock contention in TOP event for the problematic time span has given hint of locking issues.


Analyzing AWR further , UPDATE sql statement in TOP DB time consuming section getting locked due to slow responding 3rd select query  (as per  below snap) 


Query:
  

Execution Plan before Indexing



create index I_ T2114_009 on T2114(C800000002);


Execution Plan after Indexing
 


Indexing has reduced the cost/response of the SELECT query which in turn resolved the locking/timeout during UPDATED statement

enq: TX has disappeared from TOP 5 event of the next AWR report & no further “ORA-02049: timeout: distributed transaction waiting for lock” error being reported by application And Issue marked to be solved



Other way to handle the enq: TX – row lock contention is to identify the foreign keys whose reference columns does not hold any index.

col column_name for a40
SELECT * FROM (
SELECT c.owner,c.table_name, cc.column_name, cc.position column_position
FROM DBA_constraints c, DBA_cons_columns cc
WHERE c.constraint_name = cc.constraint_name
AND c.constraint_type = 'R'
and c.owner not in ('SYS','SYSMAN','SYSTEM') and c.owner='&Schema_name'
MINUS
SELECT i.owner,i.table_name, ic.column_name, ic.column_position
FROM DBA_indexes i, DBA_ind_columns ic
WHERE i.index_name = ic.index_name
)
ORDER BY table_name, column_position

Any Column found in above query should be analyzed for possible contention/locking & appropriate index should be created.
 

ORA-1652: unable to extend temp segment

$
0
0
There could be only two ways to resolve this error ..

I. Add More Space in Temporary Table-space temp-file
II. Identify the Problematic Query & Tune it !

Today i came across this error , a developer reach out to me saying a package is executing for almost 30 minutes & terminating with"ORA-1652: unable to extend temp segment by 128 in tablespace TEMP"error



My first obvious Question to developer "Did You identified Query causing huge Sorting in you package ?"& Answer that i received was "No, Its wrapped package we don't even see what is inside it only vendor can access it"


Only option remain was to enable trace & identify problematic query.
I used a simple session level trace by executing "alter system sql_trace=TRUE;"
Whilemonitoring the session using below query i captured the problematic sql text before analyzing the trace itself showing wait event "direct path write temp"

col sql_text for a80
set pages 200
set line 900
col PROGRAM for a20
col MACHINE for a20
col CPU 9999999999
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
col event for a40
select *
  from (select /*+ rule */  sa.sql_id, sa.CPU_TIME "CPU",  s.sid "SID",  s.serial# "SERIAL",
         s.program "PROGRAM",  s.machine "MACHINE",  sa.SQL_TEXT "SQL_TEXT",
         vp.spid,  sw.event, s.logon_time, s.last_call_et / 60,  s.username,  s.status
          from v$sqlarea sa, v$session s, v$process vp, v$session_wait sw
         where sa.address = s.sql_address  and sw.sid = s.sid  and s.paddr = vp.addr
         order by CPU_TIME desc)
 where rownum < 10;



Query was ..



with execution plan ..


After spending an unsuccessful hour by playing with indexes to improve the cost of joins i saw a hint /*+ ordered */  in select query

Just removed the ordered hint & re-executed the query

And the execution plan was ..



Temp Space estimate has disappeared & cost of the query came down from 874K to 4K.

The package got successfully executed without error ORA-1652 

ordered hint was the culprit forcing optimizer to use the join conditions in the same order as written rather than allowing optimizer to choose its own optimal execution plan
Viewing all 155 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>