Amazon books

Wednesday, March 4, 2015

Find files in ASM using ASMCMD find command

This single example will find all PARAMETER FILEs that you have in your ASM instance:

ASMCMD> find --type PARAMETERFILE . *

The types that can be used are these below:

SQL> select distinct TYPE from v$asm_file;

TYPE
----------------------------------------------------------------
ARCHIVELOG
ASMPARAMETERFILE
CHANGETRACKING
CONTROLFILE
DATAFILE
DATAGUARDCONFIG
OCRFILE
ONLINELOG
PARAMETERFILE
TEMPFILE

10 rows selected.



Best Regards,
Paulo Portugal

Tuesday, March 3, 2015

TOTAL_MB of V$ASM_DISK shows wrong value (diff from real OS space)

If you are checking your space in V$ASM_DISK and face a problem where the TOTAL_MB is different from the real size of that disk execute the command below to workaround this problem:

alter diskgroup DG_NFE_DATA resize disk DG_NFE_DATA_0000;


Best Regards,
Paulo Portugal

Friday, February 20, 2015

Check IB Switchs on Exadata (ibqueryerrors.pl)

A quick and simple way to check the healthy of your IB Switches in Exadata is this one below:

1-Check using this command below:

ibqueryerrors.pl -rR -s PortRcvSwitchRelayErrors,PortXmitDiscards,PortXmitWait,VL15Dropped


2-If you got something line that:

  GUID 0x10e040687aa0a0 port ALL: [LinkErrorRecoveryCounter == 152] [PortRcvErrors == 5]
   GUID 0x10e040687aa0a0 port 1: [LinkErrorRecoveryCounter == 12]

and this value is not increasing a lot, you can clear these errors and continue with your life without any problem but if this number are increasing quickly or are too high (30k, 65k or more) it is better to open an SR to check the IB hardware.

3-Clear the count so when you run some tool like RACchk or the new ORAchk you will not be warned about these little errors.

[root@ex01dbadm01 ORAchk]# ibclearcounters

## Summary: 25 nodes cleared 0 errors
[root@ex01dbadm01 ORAchk]#



Best Regards,
Paulo Portugal

Thursday, January 8, 2015

Getting UNDO_RETENTION best possible value quickly

With this simple query below we can check what is the recommended value of undo_retention parameter:


SYS@EXADB08 AS SYSDBA> SELECT dbms_undo_adv.best_possible_retention(SYSDATE-1/24, SYSDATE)
FROM dual;  2 

DBMS_UNDO_ADV.BEST_POSSIBLE_RETENTION(SYSDATE-1/24,SYSDATE)
-----------------------------------------------------------
                            1575436

Elapsed: 00:00:00.03
SYS@EXADB08 AS SYSDBA>



Best Regards,
Paulo Portugal

Friday, December 19, 2014

Using TAF To collect information about your RAC Nodes

This command is used to generate all information about your RAC Nodes using TAF Utility:

/u01/app/11.2.0.4/grid/tfa/bin/tfactl diagcollect  -from "Dec/18/2014 13:00:00" -to   "Dec/18/2014 15:00:00"


If you do not have TAF yet, install it in all your Oracle Environments. It is like a join of diagnostic tools simplified with one command.

Best Regards,
Paulo Portugal

Gathering ExaWatcher information easily

If you had a problem / crash in your DB Machine and need to investigate it you can simply us this command below to gather information from time where the crash happened:

[root@ex01dbadm07 oracle.ExaWatcher]# ./GetExaWatcherResults.sh --from 12/18/2014_13:00:00 --to 12/18/2014_15:00:00


This command will collect all ExaWatcher information generated during the time you specified.

Best Regards,
Paulo Portugal 

Wednesday, December 10, 2014

New way to check your patches applied in Oracle Database 12c

Simple run this query below:

SYS@BWOEM12C_1>select xmltransform(DBMS_QOPATCH.GET_OPATCH_LIST, DBMS_QOPATCH.GET_OPATCH_XSLT) from dual;

XMLTRANSFORM(DBMS_QOPATCH.GET_OPATCH_LIST,DBMS_QOPATCH.GET_OPATCH_XSLT)
--------------------------------------------------------------------------------

Patch Details:

Patch     16619249:   applied on 2014-06-30T17:43:15-03


SYS@BWOEM12C_1>