Thursday, 3 August 2023

MongoDB Statistics

 If you want to objects statistics like (No. of object, collections, datasize etc. Available) follow below the commands.

use database
db.stats();                             <—————- Get the database level statistics
db.technology.stats();          <—————- Get the  collection level statistics

db.runCommand( { collStats : “restaurant”, scale: 1024 } )

 

For more Detail about Stats:

Database Stats: Click Here

Collection Stats: Click Here

Index Stats: Click Here

MongoDB Profiler

Profiler collects fine grained data about MongoDB write operations, cursors, database commands on a running mongod instance.

You can enable profiling on a per-database or per-instance basis.
The profiler is off by default.

Profiler writes all the data it collects to the system.profile collection, which is a capped collection.

*.Profiling Levels
0 – the profiler is off, does not collect any data
1 – collects profiling data for slow operations only. By default slow operations are those slower than 100 milliseconds.
2 – collects profiling data for all database operations.

Enable Profiling :  db.setProfilingLevel(1, { slowms: 20 })

Disable Profiling :  db.setProfilingLevel(0)

Get Profiling Info: db.getProfilingStatus()

All details regarding performance issues related written in mongod.log file by default located in /var/log/messages/mongd/mongd.og

 

For more detail about profiling : ClickHere

Saturday, 16 July 2022

How To setup Oracle RDA and Use

RDA captures data and provides Oracle support with a comprehensive picture of the customer's environment which aids in problem diagnosis. The goal of this article is to detail the steps on how to gather basic configuration, log and platform information from Oracle OpenSSO using the Remote Diagnostic Agent.


Instructions for UNIX/ZLinux Type Operating Systems

Choose or create a directory or area on your UNIX server. Make sure you have sufficient space for the RDA output (150MB). It does not matter where you create this directory or what it is named, but the same user that runs RDA must own it. Do not use a directory that contains an older version of RDA unless you have deleted the previous version of RDA first. If necessary, you can reuse prior setup files.

Note: The rda.zip creates a directory named "rda" containing all the required files when you extract it.


Installation Instruction

Do not extract the contents of the RDA archive on a Windows client first or you will have to remove the ^M characters from the end of each line in all of the shell scripts in order for them to run.

downloaded rda.zip file from oracle support as compitable your OS, I'm using UNIX server.

step 1.

Extract the .zip archive contents into a new directory, preserving the directory structure of the archive. Do not extract into a directory that contains an older RDA version. For example:

   unzip rda.zip


step 2.

Change directory to the 'rda' directory created by the above command, for example:

   cd rda


setp 3.

Make sure the RDA command 'rda.sh' is executable. To verify, enter the following command:

    ls -l rda.sh


If the script is not executable, update it using the command:

    chmod +x rda.sh


step 4.

The following command checks that you have a viable installation of RDA by checking that all file versions are as expected:

  ./rda.sh -cv

output like below
===================
Loading the file list ...
Checking the directory [D_RDA] . ...
Checking the directory [D_RDA] engine ...
Checking the directory [D_RDA_ADM] model ...
Checking the directory [D_RDA_CHK] APPS ...
Checking the directory [D_RDA_CHK] BI ...
Checking the directory [D_RDA_CHK] CGBU ...
Checking the directory [D_RDA_CHK] DB ...
Checking the directory [D_RDA_CHK] EM ...
Checking the directory [D_RDA_CHK] OFM ...
Checking the directory [D_RDA_CHK] TEST ...
Checking the directory [D_RDA_COL] APPS ...
Checking the directory [D_RDA_COL] BI ...
Checking the directory [D_RDA_COL] CGBU ...
Checking the directory [D_RDA_COL] CLOUD ...
Checking the directory [D_RDA_COL] DA ...
Checking the directory [D_RDA_COL] DB ...
Checking the directory [D_RDA_COL] EM ...
Checking the directory [D_RDA_COL] EXPLORER ...
Checking the directory [D_RDA_COL] OFM ...
Checking the directory [D_RDA_COL] OS ...
Checking the directory [D_RDA_COL] PGBU ...
Checking the directory [D_RDA_COL] RDA ...
Checking the directory [D_RDA_COL] SAMPLE ...
Checking the directory [D_RDA_COL] TOOL ...
Checking the directory [D_RDA_CSS] . ...
Checking the directory [D_RDA_DAT] . ...
Checking the directory [D_RDA_DFW] cv0200 ...
Checking the directory [D_RDA_INC] Convert/Common ...
Checking the directory [D_RDA_INC] Convert/DB/LOG ...
Checking the directory [D_RDA_INC] Convert/OFM/OIM ...
Checking the directory [D_RDA_INC] Convert/OS/INST ...
Checking the directory [D_RDA_INC] Convert/OS/OS ...
Checking the directory [D_RDA_INC] Convert/RDA/CONFIG ...
Checking the directory [D_RDA_INC] Convert/TOOL/ALERT ...
Checking the directory [D_RDA_INC] Convert/TOOL/COMPLY ...
Checking the directory [D_RDA_INC] IRDA ...
Checking the directory [D_RDA_INC] IRDA/CV0200 ...
Checking the directory [D_RDA_INC] RDA ...
Checking the directory [D_RDA_INC] RDA/Agent ...
Checking the directory [D_RDA_INC] RDA/Driver ...
Checking the directory [D_RDA_INC] RDA/Handle ...
Checking the directory [D_RDA_INC] RDA/Library ...
Checking the directory [D_RDA_INC] RDA/Limit ...
Checking the directory [D_RDA_INC] RDA/Local ...
Checking the directory [D_RDA_INC] RDA/Object ...
Checking the directory [D_RDA_INC] RDA/Operator ...
Checking the directory [D_RDA_INC] RDA/Request ...
Checking the directory [D_RDA_INC] RDA/SDCL ...
Checking the directory [D_RDA_INC] RDA/SDSL ...
Checking the directory [D_RDA_INC] RDA/Target ...
Checking the directory [D_RDA_INC] RDA/Token ...
Checking the directory [D_RDA_INC] RDA/UI ...
Checking the directory [D_RDA_INC] RDA/Value ...
Checking the directory [D_RDA_INC] RDA/Web ...
Checking the directory [D_RDA_MSG] charset ...
Checking the directory [D_RDA_MSG] desc ...
Checking the directory [D_RDA_MSG] en ...
Checking the directory [D_RDA_MSG] fr ...
Checking the directory [D_RDA_POD] en ...
No issues found

