Tuesday, 11 October 2016

RAC crs Commands

In this article, I am going to explain how to stop/start rac components. Here is the my system:

My db version : 11.2.0.3
My Operating System : AIX 7.1
My servers hostname : node1-node2
My database name : TEST01
My instance name : TEST011-TEST012

Here is the some basic  commands, for commands details&options  please review Reference docs:


Checking CRS Status
[oracle@node1]</home/oracle> crsctl check crs

CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[oracle@node2]</home/oracle> crsctl check crs

CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

Checking Node Status

[oracle@node1]</home/oracle> srvctl status nodeapps

VIP node1-vip is enabled
VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

[oracle@node2]</home/oracle> srvctl status nodeapps

VIP node1-vip is enabled
VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

Checking Clusterware Resource Status
[oracle@node1]</home/oracle> crsctl status resource -t

I will not paste result because output is not clear in that page

You can use below command which is not recommended for 11g and which is depreciated

[oracle@node1]</home/oracle> crs_stat -t
Name Type Target State Host
————————————————————
ora….DATA.dg ora….up.type ONLINE ONLINE node1
ora….ER.lsnr ora….er.type ONLINE ONLINE node1
ora….N1.lsnr ora….er.type ONLINE ONLINE node1
ora….N2.lsnr ora….er.type ONLINE ONLINE node2
ora.ORADATA.dg ora….up.type ONLINE ONLINE node1
ora.asm ora.asm.type ONLINE ONLINE node1
ora.cvu ora.cvu.type ONLINE ONLINE node2
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora….SM1.asm application ONLINE ONLINE node1
ora….11.lsnr application ONLINE ONLINE node1
ora….b11.gsd application OFFLINE OFFLINE
ora….b11.ons application ONLINE ONLINE node1
ora….b11.vip ora….t1.type ONLINE ONLINE node1
ora….SM2.asm application ONLINE ONLINE node2
ora….12.lsnr application ONLINE ONLINE node2
ora….b12.gsd application OFFLINE OFFLINE
ora….b12.ons application ONLINE ONLINE node2
ora….b12.vip ora….t1.type ONLINE ONLINE node2
ora….network ora….rk.type ONLINE ONLINE node1
ora.oc4j ora.oc4j.type ONLINE ONLINE node2
ora.ons ora.ons.type ONLINE ONLINE node1
ora.test01.db ora….se.type ONLINE ONLINE node1
ora….int.svc ora….ce.type ONLINE ONLINE node2
ora….int.svc ora….ce.type ONLINE ONLINE node2
ora….kis.svc ora….ce.type ONLINE ONLINE node2
ora….est.svc ora….ce.type ONLINE ONLINE node1
ora….ry.acfs ora….fs.type ONLINE ONLINE node1
ora.scan1.vip ora….ip.type ONLINE ONLINE node1
ora.scan2.vip ora….ip.type ONLINE ONLINE node2

Oracle High Availability Services

— disable/enable Oracle HAS.
Use the “crsctl enable/disable has” command to disable automatic startup of the Oracle High Availability Services stack when the server boots up.

To can see current settings for Oracle High Availability Services stack when the server boots up, follow:

[root@node1]crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

or

[root@node1]cat /etc/oracle/scls_scr/node1/root/ohasdstr
enable

So as you can see my current setting is enable.If your system shown disable than :

For Disable:
[root@node1]crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

[root@node1] crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

# cat /etc/oracle/scls_scr/node1/root/ohasdstr
disable

For Enable:
[root@node1]crsctl enable has
CRS-4621: Oracle High Availability Services autostart is enabled.

Check new setting:

[root@node1] crsctl config has
CRS-4621: Oracle High Availability Services autostart is enabled.

[root@node1] cat /etc/oracle/scls_scr/node1/root/ohasdstr
enable

Stop the Oracle clusterware stack

You can use below commands:

With root user:

crsctl stop crs or crsctl stop has

