Amazon books

Friday, August 22, 2014

New Cluster ASM Commands

ASMCMD> help
        Starts asmcmd or executes the command

        asmcmd [-V] [--nocp] [-v {errors | warnings | normal | info | debug} ] [--privilege {sysasm | sysdba} ] [-p] [--inst ] [--discover][]

        The environment variables ORACLE_HOME and ORACLE_SID determine the
        instance to which the program connects, and ASMCMD establishes a
        bequeath connection to it, in the same manner as a SQLPLUS / AS
        SYSASM.  The user must be a member of the OSASM group.

        If Flex ASM is enabled, the ASMCMD connects to any one of the ASM
        instances running in the cluster. The connection to ASM instance does
        not depend on the environment variables ORACLE_HOME and ORACLE_SID.
        The ASMCMD alert log shows to which instance ASMCMD is connected to.
        If the user wants to connect to a specific ASM instance, --inst option
        should be used to specify the instance name.

        Specifying the -V option prints the asmcmd version number and
        exits immediately.

        Specifying the --nocp option disables connection pooling feature for
        Specifying the -v option prints extra information that can help
        advanced users diagnose problems.

        Specify the --privilege option to choose the type of connection. There are
        only two possibilities: connecting as SYSASM or as SYSDBA.

        The default value if this option is unspecified is SYSASM.

        Specifying the -p option allows the current directory to be displayed
        in the command prompt, like so:


        Specifying the --discover option uses discovery string obtained from
        Listener, does not use ORACLE_SID. 
        [command] specifies one of the following commands, along with its

        Type "help [command]" to get help on a specific ASMCMD command.


        md_backup, md_restore


        lsattr, setattr

        audcleanaudittrail, audclearproperty, audcleartimestamp
        audcreatejob, auddropjob, audloaduniauditfiles, audsetdebug
        audsetjobinterval, audsetjobstatus, audsetproperty, audsettimestamp
        audsettraillocation, audshowtimestamp, lsaudcleanevents
        lsaudcleanupjobs, lsaudconfigparams

        cd, cp, du, find, help, ls, lsct, lsdg, lsof, mkalias
        mkdir, pwd, rm, rmalias, showclustermode, showclusterstate
        showpatches, showversion

        mapau, mapextent

        chdg, chkdg, dropdg, iostat, lsdsk, lsod, mkdg, mount
        offline, online, rebal, remap, umount

        pwcopy, pwcreate, pwdelete, pwget, pwmove, pwset

        afd_configure, afd_deconfigure, afd_dsget, afd_dsset
        afd_filter, afd_label, afd_lsdsk, afd_scan, afd_state
        afd_unlabel, dsget, dsset, lsop, mkcc, rmcc, shutdown
        spbackup, spcopy, spget, spmove, spset, startup

        chtmpl, lstmpl, mktmpl, rmtmpl

        chgrp, chmod, chown, groups, grpmod, lsgrp, lspwusr, lsusr
        mkgrp, mkusr, orapwusr, passwd, rmgrp, rmusr, rpusr

        volcreate, voldelete, voldisable, volenable, volinfo
        volresize, volset, volstat

ASMCMD> lsaudconfigparams
Type   Parameter Name             Parameter Value         
       AUDIT FILE MAX SIZE        10000                   
       AUDIT FILE MAX SIZE        10000                   
       AUDIT FILE MAX AGE         5                       
       AUDIT FILE MAX AGE         5                       
ASMCMD> showclustermode
ASM cluster : Flex mode disabled
ASMCMD> showclusterstate
ASMCMD> showversion
ASM version         :
ASMCMD> spbackup
usage: spbackup
help:  help spbackup
ASMCMD> help spbackup
        Backs up an Oracle ASM SPFILE to a back up file.


        The options for the spbackup command are described below:
        source        - specifies the source file name
        destination     - specifies the destination file name
        spbackup should be used when you want to make single or multiple
        backups of an SPFILE in the same or different disk group without
        creating an SPFILE in target disk group.
        Note the following about the use of spbackup:
            spbackup can back up an Oracle ASM SPFILE from a disk group to a
            disk group or to an operating system file.
            spbackup can back up an Oracle ASM SPFILE from an operating
            system file to a disk group or to an operating system file.
            spbackup can back up an Oracle ASM SPFILE when the SPFILE is being
            used by an open Oracle ASM instance.
            spbackup can make multiple backups of an Oracle ASM SPFILE in the
            same disk group.
        spbackup does not affect the GPnP profile.  The back up file that is
        created is not a special file type and is not identified as an SPFILE.
        This back up file cannot be copied with spcopy.  To copy this back up
        file, use the ASMCMD cp command.
        To make a copy of a back up file in a disk group that is identified as
        a SPFILE file:
          1. Use the ASMCMD cp command to copy the back up file from the disk
             group to an operating system file.
          2. Use the ASMCMD spcopy command to copy the operating system file
             to a disk group.

        The following are examples of the spbackup command.
        The first example backs up the SPFILE in the DATA disk group.
        The second example backs up the SPFILE from the DATA disk group to the
        FRA disk group.
        ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181
        ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181

See Also
       cp spcopy

ASMCMD> help chtmpl
        Changes the attributes of a template.

        chtmpl -G { [--striping {coarse|fine}] [--redundancy {high|mirror|unprotected} ] [--primary {hot|cold}] [--secondary {hot|cold}]}

Wednesday, July 30, 2014