step 5.

Now run RDA here for Preinstallation checks and co-ordinate with SA for failed checks/fixes.

./rda.sh -T hcve

Output like below
==============
Processing HCVE tests ...
Available Pre-Installation Rule Sets:
   1.  Oracle Database 10g R1 (10.1.0) Preinstall (Linux)
   2.  Oracle Database 10g R2 (10.2.0) Preinstall (Linux)
   3.  Oracle Database 11g R1 (11.1) Preinstall (Linux)
   4.  Oracle Database 11g R2 (11.2.0) Preinstall (Linux)
   5.  Oracle Database 12c R1 (12.1.0) Preinstallation (Linux)
   6.  Oracle Database 12c R2 (12.2.0) Preinstallation (Linux)
   7.  Oracle Database 18c Preinstallation (Linux)
   8.  Oracle Database 19c Preinstallation (Linux)
   9.  Oracle Identity and Access Management PreInstall Check: Oracle Identity
       and Access Management 11g Release 2 (11.1.2) Linux
  10.  Oracle JDeveloper PreInstall Check: Oracle JDeveloper 11g Release 2
       (11.1.2.4) Linux
  11.  Oracle JDeveloper PreInstall Check: Oracle JDeveloper 12c (12.1.3)
       Linux
  12.  OAS PreInstall Check: Application Server 10g R2 (10.1.2) Linux
  13.  OAS PreInstall Check: Application Server 10g R3 (10.1.3) Linux
  14.  OFM PreInstall Check: Oracle Fusion Middleware 11g R1 (11.1.1) Linux
  15.  OFM PreInstall Check: Oracle Fusion Middleware 12c (12.1.3) Linux
  16.  OFM PreInstall Check: Oracle Fusion Middleware 12c (12.2.1.3.0) Linux
  17.  Oracle Forms and Reports PreInstall Check: Oracle Forms and Reports 11g
       Release 2 (11.1.2) Linux
  18.  Portal PreInstall Check: Oracle Portal Generic
  19.  IDM PreInstall Check: Identity Management 10g (10.1.4) Linux
  20.  BIEE PreInstall Check: Business Intelligence Enterprise Edition 11g
       (11.1.1) Linux
  21.  EPM PreInstall Check: Enterprise Performance Management Server (11.1.2)
       Generic
  22.  Oracle Enterprise Manager Cloud Control PreInstall Check: Oracle
       Enterprise Manager Cloud Control 12c Release 4 (12.1.0.4) Linux
  23.  Oracle E-Business Suite Release 11i (11.5.10) Preinstall (Linux x86 and
       x86_64)
  24.  Oracle E-Business Suite Release 12 (12.1.1) Preinstall (Linux x86 and
       x86_64)
  25.  Oracle E-Business Suite Release 12 (12.2.0) Preinstall (Linux x86_64)
Available Post-Installation Rule Sets:
  26.  RAC 10G DB and OS Best Practices (Linux)
  27.  Data Guard Postinstall (Generic)
  28.  WLS PostInstall Check: WebLogic Server 11g (10.3.x) Generic
  29.  WLS PostInstall Check: WebLogic Server 12c (12.x) Generic
  30.  Portal PostInstall Check: Oracle Portal Generic
  31.  OC4J PostInstall Check: Oracle Containers for J2EE 10g (10.1.x) Generic
  32.  SOA PostInstall Check: Service-Oriented Architecture 11g and Later
       Generic
  33.  OSB PostInstall Check: Service Bus 11g and Later Generic
  34.  Oracle Forms 11g Post Installation (Generic)
  35.  Oracle Enterprise Manager Agent 12c Post Installation (Generic)
  36.  Oracle Management Server 12c Post Installation (Generic)
  37.  Network Charging and Control Database Post Installation (Generic)
Enter the HCVE rule set number or 0 to cancel the test
Press Return to accept the default (0)
> 8
Performing HCVE checks ...
Enter value for < Planned ORACLE_HOME location >
Press Return to accept the default (/u01/app/oracle/product/12.1.0/db_1)
>