[root@node1]crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘node1’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘node1’
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘node1’
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN2.lsnr’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.test01.db’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN3.lsnr’ on ‘node1’
CRS-2677: Stop of ‘ora.LISTENER_SCAN2.lsnr’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.scan2.vip’ on ‘node1’
CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.node1.vip’ on ‘node1’
CRS-2677: Stop of ‘ora.LISTENER_SCAN3.lsnr’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.scan3.vip’ on ‘node1’
CRS-2677: Stop of ‘ora.node1.vip’ on ‘node1’ succeeded
CRS-2672: Attempting to start ‘ora.node1.vip’ on ‘node2’
CRS-2677: Stop of ‘ora.scan2.vip’ on ‘node1’ succeeded
CRS-2672: Attempting to start ‘ora.scan2.vip’ on ‘node2’
CRS-2677: Stop of ‘ora.scan3.vip’ on ‘node1’ succeeded
CRS-2672: Attempting to start ‘ora.scan3.vip’ on ‘node2’
CRS-2676: Start of ‘ora.node1.vip’ on ‘node2’ succeeded
CRS-2677: Stop of ‘ora.test01.db’ on ‘node1’ succeeded
CRS-2676: Start of ‘ora.scan2.vip’ on ‘node2’ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN2.lsnr’ on ‘node2’
CRS-2676: Start of ‘ora.scan3.vip’ on ‘node2’ succeeded
CRS-2672: Attempting to start ‘ora.LISTENER_SCAN3.lsnr’ on ‘node2’
CRS-2676: Start of ‘ora.LISTENER_SCAN2.lsnr’ on ‘node2’ succeeded
CRS-2676: Start of ‘ora.LISTENER_SCAN3.lsnr’ on ‘node2’ succeeded
CRS-2673: Attempting to stop ‘ora.ons’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.eons’ on ‘node1’
CRS-2677: Stop of ‘ora.ons’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘node1’
CRS-2677: Stop of ‘ora.net1.network’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.eons’ on ‘node1’ succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘node1’ has completed
CRS-2677: Stop of ‘ora.crsd’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘node1’
CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.gpnpd’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.evmd’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.ctssd’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘node1’
CRS-2677: Stop of ‘ora.cssd’ on ‘node1’ succeeded
CRS-2673: Attempting to stop ‘ora.diskmon’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘node1’
CRS-2677: Stop of ‘ora.gipcd’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.diskmon’ on ‘node1’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘node1’ has completed
CRS-4133: Oracle High Availability Services has been stopped.

Start the Oracle clusterware stack

You can use below commands:

With root user:
crsctl start crs or crsctl start has

[root@node1] crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