Tracing EM Grid 12c for Performance Issues on a specific target/page

This is what I have done:

1-Login to EM
./emcli login -username=sysman

2-List sessions
./emcli  list_active_sessions -details

3-Enable trace
./emcli trace -enable=true -user=F2C_PAULO_PORTUGAL

4-Access the slow page on Grid 12c

5-Disable Trace
./emcli trace -enable=false -user=F2C_PAULO_PORTUGAL

6-Generate the report from raw file

./emctl genreport oms -file_name f2c_paulo_portugal_1406760005606.trace

Best Regards,
Paulo Portugal

Tuesday, July 29, 2014

Using LOGDUMP GoldenGate Example

This is what I do to find the line where the replicat golden gate process abended:

Logdump 277 >open ./dirdat/pa000376
Current LogTrail is /ggshop/glete/gghome/dirdat/pa000376
Logdump 278 >ghdr on
Logdump 279 >detail data
Logdump 280 >usertoken detail
Logdump 281 >ggstokens detail
Logdump 282 >ghdr on
Logdump 283 >detail on
Logdump 284 >detail data
Logdump 285 >usertoken detail
Logdump 286 >ggstoken detail
Logdump 287 >pos 19930247
Reading forward from RBA 19930247
Logdump 288 >n
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 46 (x002e) IO Time : 2014/07/25 16:09:52.963.776
IOType : 15 (x0f) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 38756 AuditPos : 144659472
Continued : N (x00) RecCount : 1 (x01)

2014/07/25 16:09:52.963.776 FieldComp Len 46 RBA 19930247
After Image: Partition 4 G s
0000 0016 0000 0012 5553 455f 494e 5355 5241 4e43 | ........USE_INSURANC
455f 4c49 5354 0001 0008 0000 0004 7472 7565 0004 | E_LIST........true..
0004 ffff 0000 | ......
Column 0 (x0000), Len 22 (x0016)
0000 0012 5553 455f 494e 5355 5241 4e43 455f 4c49 | ....USE_INSURANCE_LI
5354 | ST
Column 1 (x0001), Len 8 (x0008)
0000 0004 7472 7565 | ....true
Column 4 (x0004), Len 4 (x0004)
ffff 0000 | ....

GGS tokens:
TokenID x52 'R' ORAROWID Info x00 Length 20
4141 4178 5a45 4141 7441 414a 6149 4d41 4145 0001 | AAAxZEAAtAAJaIMAAE..
TokenID x4c 'L' LOGCSN Info x00 Length 13
3832 3834 3735 3335 3036 3637 38 | 8284753506678
TokenID x36 '6' TRANID Info x00 Length 13
3134 342e 3234 2e33 3738 3536 35 | 144.24.378565

Logdump 289 >exit

Best Regards,
Paulo Portugal

Monday, July 7, 2014

CELL-02625: Interface eth2 refers to device name "eth2".

CellCLI> create cell stocell1 interconnect1=eth2

CELL-02625: Interface eth2 refers to device name "eth2".
Device name must be same as Interface name.

To fix that, change the interface name in your network file /etc/sysconfig/network-scripts/ifcfg-eth2

This field:
NAME="System eth2" must be changed to NAME="eth2"

Best Regards,
Paulo Portugal

CELL-01514: Connect Error. Verify that Management Server is listening at the specified HTTP port: 8888.

CellCLI> list cell detail

CELL-01514: Connect Error. Verify that Management Server is listening at the specified HTTP port: 8888.
cellsrvStatus:     stopped
msStatus:           running
rsStatus:           running

Edit your /etc/hosts file and comment out this line below:

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Best Regards,
Paulo Portugal

Friday, June 27, 2014

ERROR Applying patch Database 12c Prerequisite check "CheckActiveFilesAndExecutables" failed.

The file that the installation is complaining is :

Following executables are active :
Log file location: /dbgc/products/12.1.0/rdbms/cfgtoollogs/opatch/opatch2014-06-27_15-55-45PM_1.log

1-Check who is using this file

fuser /dbgc/products/12.1.0/rdbms/lib/

2-Kill all PIDs using this file

3-Restart patching :

opatchauto apply /opt/oracle/binarios/18139660 -oh /dbgc/products/12.1.0/rdbms/ -ocmrf /opt/oracle/12.1.0/grid/OPatch/ocm/bin/ocm.rsp

Best Regards,
Paulo Portugal

Wednesday, June 25, 2014

Quickly create and mount ACFS DB 12c - Manually

1-Create volume
volcreate -G DG_GRID -s 20G ACFS_VOL1

2-Check volume created

ASMCMD> volinfo --all
Diskgroup Name: DG_GRID

Volume Name: ACFS_VOL1
Volume Device: /dev/asm/acfs_vol1-131
Size (MB): 20480
Resize Unit (MB): 32
Redundancy: UNPROT
Stripe Columns: 4
Stripe Width (K): 128


3-Create ACFS

[grid@bwdhdbpr106 ~]$ /sbin/mkfs -t acfs /dev/asm/acfs_vol1-131
mkfs.acfs: version                   =
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/acfs_vol1-131
mkfs.acfs: volume size               = 21474836480
mkfs.acfs: Format complete.
[grid@bwdhdbpr106 ~]$

4-Mount ACFS (login as root)

/bin/mount -t acfs /dev/asm/acfs_vol1-131 /ACFS

Best Regards,
Paulo Portugal