Test "Oracle Database 19c Preinstallation (Linux)" executed at 16-Jul-2022 21:36:39
Test Results
~~~~~~~~~~~~
(Note : Current Health Check rulesets do not have logic to support checks against Oracle Cloud or Exadata environments. If your product is installed in such an environment some test results will be erroneous. Refer instead to the product documentation rather than rely on the data below.)
ID     NAME                 RESULT  VALUE
====== ==================== ======= ==========================================
A00100 OS Certified?        FAILED  Not certified [Oracle Linux version]
A01020 User in /etc/passwd? PASSED  userOK
A01040 Group in /etc/group? PASSED  GroupOK
A01050 Enter ORACLE_HOME    RECORD  /u01/app/oracle/product/12.1.0/db_1
A01060 ORACLE_HOME Valid?   PASSED  OHexists
A01070 O_H Permissions OK?  PASSED  CorrectPerms
A01410 oraInventory Permiss PASSED  oraInventoryOK
A01420 Other OUI Up?        PASSED  NoOtherOUI
A01430 Got Software Tools?  PASSED  ld_nm_ar_make_found
A01440 Other O_Hs in PATH?  FAILED  OratabEntryInPath
A02010 Umask Set to 022?    PASSED  UmaskOK
A02030 Limits Processes     PASSED  Adequate
A02040 Limits Stacksize     PASSED  Adequate
A02050 Limits Descriptors   PASSED  Adequate
A02100 LDLIBRARYPATH Unset? FAILED  IsSet
A02170 JAVA_HOME Unset?     PASSED  UnSet
A03100 RAM (in MB)          PASSED  5982
A02210 Kernel Parameters OK PASSED  KernelOK
A02300 Tainted Kernel?      PASSED  NotVerifiable
A03010 Temp Adequate?       PASSED  TempSpaceOK
A03020 Disk Space OK?       PASSED  DiskSpaceOK
A03050 Swap (in MB)         RECORD  3999
A03100 RAM (in MB)          PASSED  5982
A03150 SwapToRam OK?        FAILED  SwapToRamTooLow
A03500 Network              PASSED  Connected
A03510 IP Address           RECORD  192.168.219.2
A03530 Domain Name          RECORD  NotFound
A03540 /etc/hosts Format    FAILED  No entry found
A03550 DNS Lookup           FAILED  nslookup host.domain
A03600 ip_local_port_range  PASSED  RangeOK
A04305 OL7 Server RPMs OK?  SKIPPED NotOL7
A04315 RHEL7 Server RPMs OK SKIPPED NotRedHat
A04321 SLES12 Server RPMs O SKIPPED NotSuSE
A04325 SLES15 Server RPMs O SKIPPED NotSuSE
Result file: output/collect/DB_HCVE_A_DB19c_lin_res.htm


In my case below the file location you just ftp on local machine and check the htm ext. file. 

/home/oracle/software/rda/output/collect
-rw-r----- 1 oracle oinstall 19312 Jul 16 21:36 DB_HCVE_A_DB19c_lin_res.txt
-rw-r----- 1 oracle oinstall 29553 Jul 16 21:36 DB_HCVE_A_DB19c_lin_res.htm


Reference:
Remote Diagnostic Agent (RDA) - Getting Started (Doc ID 314422.1)

Sunday, 12 September 2021

Query to find ASM Freespace with Redundancy

Below Query will show how much space is available to use in case of High or Normal Redundancy


TOTAL_MB:- Refers to Total Capacity of the Diskgroup

FREE_MB :- Refers to raw Free Space Available in Diskgroup in MB.


FREE_MB = (TOTAL_MB – (HOT_USED_MB + COLD_USED_MB))


REQUIRED_MIRROR_FREE_MB :- Indicates how much free space is required in an ASM disk group to restore redundancy after the failure of an ASM disk or ASM failure group.In exadata it is the disk capacity of one failure group.


USABLE_FILE_MB :- Indicates how much space is available in an ASM disk group considering the redundancy level of the disk group.


Its calculated as :-

USABLE_FILE_MB=(FREE_MB – REQUIRED_MIRROR_FREE_MB ) / 2 –> For Normal Redundancy

USABLE_FILE_MB=(FREE_MB – REQUIRED_MIRROR_FREE_MB ) / 3 –> For High Redundancy



Query to Run:

column total format 999,999 Heading "Total(G)"

column free format 999,999 Heading "Free (G)"

column Mirror_GB format 999,999 Heading "Space Used |for Mirroring(G)"

column Usable_GB format 999,999 Heading "Space Available |to Use(G)"

column pct format 999.0 Heading "% Free |in DG" 

column pct2 format 999.0 Heading "Real % Free |in DG" 

column type format a10

column name format a20

set linesize 200

set colsep '|'

prompt

Prompt "NOTE **** Incase of High or Normal Redundancy the Usable Space is lower than actual shown because of Mirroring *****"

prompt

select name,type, TOTAL_MB/1024 total, FREE_MB/1024 free, REQUIRED_MIRROR_FREE_MB/1024 Mirror_GB, USABLE_FILE_MB/1024 Usable_GB ,100-((total_MB-FREE_MB)/total_mb)*100 pct, 100-((total_MB-USABLE_FILE_MB)/total_mb)*100 pct2  from v$asm_diskgroup;



Sample Output :


"NOTE **** Incase of High or Normal Redundancy the Usable Space is lower than actual shown because of Mirroring *****"


                    |          |        |        |     Space Used |Space Available |% Free |Real % Free

NAME                |TYPE      |Total(G)|Free (G)|for Mirroring(G)|       to Use(G)|  in DG|       in DG

--------------------|----------|--------|--------|----------------|----------------|-------|------------

DATA1              |HIGH      | 260,496|  57,951|          14,472|          14,493|   22.2|         5.6

REDO1              |HIGH      |  65,124|  33,322|           3,618|           9,901|   51.2|        15.2

oracle : Scheduling ASH reports through Crontab

I was asked to capture ASH reports every 5 minutes for an ongoing Database issue. Below is the process to schedule it through Crontab


Script to capture the ASH reports every 5 Minutes


$ cat ash.ksh

#!/bin/bash

export TZ=US/Central

dateString=`date +%d-%b-%Y_%H:%M:%S`

sqlplus -s / as sysdba << EOD1

define report_type = 'html'

define begin_time = '-5'

define duration = ''

define report_name = '/u01/user/local/reports/ashrpt.${dateString}.html'

@?/rdbms/admin/ashrpt

exit

EOF



To run it through Cron

