Amazon books

Tuesday, October 14, 2014

Check if your database is using ASYNC_IO or not

TO check if your database is using async_io, just execute this query below;

SYS@ABR1 AS SYSDBA> select count(*) filetype_name,asynch_io from v$iostat_file group by filetype_name,asynch_io;

FILETYPE_NAME ASYNCH_IO
------------- ---------
   1 ASYNC_OFF
   1 ASYNC_OFF
   1 ASYNC_OFF
  15 ASYNC_ON
   1 ASYNC_OFF
   1 ASYNC_OFF
   1 ASYNC_OFF
   1 ASYNC_OFF
   1 ASYNC_OFF
   1 ASYNC_OFF
 185 ASYNC_ON
   1 ASYNC_OFF

12 rows selected.

SYS@ABR1 AS SYSDBA>


As you can see, I have 185 datafiles using ASYNC IO, if you cannot find anyone using ASYNC_ON, than you are not using ASYNC_IO, check your disk_asynch_io initialisation parameter and make sure it is set to TRUE.  Also check with your OS admin if your OS is ok to use ASYNC IO.

Best Regards,
Paulo Portugal


Thursday, October 2, 2014

GGSCI (host) 3> dblogin useridalias ggadm ERROR: Unable to open credential store. Error code 28761..

Add credentias to new version of GG:




GGSCI (host) 4> ADD CREDENTIALSTORE

Credential store created in ./dircrd/.

GGSCI (host) 5> ALTER CREDENTIALSTORE ADD USER ggadm, password xxxxx alias ggadm

Credential store in ./dircrd/ altered.

GGSCI (host) 6> dblogin useralias ggadm



This wors fine for me.

Best Regards,
Paulo Portugal

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

root.sh 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/rootcrs.pl 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
setkst
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 root.sh 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/agentDeploy.sh -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 12.1.0.2 Commands

ASMCMD> help
asmcmd
        Starts asmcmd or executes the command

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

Description
        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
        ASMCMD.
       
        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:

        ASMCMD [+DATA/ORCL/CONTROLFILE] >

        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
        parameters.

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

        commands:
        --------

        md_backup, md_restore

        amdu_extract

        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                       
       AUDIT_TRAIL_WRITE_MODE     QUEUED WRITE MODE       
       AUDIT_TRAIL_WRITE_MODE                             
ASMCMD> showclustermode
ASM cluster : Flex mode disabled
ASMCMD> showclusterstate
Normal
ASMCMD> showversion
ASM version         : 12.1.0.2.0
ASMCMD> spbackup
usage: spbackup
help:  help spbackup
ASMCMD>
ASMCMD> help spbackup
spbackup
        Backs up an Oracle ASM SPFILE to a back up file.

Synopsis
        spbackup

Description
        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.

Examples
        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
                        +DATA/spfileBackASM.bak
        ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181
                        +FRA/spfileBackASM.bak

See Also
       cp spcopy

ASMCMD> help chtmpl
chtmpl
        Changes the attributes of a template.

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