Start the Oracle Database
To start all Oracle RAC instances for a database:
[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl start database -d db_name

PS: db_name is the name of the databasethis command is starting all the instances

Stop the Oracle Database
To shut down all Oracle RAC instances for a database:
[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl stop database -d db_name

PS: db_name is the name of the databasethis command is starting all the instances

Start the Oracle Instance:

[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl start instance –d db_name –i instance_name

Stop the Oracle Instance:

[oracle@node1]</home/oracle> $ORACLE_HOME/bin/srvctl stop instance –d db_name –i instance_name
Stop/Start Listener-SCAN_LISTENER

srvctl stop/start listener -n node1
srvctl stop/start listener -n node2
srvctl stop scan_listener

Stop ASM

srvctl stop asm [-o stop_options] [-f]
srvctl stop asm -n node1

Thursday, 1 September 2016

Cell Offloading in Exadata

First let's know what is offloading and benefit of cell offloading in Exadata?

What is Cell Offloading :-

It refers to the fact that part of the traditional SQL processing done by the database can be “offloaded” from the database layer to the storage layer.

Benefit: The primary benefit of Offloading is the reduction in the volume of data that must be returned to the database server. This is one of the major bottlenecks of most  large databases.


Below is the example of cell offloading.

We have created table cell_offload with 20 lac records.


#### Checking the cell offloading process in DB parameter  ####


SQL> show parameter cell_offload_processing

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cell_offload_processing              boolean     TRUE


# Flush buffer_cache and shared_pool to get exact result of offloading scenario #


SQL> alter system flush buffer_cache;

System altered.

SQL>  alter system flush SHARED_POOL;

System altered.

Saturday, 27 August 2016

CellCLI in Exadata

cellcli commands in Oracle Exadata
CellCLI  --- Cell Command Line Interface/Interpreter (in Oracle Exadata)

CellCLI manages Exadata Storage Servers (Cells). The scope of the CellCLI command is the cell where it is run, not in other cells. To invoke the CellCLI, login to the Exadata cell as cellmonitor, celladmin, or root, and type "cellcli".

# cellcli
# cellcli -e list cell
# cellcli -x -n -e "list metrichistory where objectType='CELL'"
# cellcli <mycellci.commands >mycellci.output

Download Pdf Physical Bill gates twitter Calibrate Commands Content Debate Definition
Help
CellCLI> help
HELP [topic]
    Available Topics:
        ALTER
        ALTER ALERTHISTORY
        ALTER CELL
        ALTER CELLDISK
        ALTER GRIDDISK
        ALTER IBPORT
        ALTER IORMPLAN
        ALTER LUN
        ALTER PHYSICALDISK
        ALTER QUARANTINE
        ALTER THRESHOLD
        ASSIGN KEY
        CALIBRATE
        CREATE
        CREATE CELL
        CREATE CELLDISK
        CREATE FLASHCACHE
        CREATE GRIDDISK
        CREATE KEY
        CREATE QUARANTINE
        CREATE THRESHOLD
        DESCRIBE
        DROP
        DROP ALERTHISTORY
        DROP CELL
        DROP CELLDISK
        DROP FLASHCACHE
        DROP GRIDDISK
        DROP QUARANTINE
        DROP THRESHOLD
        EXPORT CELLDISK
        IMPORT CELLDISK
        LIST
        LIST ACTIVEREQUEST
        LIST ALERTDEFINITION
        LIST ALERTHISTORY
        LIST CELL
        LIST CELLDISK
        LIST FLASHCACHE
        LIST FLASHCACHECONTENT
        LIST GRIDDISK
        LIST IBPORT
        LIST IORMPLAN
        LIST KEY
        LIST LUN
        LIST METRICCURRENT
        LIST METRICDEFINITION
        LIST METRICHISTORY
        LIST PHYSICALDISK
        LIST QUARANTINE
        LIST THRESHOLD
        SET
        SPOOL
        START
CellCLI> help list ibport
CellCLI> help alter cell

Describe       --- Will display all attributes
CellCLI> describe cell
CellCLI> describe physicaldisk
CellCLI> describe lun
CellCLI> describe celldisk
CellCLI> describe griddisk
CellCLI> describe flashcache
CellCLI> describe flashcachecontent
CellCLI> describe metriccurrent
CellCLI> describe metricdefinition
CellCLI> describe metrichistory 

List
CellCLI> help list
Enter HELP LIST <object_type> for specific help syntax.
    <object_type>:  {ACTIVEREQUEST | ALERTDEFINITION | ALERTHISTORY | CELL | CELLDISK | FLASHCACHE | FLASHCACHECONTENT | GRIDDISK | IBPORT | IORMPLAN | KEY | LUN | METRICCURRENT | METRICDEFINITION | METRICHISTORY | PHYSICALDISK | QUARANTINE | THRESHOLD }

CellCLI> list cell   - Will display Oracle Exadata Storage Servers/Cells information
CellCLI> list cell detail
CellCLI> list cell attributes all
CellCLI> list cell attributes rsStatus

CellCLI> list physicaldisk           - Will display physical disks information
CellCLI> list physicaldisk detail
CellCLI> list physicaldisk 34:5
CellCLI> list physicaldisk 34:11 detail
CellCLI> list physicaldisk attributes all
CellCLI> list physicaldisk attributes name, id, slotnumber
CellCLI> list physicaldisk attributes name, disktype, makemodel, physicalrpm, physicalport, status
CellCLI> list physicaldisk attributes name, disktype, errCmdTimeoutCount, errHardReadCount, errHardWriteCount
CellCLI> list physicaldisk where diskType='Flashdisk'
CellCLI> list physicaldisk attributes name, id, slotnumber where disktype="flashdisk" and status != "not present"
CellCLI> list physicaldisk attributes name, physicalInterface, physicalInsertTime where disktype = 'Harddisk'
CellCLI> list physicaldisk where diskType=flashdisk and status='poor performance' detail

CellCLI> list lun             - Will display LUNs information
CellCLI> list lun detail
CellCLI> list lun 0_8 detail
CellCLI> list lun attributes all
CellCLI> list lun attributes name, cellDisk, raidLevel, status
CellCLI> list lun where disktype=flashdisk

CellCLI> list celldisk        - Will display cell disks information
CellCLI> list celldisk detail
CellCLI> list celldisk FD_01_cell07
CellCLI> list celldisk FD_01_cell13 detail
CellCLI> list celldisk attributes all
CellCLI> list celldisk attributes name, devicePartition
CellCLI> list celldisk attributes name, devicePartition where size>20G
CellCLI> list celldisk attributes name,interleaving where disktype=harddisk

CellCLI> list griddisk      - Will display grid disks information
CellCLI> list griddisk detail
CellCLI> list griddisk DG_01_cell03 detail
CellCLI> list griddisk attributes all
CellCLI> list griddisk attributes name, size
CellCLI> list griddisk attributes name, cellDisk, diskType
CellCLI> list griddisk attributes name, ASMDeactivationOutcome, ASMModeStatus     --- describe command does not show these two attributes
CellCLI> list griddisk attributes name,cellDisk,status where size=476.546875G
CellCLI> list griddisk attributes name where asmdeactivationoutcome != 'Yes'

CellCLI> list flashcache     - Will display flash cache information
CellCLI> list flashcache detail
CellCLI> list flashcache attributes all
CellCLI> list flashcache attributes degradedCelldisks


CellCLI> help list FLASHCACHECONTENT
  Usage: LIST FLASHCACHECONTENT [<filters>] [<attribute_list>] [DETAIL]
  Purpose: Displays specified attributes for flash cache entries.
  Arguments:
   <filters>: An expression which determines the entries to be displayed.
   <attribute_list>: The attributes that are to be displayed. ATTRIBUTES {ALL | attr1 [, attr2]... }
   [DETAIL]: Formats the display as an attribute on each line, with an attribute descriptor preceding each value.

CellCLI> list flashcachecontent        - Will display flash cache content information
CellCLI> list flashcachecontent detail
CellCLI> list flashcachecontent where objectnumber=161441 detail
CellCLI> list flashcachecontent where dbUniqueName like 'EX.?.?' and hitcount > 100 attributes dbUniqueName, objectNumber, cachedKeepSize, cachedSize
CellCLI> list flashcachecontent where dbUniqueName like 'EX.?.?' and objectNumber like '.*007'
CellCLI> list flashcachecontent where dbUniqueName like '.*X.?.?' and objectNumber like '.*456' detail

CellCLI> list metriccurrent    - Will display metrics information
CellCLI> list metriccurrent gd_io_rq_w_sm
CellCLI> list metriccurrent n_nic_rcv_sec detail
CellCLI> list metriccurrent attributes name,metricObjectName,metricType, metricValue,objectType where alertState != 'normal'
CellCLI> list metriccurrent attributes name,metricObjectName,metricType, metricValue,alertState where objectType = 'HOST_INTERCONNECT'
CellCLI> list metriccurrent attributes all where objectType = 'CELL'
CellCLI> list metriccurrent attributes all where objectType = 'GRIDDISK' -
> and metricObjectName = 'DATA_CD_09_cell01' and metricValue > 0

CellCLI> list metricdefinition        - Will display metric's definitions
CellCLI> list metricdefinition cl_cput detail
CellCLI> list metricdefinition attributes all where objecttype='CELL'

CellCLI> list metrichistory           - Will display metric's history
CellCLI> list metrichistory cl_cput
CellCLI> list metrichistory where objectType = 'CELL'
CellCLI> list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'
CellCLI> list metrichistory cl_cput where collectiontime > '*2011-10-15T22:56:04-04:00*'
# cellcli -x -n -e "list metrichistory where objectType='CELL' and name='CL_TEMP'"
--- -x to suppress the banner, and the -n to suppress the command line

CellCLI> list alertdefinition detail    - Will display alert's definitions
CellCLI> list alertdefinition attributes all where alertSource!='Metric'

CellCLI> list alerthistory        - Will display alert's history
CellCLI> list alerthistory detail
CellCLI> list alerthistory where notificationState like '[023]' and severity like '[warning|critical]' and examinedBy = NULL;

CellCLI> list activerequest

CellCLI> list ibport       - Will display InfiniBand configuration details
CellCLI> list ibport detail

CellCLI> list iormplan       - Will display IORM plan details

CellCLI> list key

CellCLI> list quarantine

CellCLI> list threshold      - Will display threshold details

Create
CellCLI> CREATE CELL [cellname] [realmname=realmvalue,] [interconnect1=ethvalue,] [interconnect2=ethvalue,][interconnect3=ethvalue,] [interconnect4=ethvalue,]
 ( ([ipaddress1=ipvalue,] [ipaddress2=ipvalue,] [ipaddress3=ipvalue,] [ipaddress4=ipvalue,]) | ([ipblock=ipblkvalue, cellnumber=numvalue]) )  --- To configure the Oracle Exadata cell network and starts services.

CellCLI> create celldisk all harddisk
CellCLI> create celldisk all
CellCLI> create celldisk all harddisk interleaving='normal_redundancy'
    interleaving -- none(default), normal_redundancy or high_redundancy
CellCLI> create celldisk all flashdisk

CellCLI> create griddisk RECO_CD_11_cell01 celldisk=CD_11_cell01
CellCLI> create griddisk RECO_CD_11_cell01 celldisk=CD_11_cell01 size=100M
CellCLI> create griddisk all prefix RECO 
CellCLI> create griddisk all flashdisk prefix FLASH
CellCLI> create griddisk all harddisk prefix HARD
CellCLI> create griddisk all harddisk prefix='data', size='270g'
CellCLI> create griddisk all prefix='data', size='300g'
CellCLI> create griddisk all prefix='redo', size='150g'
CellCLI> create griddisk all harddisk prefix=systemdg

CellCLI> create flashcache celldisk='FD_00_cell01'
CellCLI> create flashcache celldisk='FD_13_cell01,FD_00_cell01,FD_10_cell01,FD_02_cell01,FD_06_cell01, FD_12_cell01,FD_05_cell01,FD_08_cell01,FD_15_cell01,FD_14_cell01,FD_07_cell01,FD_04_cell01,FD_03_cell01,FD_11_cell01,FD_09_cell01,FD_01_cell01'
CellCLI> create flashcache all
CellCLI> create flashcache all size=365.25G

CellCLI> create key

CellCLI> create quarantine

CellCLI> create threshold cd_io_errs_min.prodb comparison=">", critical=10
CellCLI> create threshold CD_IO_ERRS_MIN warning=1, comparison='>=', occurrences=1, observation=1

Alter
CellCLI> alter cell shutdown services rs - To shutdown the Restart Server service
CellCLI> alter cell shutdown services MS - To shutdown the Management Server service
CellCLI> alter cell shutdown services CELLSRV - To shutdown the Cell Services
CellCLI> alter cell shutdown services all -To shutdown the RS, CELLSRV and MS services
CellCLI> alter cell restart services rs
CellCLI> alter cell restart services all

CellCLI> alter cell led on
CellCLI> alter cell led off

CellCLI> alter cell validate mail
CellCLI> alter cell validate configuration
CellCLI> alter cell smtpfromaddr='cell07@orac.com'
CellCLI> alter cell smtpfrom='Exadata Cell 07'
CellCLI> alter cell smtptoaddr='satya@orac.com'
CellCLI> alter cell emailFormat='text'
CellCLI> alter cell emailFormat='html'


CellCLI> alter cell validate snmp type=ASR - Automatic Service Requests (ASRs)
CellCLI> alter cell snmpsubscriber=((host='snmp01.orac.com,type=ASR'))

CellCLI> alter cell restart bmc  - BMC, Baseboard Management Controller, controls the compoments of the cell.
CellCLI> alter cell configure bmc

CellCLI> alter physicaldisk 34:2,34:3 serviceled on
CellCLI> alter physicaldisk 34:6,34:9 serviceled off
CellCLI> alter physicaldisk harddisk serviceled on
CellCLI> alter physicaldisk all serviceled on

CellCLI> alter lun 0_10 reenable
CellCLI> alter lun 0_04 reenable force

CellCLI> alter celldisk FD_01_cell07 comment='Flash Disk'
CellCLI> alter celldisk all harddisk comment='Hard Disk'
CellCLI> alter celldisk all flashdisk comment='Flash Disk'

CellCLI> alter griddisk RECO_CD_10_cell06 comment='Used for Reco'
CellCLI> alter griddisk all inactive
CellCLI> alter griddisk RECO_CD_11_cell12 inactive
CellCLI> alter griddisk RECO_CD_08_cell01 inactive force
CellCLI> alter griddisk RECO_CD_11_cell01 inactive nowait
CellCLI> alter griddisk DATA_CD_00_CELL01,DATA_CD_02_CELL01,...DATA_CD_11_CELL01 inactive
CellCLI> alter griddisk all active
CellCLI> alter griddisk RECO_CD_11_cell01 active
CellCLI> alter griddisk all harddisk comment='Hard Disk'

CellCLI> alter ibport ibp2 reset counters

CellCLI> alter iormplan active

CellCLI> alter quarantine

CellCLI> alter threshold DB_IO_RQ_SM_SEC.PRODB comparison=">", critical=100

CellCLI> alter alerthistory

Drop
CellCLI> drop cell --- To reset the cell to its factory settings, removes the cell related properties of the server; it does not actually remove the physical server.
CellCLI> drop cell force

CellCLI> drop celldisk CD_01_cell05
CellCLI> drop celldisk CD_00_cell09 force
CellCLI> drop celldisk harddisk
CellCLI> drop celldisk flashdisk
CellCLI> drop celldisk all
CellCLI> drop celldisk all flashdisk force

CellCLI> drop griddisk DBFS_DG_CD_02_cel14
CellCLI> drop griddisk RECO_CD_11_cell01 force
CellCLI> drop griddisk prefix=DBFS
CellCLI> drop griddisk flashdisk
CellCLI> drop griddisk harddisk
CellCLI> drop griddisk all
CellCLI> drop griddisk all prefix=temp_dg

CellCLI> drop flashcache

CellCLI> drop quarantine

CellCLI> drop threshold DB_IO_RQ_SM_SEC.PRODB

CellCLI> drop alerthistory

Export
CellCLI> export celldisk

Import
CellCLI> import celldisk

Assign
CellCLI> assign key

Calibrate
CellCLI> calibrate
CellCLI> calibrate force

Set
CellCLI> help set
  Usage: SET <variable> <value>
  Purpose: Sets a variable to alter the CELLCLI environment settings for your current session.
  Arguments: variable and value represent one of the following clauses:
    DATEFORMAT { STANDARD | LOCAL }
    ECHO { ON | OFF }

CellCLI> set dateformat local
CellCLI> set dateformat standard

CellCLI> set echo on
CellCLI> set echo off

Spool
CellCLI> spool myCellCLI.txt
CellCLI> spool myCellCLI.txt append
CellCLI> spool myCellCLI.txt replace
CellCLI> spool off
CellCLI> spool     --- Will give spool file name

Scripts execution
CellCLI> @listdisks.cli
CellCLI> start listdisks.cli

Comments
REM This is a comment
REMARK This is another comment
-- This is yet another comment

Continuation Character
CellCLI> list metriccurrent attributes name,metricObjectName,metricValue, -
objectType where alertState != 'normal'   --- continuation character for queries spanned in multiple lines

Exit/Quit
CellCLI> exit
CellCLI> quit

Tuesday, 26 July 2016

Create a user and grant connect and execute

CREATE USER username IDENTIFIED BY apassword;

GRANT CONNECT TO username;

GRANT EXECUTE on schema.procedure TO username;

Friday, 22 July 2016

What IS Exadata?



Exadata is a machine, composed of matched and tuned components providing enhancements available with no other configuration, which can improve the performance of the database tier. This system includes database servers, storage servers, an internal Infiniband network with switches, and storage devices (disks), all configured by Oracle Advanced Customer Support personnel to meet the customer’s requirements. Can it improve every situation? No, but it wasn’t designed to. Originally designed as a data warehouse/business intelligence appliance the releases from V2 on have added OLTP applications to the list.

Available Configurations:-

The previous Exadata release was X2, which had four available configurations, three of which included a keyboard/video/mouse module:

X2-2 Quarter Rack – Two database servers each with 2 6-core Xeon processors and 48 GB of RAM, three storage servers, 36 disk drives

X2-2 Half Rack – Four database servers each with 2 6-core Xeon processors and 48 GB of RAM, seven storage servers, 84 disk drives, spine switch for expansion

X2-2 Full Rack – Eight database servers each with 2 6-core Xeon processors and 48 GB of RAM, fourteen storage servers, 168 disk drives, spine switch for expansion

X2-8 Full Rack – Two database servers each with 8 10-core Xeon processors and 2 TB of RAM, fourteen storage servers, 168 disk drives, spine switch for expansion, no keyboard/video/mouse module The -2 and the -8 descriptors indicate the CPU count per database server. Note that the X2-8 configuration has more total CPU cores (16 10-core CPUs versus 16 6-core CPUs for the full rack 
X2-2 configuration) so you do get a bit more computing power at the expense of not having the internal keyboard/video/mouse module. An X3 series of Exadata machines is now available, replacing the X2 series, in the following five configurations:

X3-2 Eighth Rack – Two database servers each with 2 8-core Xeon processors with 8 cores enabled and 256 GB of RAM, three storage servers, 36 disk drives

X3-2 Quarter Rack – Two database servers each with 2 8-core Xeon processors and 256 GB of RAM, three storage servers, 36 disk drives.

X3-2 Half Rack – Four database servers each with 2 8-core Xeon processors and 256 GB of RAM, seven storage servers, 84 disk drives, spine switch for expansion

X3-2 Full Rack – Eight database servers each with 2 8-core Xeon processors and 256 GB of RAM, fourteen storage servers, 168 disk drives, spine switch for expansion.

X3-8 Full Rack – Two database servers each with 8 10-core Xeon processors and 2 TB of RAM, fourteen storage servers, 168 disk drives, spine switch for expansion, no keyboard/video/mouse module
In general the X3 series of Exadata machines is twice as powerful than the X2 series on a ‘like for like’ comparison.

Storage

How much raw storage you have depends on whether you choose High Capacity or High Performance drives – High Capacity drives have 3 TB each of raw storage running at 7,200 RPM and the High Performance drives have 600 GB each running at 15,000 RPM. For a Quarter Rack or Eighth Rack configuration with High Capacity disks 108 TB of total raw storage is provided with roughly 40 TB available for data after normal ASM redundancy is configured. Using High Performance disks the total raw storage for the same units is 21.1 TB with approximately 8.4 TB of usable data storage with normal ASM redundancy. High redundancy reduces the storage by roughly another third on both configurations; the tradeoff is the additional ASM mirror in case of disk failure as high redundancy provides two copies of the data. Normal redundancy provides one copy.

The disks are accessed through the storage servers (or cells). It is interesting to note that there is no direct access to the storage from the database servers; the only way they can ‘see’ the disks is through ASM. In the X3-2 Quarter Rack and Eighth Rack configurations there are three storage cells with each storage cell controlling 12 disks. Each storage server provides two eight-core Xeon processors and 256GB of RAM. Between the various configurations of Exadata the differences become the number of database servers (often referred to as ‘compute nodes’) and the number of storage servers or cells – the greater the number of storage cells the more storage the Exadata machine can control internally.

Smart Flash Cache

Another part of the Exadata performance package is the Smart Flash Cache, 1600 GB of solid-state flash storage for each storage cell configured across four Sun Flash Accelerator F20 PCIe cards. With a Quarter Rack configuration (three storage servers/cells) 4.7 TB of flash storage is available; a Full Rack provides 22.6 TB of flash storage. The flash cache is usable as a smart cache to service large volumes of random reads and writes or it can be configured as flash disk devices and mounted as an ASM diskgroup.

Even More Storage

Expansion racks consist of both storage servers and disk drives.There are three different configurations available: Quarter Rack, Half Rack and Full Rack, any of which can connect to any Oracle Exadata machine.For the Quarter Rack configuration an additional spine switch will be necessary; the IP address for the spine switch is left unassigned during configuration so that if one is installed the address will be available with no need to reconfigure the machine. Besides adding storage these racks also add computing power for Smart Scan operations withthe smallest expansion rack containing four storage servers and 48 disk drives, adding eight six-core CPUs to the mix. The largest expansion rack provides 18 storage servers with 216 disk drives. Actual storage will depend on whether the system is using High Capacity or High Performance disk drives; the drive types cannot be mixed in a single Exadata machine/expansion rack configuration, so if the Exadata machine is using High Capacity drives then the Expansion Rack must also contain High Capacity disks.One reason for this requirement is that ASM stripes the data across the total number of drives in a disk group thus the size and geometry of the disk units must be uniform across the storage tier. The beauty of these expansion racks is they integrate seamlessly with the existing storage on the host Exadata machine. Once these disks are added to the diskgroups ASM automatically triggers a rebalance to evenly distribute the extents across the total number of available disks. If the storage in the Expansion Rack is destined for a new diskgroup then the disk type does not need to match that of the Exadata system; the only requirement is that all disks in a single diskgroup be of the same type.

Summary

An Exadata machine is a complex configuration of database servers, storage servers, disk drives and an internal Infiniband network with modifications designed to address many performance issues in a unique way. It’s the first machine with a ‘divide and conquer’ approach to query processing that can dramatically improve performance and reduce query response time. It also includes Smart Flash Cache, a write-back cache that can handle large volumes of reads and writes and is designed for OLTP systems. This cache can also be configured as flash disk. Additional storage is available in the form of Exadata Expansion Racks, which can be added to any Exadata configuration to extend the storage and add storage cell computing power. The storage in the Expansion Rack must be the same type (High Capacity, High Performance) as in the Exadata Machine if the additional storage is to be added to an existing diskgroup. Should another diskgroup be created from the disks in the Expansion Rack those disks do not need to match those in the Exadata Server, they simply must be consistent across a diskgroup.

Command to list larger files in Unix



du -sh * |sort -n -r |head -10

Add Data file

 ************************************************** Database status Tablespace Usage ASM Disk Group Usage(RAC) Backup Filesystem Usage Alert...