0,5,10,15,20,22,25,30,32,35,40,45,50,55 * * * * /u01/user/local/ash/ash.ksh > /u01/user/local/reports/log/ash_collect.log 1>/dev/null 2>&1


ORACLE RAC : TERMINATING THE INSTANCE DUE TO ERROR 304

 After refreshing my QA database using RMAN DUPLICATE, my instance startup was failing with the below error


USER (ospid: 60897): terminating the instance due to error 304

Instance terminated by USER, pid = 60897

Wed Mar 06 02:14:34 2019

Starting ORACLE instance (normal)


Looking into the spfile, I noticed the database was pulling wrong instance_number and thread numbers even though the DB configuration was correct


$ srvctl config database -d oradb

Database unique name: oradb

Database name: oradb

Oracle home: /opt/app/oradb/oracle/product/11.2.0.4

Oracle user: oradb

Spfile: +oradb_DATA/oradb/spfileoradb.ora

Domain: db.abc.com

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: oradb

Database instances: oradb1,oradb2

Disk Groups: oradb_DATA,oradb_FRA,oradb_REDO1,oradb_REDO2

Mount point paths: 

Services: oradb_1_2.db.abc.com,oradb_2_1.db.abc.com

Type: RAC

Database is administrator managed


From the pfile I created from the current spfile I could see 

*.instance_number=2

*.thread=2


To resolve this, bring down the complete database and just start the failing instance, in our case instance 1


srvctl start instance -d oradb -i oradb1


Once the instance is started, login to SQL and run below


SQL> alter system set instance_number=1 scope=spfile sid='oradb1';

System altered.


SQL> alter system set thread=1 scope=spfile sid='oradb1';

System altered.


SQL> alter system set undo_tablespace='UNDO01' sid='oradb1';

System altered.


shutdown the instance and start the complete database

SQL> shutdown immediate


srvctl start database -d oradb



Hope this resolves your issue. 

ORA-12537: TNS:connection closed - Oracle RAC 11g and above

 The client was getting Below error while connecting to the RAC database


sqlplus test@RACDB_1

SQL*Plus: Release 11.2.0.4.0 - Production on Tue Sep 22 11:34:07 2020

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

ERROR:

ORA-12537: TNS:connection closed



Issue : 

The Oracle Binary permissions got changed and were not allowing the connections

Current Permissions under Oracle Home


[oracle@Node1 ~]$ ls -lrt $ORACLE_HOME/bin/oracle

-rwxr-sr-x 1 oracle asmadmin 243043788 Jun  2 01:12 oracle


It should be set to 6751 and should look like "-rwsr-s--x"

But doing chmod 6751 on oracle binary was not setting the correct permissions


[oracle@Node1 bin]$ chmod 6751 oracle


[oracle@Node1 bin]$ ls -lrt $ORACLE_HOME/bin/oracle

-rwsr-x--x 1 oracle asmadmin 243043788 Jun  2 01:12 oracle


Running below as RDBMS database Owner user helped, in this case, "oracle" user


1) Stop the database instance where the permissions got changed

 srvctl stop instance -d RACDB -i RACDB1


 2) Run as Oracle Database owner, in this case its Oracle OS user.  

[oracle@Node1 ~]$ $GRID_HOME/bin/setasmgidwrap o=$ORACLE_HOME/bin/oracle


3) The permissions got changed and resolved the connection issues

[oracle@Node1 ~]$ ls -lrt $ORACLE_HOME/bin/oracle

-rwsr-s--x 1 oracle asmadmin 243043788 Jun  2 01:12 oracle



Hope this resolves your issue.. 

Monday, 16 August 2021

exadbcpatchmulti : Conflicts and ERROR: apply_async blocked on node

 Now a days i'm facing multiple issues on ExaCM boxes for patching on database nodes.

Sharing one scenario, Get request from customer apply APRIL_PSU2021 on ExaCM db boxes

ENV:
DB: 11204 version
GRID have 19c with APRIL2021 PSU.


*: Issue comes while running : exadbcpatchmulti -precheck_async 32537095 , failed with conflicts.
 Get details from exadbcpatch log / conflict log to identify more details.

*: How to resolve conflicts ?
Share the all details and conflict with oracle, They provide me the solution below
Edit /var/opt/oracle/exapatch/exadbcpatch.cfg - #For this file mostly root ownership, need to take help from GRID owner team or any other script available to update cfg file.

add the Cloud patch which needs to be rolled back as in below.
rollback_needed_before_apply="32328629::normal"

Refer Doc:
Exadbcpatchmulti patch conflict on cloud MLR "ERROR: precheck failed in conflict check" (Doc ID 2492936.1)

*: Now Pre-checks successfully done without any issue and move forward to apply the patch on next step.

*: Now facing the issue again : Node_1 successfully applied the patch but another issue occur on Node_2 below the details here.

++++++Error getting when apply patch: On Node_1 successfully done but having issue on Node_2
INFO: running on the node Xxx3a02c02vm01-adm
INFO: check for this action apply_async
INFO: check for this action rollback_async
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
ERROR: apply_async blocked on node Xxx3a02c02vm01-adm: as Exadbcpatch operation already running on requested home
ERROR: apply_async blocked on node Xxx3a02c02vm01-adm: as Exadbcpatch operation already running on requested home

++++++Solution
execute on all the nodes then run exadbcpatchmulti again.
mv /var/opt/oracle/cstate.xml /var/opt/oracle/cstate.xml_old

Refer Doc:
Exadbcpatchmulti fails with Apply_async Blocked On Node X As Another Instance Of Exadbcpatch Running (Doc ID 2530468.1)

*: Now run exadbcpatchmulti  again and successfully applied the patch on ExaCM dbs.

Thursday, 5 August 2021

