Amazon books

Friday, September 12, 2014

Change VMs on ODA using OAKCLI

1-Change  memory of a VM on ODA

oakcli configure vm VMBUILDER -maxmemory 24000 -memory 24000

2-Change CPU of a VM on ODA

oakcli configure vm VMBUILDER -vcpu 32 -maxvcpu 32

3-Configure a vm template

oakcli configure vmtemplate OEM12CTMPL -memory 8192M -maxmemory 8192M
oakcli configure vmtemplate OEM12CTMPL -network "['type=netfront, bridge=net1']"

4-Create CPU Pools

    oakcli create cpupool empool -numcpu 4 -node 0
    oakcli create cpupool empool -numcpu 4 -node 1

5-Use HA on a VM

oakcli configure vm OEM12CNODE1 -failover true -prefnode 0
    oakcli configure vm OEM12CNODE2 -failover true -prefnode 1

Best Regards,
Paulo Portugal

Wednesday, September 3, 2014 Failed on 11g RAC Installation. "USM driver install actions failed" "ACFS-9361: Removing device 'acfsctl' failed with error code '5888'"

If you got this error below while installing a new RAC 11g,

Now product-specific root actions will be performed.
Using configuration parameter file: /opt/oracle/products/11.2/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
USM driver install actions failed
/opt/oracle/products/11.2/grid/perl/bin/perl -I/opt/oracle/products/11.2/grid/perl/lib -I/opt/oracle/products/11.2/grid/crs/install /opt/oracle/products/11.2/grid/crs/install/ execution failed

This is because your servers have some files from an old installation. Remove them. On all nodes, run these command below logged in as root:

/usr/sbin/rmsecattr -c /usr/lib/methods/defacfsctl
/usr/sbin/rmsecattr -c /usr/lib/methods/udefacfsctl
/usr/sbin/rmsecattr -c /usr/lib/methods/cfgacfsctl
/usr/sbin/rmsecattr -c /usr/lib/methods/ucfgacfsctl
/usr/sbin/rmsecattr -c /usr/lib/methods/defadvmctl
/usr/sbin/rmsecattr -c /usr/lib/methods/udefadvmctl
/usr/sbin/rmsecattr -c /usr/lib/methods/cfgadvmctl
/usr/sbin/rmsecattr -c /usr/lib/methods/ucfgadvmctl
/usr/sbin/rmsecattr -c /usr/lib/methods/cfgadvmvol
/usr/sbin/rmsecattr -c /usr/lib/methods/ucfgadvmvol
/usr/sbin/rmauth -h oracle
rmrole oracle_devmgmt
rm /usr/lib/drivers/oracle*
rm /usr/lib/methods/*advm* /usr/lib/methods/*acfs*
rm -rf /sbin/helpers/acfs
rm /usr/sbin/acfsutil* /usr/sbin/advmutil*
rm /sbin/acfsutil* /sbin/advmutil*

After that, run again

Best Regards,
Paulo Portugal

Tuesday, September 2, 2014

Command to nanually deploy agent on EM Grid 12c

This is an example to deploy an agent from the target host using command line:

/db/products/agent12c/ADATMP_2014-09-02_23-40-20-PM/ -ignorePrereqs ORACLE_HOSTNAME=xxx0307.b2w AGENT_BASE_DIR=/db/products/agent12c OMS_HOST=xxx105.b2w EM_UPLOAD_PORT=4900 AGENT_INSTANCE_HOME=/db/products/agent12c/agent_inst b_doDiscovery=false b_startAgent=false b_forceInstCheck=true AGENT_PORT=3872

Best Regards,
Paulo Portugal

New Data Pump (IMPDP) In Memory Option on 12c

No you can specify a TRANSFORM option when using Data Pump to use IM clause on all objects being imported.

impdp system dumptile=dir:file.dmp TRANSFORM=INMEMORY:Y

This is a default option for data pump in 12c. So, remember if you are not using in memory, take it off.

Best Regards,
Paulo Portugal

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