ORA-20001: Latest xml inventory is not loaded into table

Symptoms: As i faced during execute datapatch verbose 19c.
During execution of datapatch or DBMS_QOPATCH following error seen

ERROR:
ORA-20001: Latest xml inventory is not loaded into table
ORA-06512: at "SYS.DBMS_QOPATCH", line 1448
ORA-06512: at "SYS.DBMS_QOPATCH", line 122

Solution: 

1. oraInventory issue
2. Recreate oraceinventory sometime works
3. 19c not using softlink so need to set correct entry into oratabs and run datapatch -verbose

-Because ORACLE_HOME using softlink that's why need to set this parameter for temporary purpose once datapatch done remove this parameter from pfile.

ORA-20001: Latest xml inventory is not loaded into table --->
1.
Startup upgrade
create or replace directory OPATCH_LOG_DIR as '$OH/QOpatch'; ## don't using ORACLE_HOME softlink
create or replace directory OPATCH_SCRIPT_DIR as '$OH/QOpatch';
 
ALTER SYSTEM SET "_disable_directory_link_check" = TRUE SCOPE=SPFILE;
shutdown immediate
startup upgrade
 
 
cd $ORACLE_HOME/OPatch
 
./datapatch -verbose
 
SELECT a.ksppinm "Parameter",b.ksppstvl "Session Value",c.ksppstvl "Instance Value" FROM x$ksppi a, x$ksppcv b, x$ksppsv c WHERE a.indx = b.indx AND a.indx = c.indx AND a.ksppinm LIKE '/_disable_direc%' escape '/';

Ref Doc:
datapatch fails with "ORA-20009:" “ORA-20013: DBMS_QOPATCH ran mostly in non install area” ORACLE_HOME is a SYMBOLIC LINK (Doc ID 2033620.1)
Queryable Patch Inventory - Issues/Solutions for ORA-20001: Latest xml inventory is not loaded into table (Doc ID 1602089.1)

Friday, 12 February 2021

GoldenGate 12.1.2 not firing insert trigger

Getting report of goldengate Replicate process which is shows after upgrade from 11g to 12c.

Even though checkpoint table also upgraded. But Replicate process unable to start. 

------------------------------------------------------------------------------------------------------------------------

2021-02-11 04:13:31  INFO    OGG-06451  Triggers will be suppressed by default.

--More--(36%)
2021-02-11 04:13:31  INFO    OGG-01815  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /opt/app/p0bfo3d1/ggs/12.1.2.1.0/dirtmp.

CACHEMGR virtual memory values (may have been adjusted)
CACHESIZE:                                2G
CACHEPAGEOUTSIZE (default):               8M
PROCESS VM AVAIL FROM OS (min):           4G
CACHESIZEMAX (strict force to disk):   3.41G

Database Version:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE    12.1.0.2.0    Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production

Database Language and Character Set:
NLS_LANGUAGE     = "AMERICAN"
NLS_TERRITORY    = "AMERICA"
NLS_CHARACTERSET = "WE8ISO8859P1"


***********************************************************************
**                     Run Time Messages                             **
***********************************************************************
 
Opened trail file /opt/app/ORCL/ggs/11.2.1.0.3/trails/y1000331 at 2021-02-11 05:01:20
 
2021-02-11 05:01:20  INFO    OGG-03506  The source database character set, as determined from the trail file, is we8iso8859p1.
 
2021-02-11 05:01:20  INFO    OGG-06505  MAP resolved (entry ggsuser.ggs_heartbeat): MAP "GGSUSER"."GGS_HEARTBEAT", TARGET ggsuser.ggs_lagtime, KEY
COLS (ID), INSERTALLRECORDS, COLMAP (USEDEFAULTS, id = 0, committime = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'), groupname  = @GETENV ('GGENVIRONME
NT', 'GROUPNAME'), ).
Using the following default columns with matching names:
  SOURCETIME=SOURCETIME, TARGETTIME=TARGETTIME, LAGTIME=LAGTIME
 
2021-02-11 05:01:21  INFO    OGG-06510  Using the following key columns for target table GGSUSER.GGS_LAGTIME: ID.
 
 
2021-02-11 05:01:21  WARNING OGG-00869  OCI Error ORA-00001: unique constraint (GGSUSER.GGS_LAGTIME_PK) violated (status = 1), SQL <INSERT INTO "G
GSUSER"."GGS_LAGTIME" ("ID","COMMITTIME","GROUPNAME") VALUES (:a0,:a1,:a2)>.
 
2021-02-11 05:01:21  WARNING OGG-01004  Aborted grouped transaction on 'GGSUSER.GGS_LAGTIME', Database error 1 (OCI Error ORA-00001: unique constr
aint (GGSUSER.GGS_LAGTIME_PK) violated (status = 1), SQL <INSERT INTO "GGSUSER"."GGS_LAGTIME" ("ID","COMMITTIME","GROUPNAME") VALUES (:a0,:a1,:a2)
>).
 
2021-02-11 05:01:21  WARNING OGG-01003  Repositioning to rba 16083229 in seqno 331.
 
2021-02-11 05:01:21  WARNING OGG-01154  SQL error 1 mapping GGSUSER.GGS_HEARTBEAT to GGSUSER.GGS_LAGTIME OCI Error ORA-00001: unique constraint (G
GSUSER.GGS_LAGTIME_PK) violated (status = 1), SQL <INSERT INTO "GGSUSER"."GGS_LAGTIME" ("ID","COMMITTIME","GROUPNAME") VALUES (:a0,:a1,:a2)>.
 
2021-02-11 05:01:21  WARNING OGG-01003  Repositioning to rba 16083229 in seqno 331.
Source Context :
  SourceModule            : [er.errors]
  SourceID                : [/scratch/aime1/adestore/views/aime1_adc4150384/oggcore/OpenSys/src/app/er/errors.cpp]
  SourceFunction          : [take_rep_err_action]
  SourceLine              : [701]
  ThreadBacktrace         : [13] elements
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/libgglog.so(CMessageContext::AddThreadContext()+0x1e) [0x7f69e005bdae]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x340
) [0x7f69e0056ac0]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/libgglog.so(_MSG_ERR_MAP_TO_TANDEM_FAILED(CSourceContext*, ggs::gglib::ggapp::CQualD
BObjName<(DBObjType)1> const&, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, CMessageFactory::MessageDisposition)+0x53) [0x7f69e004fcff]
]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(take_rep_err_action(short, int, char const*, extr_ptr_def*, __std_rec_hdr*,
 char*, file_def*, bool)+0xdda) [0x580b82]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(process_record(file_def*&, short&, extr_ptr_def*&, extr_ptr_def*&, int&, bo
ol&, int&, int&, bool)+0xcaa) [0x5d0f5a]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(process_replicat_loop()+0xe11) [0x5ad7f1]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(replicat_main(int, char**)+0x5ca) [0x5c6b7a]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x4f) [0x699c0f]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::T
hread::ThreadArgs*)+0x104) [0x699f44]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x8b) [0x69a04b]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat(main+0x3f) [0x5c580f]]
                          : [/lib64/libc.so.6(__libc_start_main+0x100) [0x3b5481ed20]]
                          : [/opt/app/ORCL/ggs/12.1.2.1.0/replicat() [0x517099]]
 
2021-02-11 05:01:21  ERROR   OGG-01296  Error mapping from GGSUSER.GGS_HEARTBEAT to GGSUSER.GGS_LAGTIME.

------------------------------------------------------------------------------------------------------------------------

 Solution:

I had to troubleshoot a situation, after GoldenGate capture some DML and replicate that, Oracle database needs to run insert trigger making some business integration.

After to upgrade this enviroment from GG 11.1.1.1 to 12.1.2 and DB 11.2.0.3 to 12.1.0.2, was identified that GoldenGate wasn’t running this triggers


So, found interesting resolution on Oracle Docs:

SUPPRESSTRIGGERS | NOSUPPRESSTRIGGERS


Valid for nonintegrated Replicat for Oracle. Controls whether or not triggers are fired during the Replicat session. Provides an alternative to manually disabling triggers. (Integrated Replicat does not require disabling of triggers on the target system.)

SUPPRESSTRIGGERS is the default and prevents triggers from firing on target objects that are configured for replication with Oracle GoldenGate. SUPPRESSTRIGGERS is valid for Oracle 11.2.0.2 and later 11gR2 versions. SUPPRESSTRIGGERS is not valid for 11gR1.


So, added 'DBOPTIONS NOSUPPRESSTRIGGERS' in the replicat parameter file.



OR


However, altough you probably want most of the triggers not to be executed on the target, it can be possible to override this setting, for example when you implement a heartbeat table.

The way to exclude the trigger from the SUPRRESSTRIGGERS setting is to grant the trigger an exception. This can be done as follows on the target:


SQL> EXEC dbms_ddl.set_trigger_firing_property('HR','trg_tbl_heartbeat', FALSE);'

The result of the statement above is that trigger hr.trg_tbl_heartbeat will go off in the target database.


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

2nd.

If above steps are not working and still Replicate process Abended then go for below the steps.

 upgrade Goldengate from 11g to 12c ?

If yes, you have two options :

1) Change the double quotes to single quotes

2) Add NOUSEANSISQLQUOTES into your GLOBALS file and restart the processes
/
NOUSEANSISQLQUOTES is intended for backward compatibility with the parameter files of Oracle GoldenGate versions that predate version 12c, where strings in double quotes are intended to be literals and case-sensitive column names are not supported (whether or not they are within quotes).

Reference : https://docs.oracle.com/goldengate/1212/gg-winux/GWURF/gg_parameters183.htm#GWURF728




Monday, 2 November 2020

Exadata : Disk Replacement

Operational Activities:


*.Diagnostics & SR Creation

   CellCLI> list celldisk where name='<Cell_Disk>' details

       Disk Status -> Online/Offline  #Both Cases

       Error Count -> more than 0.


   SR Creation

         1. ASR Configure

         2. Manual SR - read Doc ID - 761868.1


Reference :

Sundiag & Other Diagnostics: Oracle Exadata Diagnostic Information required for Disk Failures and some other Hardware issues (Doc ID 761868.1)



*.Drop Faulted Disk

   1.Normal -> Confined offline

          *.Amber LED

          *.Rebalance Initiated

   2.Confined offline -> offline

         *.Blue LED

         *.Ready for Replacement

Reference:

Drop Online Disk: Things to Check in ASM When Replacing an ONLINE disk from Exadata Storage Cell (Doc ID 1326611.1)



*.Disk replacement

    FSE visit and Replacement

Reference:

Replace Procedure: How to Replace a Hard Drive in an Exadata Storage Server (Predictive Failure) (Doc ID 1390836.1)

Tuesday, 14 July 2020

CRS-5016 CRS-2674 ACFS-00591 ACFS-02037 CRS resource for ACFS

Once Add/Register ACFS filesystem as a Cluster 

srvctl add filesystem -d /dev/asm/sharedvol-64 -g GG_APP -v SHAREDVOL -m /gg_acfs/ggs -u oracle

[root@rac1 bin]# srvctl status filesystem -d /dev/asm/sharedvol-64

ACFS file system is not running

[root@rac1 bin]# srvctl start filesystem -d /dev/asm/sharedvol-64
PRCR-1079 : Failed to start resource ora.gg_app.sharedvol.acfs
CRS-5016: Process "/u01/app/11204/grid/bin/acfssinglefsmount" spawned by agent "/u01/app/11204/grid/bin/orarootagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11204/grid/log/rac2/agent/crsd/orarootagent_root//orarootagent_root.log"
CRS-5016: Process "/u01/app/11204/grid/bin/acfssinglefsmount" spawned by agent "/u01/app/11204/grid/bin/orarootagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11204/grid/log/rac1/agent/crsd/orarootagent_root//orarootagent_root.log"
CRS-5016: Process "/sbin/acfsutil" spawned by agent "/u01/app/11204/grid/bin/orarootagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11204/grid/log/rac2/agent/crsd/orarootagent_root//orarootagent_root.log"
CRS-5016: Process "/sbin/acfsutil" spawned by agent "/u01/app/11204/grid/bin/orarootagent.bin" for action "start" failed: details at "(:CLSN00010:)" in "/u01/app/11204/grid/log/rac1/agent/crsd/orarootagent_root//orarootagent_root.log"
CRS-2674: Start of 'ora.gg_app.sharedvol.acfs' on 'rac2' failed
CRS-2674: Start of 'ora.gg_app.sharedvol.acfs' on 'rac1' failed


# mount.acfs -o all
mount.acfs: ACFS-00591: error found in volume disk header
mount.acfs: ACFS-02037: File system not created on a Linux system. Cannot mount.
found error... so(make acfs)

[root@rac1 bin]# mkfs.acfs -f /dev/asm/sharedvol-64
mkfs.acfs: version                   = 11.2.0.4.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/sharedvol-64
mkfs.acfs: volume size               = 9663676416
mkfs.acfs: Format complete.

[root@rac1 bin]# mount.acfs -o all

[root@rac1 bin]#  acfsutil registry -a -f /dev/asm/sharedvol-64 /gg_acfs/ggs/

[root@rac1 bin]# srvctl start filesystem -d /dev/asm/sharedvol-64

[root@rac1 bin]# srvctl status filesystem -d /dev/asm/sharedvol-64
ACFS file system is running on rac1,rac2

[root@rac1 bin]# df -h /gg_acfs/ggs
Filesystem            Size  Used Avail Use% Mounted on
/dev/asm/sharedvol-64
                      9.0G   95M  9.0G   2% /gg_acfs/ggs

Friday, 23 August 2019

12c GoldenGate Silent Installation

Most of the customer and Env. not using GUI based installation so here i'm giving you small demonstration to installing Oracle goldengate 12c silent installation.

For GUI based. run simply ./runInstaller and pass require parameters according to you env.

Below the steps for silent installations.

=====================
-Software Location of GG
=====================
/u01/fbo_ggs_Linux_x64_shiphome/Disk1/response

oggcore.rsp ----> response file

less oggcore.rsp | grep oracle.install.responseFileVersion

==================================
-Below the parameters update in response file
==================================

oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v12_1_2

INSTALL_OPTION=ORA12c
SOFTWARE_LOCATION=/oracle/gg
START_MANAGER=true
MANAGER_PORT=7809
DATABASE_LOCATION=/u01/app/oracle/product/12.1.0/dbhome_1
INVENTORY_LOCATION=/u01/app/oraInventory
UNIX_GROUP_NAME=oinstall

$ ./runInstaller -silent -responseFile /home/oracle/ggresp.rsp

==================
-Inventory Verification
==================

You can confirm the installation of GoldenGate by simply looking at the Oracle inventory.
The inventory file is located at /u01/app/oraInventory/ContentsXML

-bash-3.2$ less inventory.xml | grep -i gg
<HOME NAME="OraHome15" LOC="/u01/app/ogg" TYPE="O" IDX="28"/>

Thursday, 1 November 2018

OGG-01033 There is a problem in network communication, a remote file problem, encryption keys for target and source do not match (if using ENCRYPT) or an unknown error.

Initial Load issue in  12c.

-- Report error.

2018-10-28 10:08:02  ERROR   OGG-01033  There is a problem in network communication, a remote file problem, encryption keys for target and source do not match (if using ENCRYPT) or an unknown error. (Remote file used is /u01/app/oracle/product/ogg/dirdat/initload.dat, reply received is Failed resolving output file /u01/app/oracle/product/ogg/dirdat/initload.dat (error: 2, No such file or directory)).
2018-10-28 10:08:02  
ERROR   OGG-01668  PROCESS ABENDING.

-- Solution.

This error will come in goldengate version 12.2, as new parameter ALLOWOUTPUTDIR  has been introduced , which need to be added in ./GLOBALS file on target .

syntax – ALLOWOUTPUTDIR   [ path of the remote trail location]

1. stop the manager and the replicates

ggsci> stop mgr
ggsci> stop *

ggsci> edit params ./GLOBAL     <-------------------- Put the parameter ALLOWOUTPUTDIR

2.  edit the ./GLOBAL
ALLOWOUTPUTDIR /u01/ogg/dirdat/

3. stat mgr and replicates
ggsci> start mgr
ggsci> start *

-- Source 
./extract <param_file> <report_file> for checking any issue before deploying automate.




Monday, 16 July 2018

rtld: 0712-001 Symbol CreateIoCompletionPort was referenced

In My Case Cause of below the issue at storage level.
failing currently due to LVM inconsistency

For more Detail follow below the reference links.

Ref: 
http://oracle-help.com/ora-errors/rtld-0712-001-symbol-createiocompletionport-was-referenced/
AIX 12.1.0.2 Installation Fails with "rtld: 0712-001 Symbol CreateIoCompletionPort was referenced " (Doc ID 1949184.1)

Highly Available VIP (HAVIP)

Highly Available IP (HAIP) comes from 11.2.0.2 on-words and maximum 4 define for Private network.

Now in 12c version introduces Highly Available VIP (HAVIP) a Clusterware-monitored VIP that can be used for non-Databaseapplications.

Typically, VIPs are created for VIP or SCAN listeners for Database connections. In some cases, the need arises to create a VIP monitored by Clusterware designed to support other applications.

For more Detail : Click Here

New feature in Oracle 11g database to kill session


Now we can kill session after finishing existing transaction to be finished. Means in previous release there was no scope to finish on going transaction. Instead of "alter system kill session" here we can use "alter system disconnect session". Using syntax "POST_TRANSACTION" we can kill session for active transaction has to be completed first and after that it will be automatically killed. Example of same syntax is given below.

SQL> alter system disconnect session '10,251' post_transaction;
System altered.

Thursday, 12 July 2018

LREG New BG Process In 12c

In 11.2 Pmon process propogates the service metrics to the listeners regitered in local_listener adn remote_listener initialization parameter.

As the remote_listener specifies specifies the address of scan listener and the local_listener parameter specifies the address of the VIP listener, PMON process propogates the service metrics to both SCAN and VIP listeners.

You can trace listener registration using the following command.

alter system set event='immediate trace name listener_registration level 15';

Now in 12c version listener registration is permed by a new mandatory background process named LREG.
And if you want to trace then LREG trace file getting to all info about listener registration.

Advantage : Not recommneding that you create 50+ of unnecessary services,you should create
as many services as you need to split the application into manageable and disjointed workload.

In 11gR2 if there are 50+/100+ services and listeners then there is a possiblilyt that the PMON process
might spend more time on service registration to listener.

But in 12c this possibility is eliminated as the LREG backgroud process which is totally dedicated for registering the services to Listener.

and PMON is freed from listener registration.

Monday, 2 July 2018

PRCD-1027 PRCD-1229

PRCD-1027 : Failed to retrieve database racdb
PRCD-1229 : An attempt to access configuration of database racdb was rejected because its version 11.2.0.1.0 differs from the program version 11.2.0.4.0. Instead run the program from /oracle/product/11.2.0/db_1.



[root@rac1 ~]# srvctl status database -d racdb
PRCD-1027 : Failed to retrieve database racdb
PRCD-1229 : An attempt to access configuration of database racdb was rejected because its version 11.2.0.1.0 differs from the program version 11.2.0.4.0. Instead run the program from /oracle/product/11.2.0/db_1.

[root@rac1 ~]# srvctl config database -d racdb

PRCD-1027 : Failed to retrieve database racdb
PRCD-1229 : An attempt to access configuration of database racdb was rejected because its version 11.2.0.1.0 differs from the program version 11.2.0.4.0. Instead run the program from /oracle/product/11.2.0/db_1.

[root@rac1 ~]# srvctl config database
racdb


-- First Attempt
[root@rac1 ~]# srvctl modify database -d racdb -o /oracle/product/11204/db_1

PRCD-1027 : Failed to retrieve database racdb
PRCD-1229 : An attempt to access configuration of database racdb was rejected because its version 11.2.0.1.0 differs from the program version 11.2.0.4.0. Instead run the program from /oracle/product/11.2.0/db_1.

-- Second Attempt
[root@rac1 ~]# srvctl upgrade database -d  racdb -o /oracle/product/11204/db_1

PRCD-1231 : Failed to upgrade configuration of database racdb to version 11.2.0.4.0 in new Oracle home /oracle/product/11204/db_1
PRKH-1014 : Current user "root" is not the oracle owner user "oracle" of oracle home "/oracle/product/11204/db_1"

[root@rac1 ~]# su - oracle

-- Final Attempt
[oracle@rac1 ~]$ srvctl upgrade database -d  racdb -o /oracle/product/11204/db_1

[oracle@rac1 ~]$ exit
logout

[root@rac1 ~]# srvctl status database -d racdb
Instance racdb1 is running on node rac1
Instance racdb2 is running on node rac2

Saturday, 30 June 2018

mv: cannot move `OPatch' to `OPatch_old': Permission denied

Applying Latest Opatch in GRID_HOME  Opatch (6880880) 


[grid@dbapath.com patch]$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
mv: cannot move `/u01/app/11.2.0/grid/OPatch/’ to `/u01/app/11.2.0/grid/OPatch_old’: Permission denied

You must either unlock GRID_HOME or you can move OPatch directory as a superuser.

[oracle@grid_server1 ]$ cd /u01/app/11.2.0/grid/crs/install
[oracle@grid_server1 ]$ sudo perl rootcrs.pl -unlock -crshome /u01/app/11.2.0/grid

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Undefined subroutine &main::read_file called at /u01/app/11.2.0/grid/crs/install/crspatch.pm line 86.

If you hit an error like above, here is the workaround (according to this paper: roothas.pl -patch or rootcrs.pl -patch Fails with ‘Undefined subroutine’ [ID 1268390.1]):

# Take a backup of the file /crs/install/crsconfig_lib.pm

grid$ cd /crs/install

grid$ cp crsconfig_lib.pm crsconfig_lib.pm.bak

# Make the following change in that file crsconfig_lib.pm
#From
# my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR
#To
# my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR read_file

#Execute relock:

[grid@dbapath.com ]$ cd /u01/app/11.2.0/grid/crs/install

[grid@dbapath.com ]$ sudo perl rootcrs.pl -patch -crshome /u01/app/11.2.0/grid
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
ACFS-9200: Supported
CRS-4123: Oracle High Availability Services has been started.