Thursday 13 December 2018

CELL-01548: Error in Exadata Cell Storage Server

The reason for error CELL-01548 is that diskgroup DATA1 is still mounted, hence you get the message CELL-01548: Unable to shut down CELLSRV because disk group DATA1 may be forced to dismount due to reduced redundancy

       

           [root@cell ~]# cellcli
CellCLI: Release 12.1.1.1.1 - Production on Thu Dec 13 16:36:20 IST 2018

Copyright (c) 2007, 2013, Oracle.  All rights reserved.
Cell Efficiency Ratio: 1

CellCLI> alter cell shutdown services all

Stopping the RS, CELLSRV, and MS services...
The SHUTDOWN of ALL services was not successful.
CELL-01548: Unable to shut down CELLSRV because disk group DATA1 may be forced to dismount due to reduced redundancy.
Getting the state of CELLSRV services...  running
Getting the state of MS services...  running
Getting the state of RS services...  running


       
 
After i dismounted the diskgroup with command SQL> Alter diskgroup data1 dismount;, i was able to shutdown the cell services
       

       [root@cell ~]# cellcli
CellCLI: Release 12.1.1.1.1 - Production on Thu Dec 13 16:41:22 IST 2018

Copyright (c) 2007, 2013, Oracle.  All rights reserved.
Cell Efficiency Ratio: 1

CellCLI>  alter cell shutdown services all

Stopping the RS, CELLSRV, and MS services...
The SHUTDOWN of services was successful.

CellCLI>


       
 

CELLSRV in Exadata


Being an Exadata guy, many times i had been asked what CELLSRV is and what it does and how it is invoked ? Cell Server (CELLSRV) services iDB requests for disk I/O and advanced Oracle Exadata Storage Server services, such as predicate processing offload. CELLSRV is implemented as a multithreaded process and should be expected to use the largest portion of processor cycles on a storage cell. Cellsrv is launched by cellrsomt by executable /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/bin/cellrsomt. Lets see how it works, in below output process id 3673 is parent of cellsrv (3682) and hence proved 3673 is cellrsomt which actually launched cellsrv


       

       [root@cell ~]# ps -ef |grep "/cellsrv "
root      3682  3673  2 13:25 ?        00:02:39 /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/bin/cellsrv 100 5000 9 5042
root      6983  6437  0 14:54 pts/0    00:00:00 grep /cellsrv
[root@cell ~]#
[root@cell ~]# ps -ef |grep 3673
root      3673  3665  0 13:25 ?        00:00:06 /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/bin/cellrsomt -rs_conf /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/deploy/config/cellinit.ora -ms_conf /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/deploy/config/cellrsms.state -cellsrv_conf /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/deploy/config/cellrsos.state -debug 0
root      3682  3673  2 13:25 ?        00:02:40 /opt/oracle/cell12.1.1.1.1_LINUX.X64_140712/cellsrv/bin/cellsrv 100 5000 9 5042
root      6986  6437  0 14:54 pts/0    00:00:00 grep 3673
[root@cell ~]#


       
 

I/O Resource Management Profiles in Exadata

I/O Resource Management (IORM) interdatabase plans support profiles to ease management, and configuration of interdatabase plans for hundreds of databases.
Profiles introduce a way to allocate I/O resources for a database. This is done using the database initialization parameter db_performance_profile. Database administrators can classify different databases as, GOLDSILVERBRONZE, by setting the db_performance_profile parameter. As with Oracle Database Resource Manager plans, the db_performance_profile information is automatically pushed to all the storage servers (cells). The following SQL command displays how the profile parameter can be set for a database:
SQL> ALTER SYSTEM SET db_performance_profile=gold SCOPE=spfile;
Profiles are specified as directives for the interdatabase plan, and are configured using the CellCLIutility. A profile directive consists of an identifier (name), and a set of attributes. To differentiate between a database directive and a profile directive, a qualifier attribute called type is used. The type attribute can be set to either database or profile. The following is an example of the type attribute syntax:
CellCLI> ALTER IORMPLAN DBPLAN=((name=gold, share=10, limit=100, type=profile),  \
(name=silver, share=5, limit=60, type=profile), (name=bronze, share=1, limit=20, \
 type=profile))

METRIC DEFINITION About GRIDDISK in Exadata


METRIC DEFINITION About GRIDDISK in Exadata can be found from command line of cellcli as below


CellCLI> LIST METRICDEFINITION WHERE objectType = 'GRIDDISK'

         GD_BY_FC_DIRTY
         GD_IO_BY_R_LG
         GD_IO_BY_R_LG_SEC
         GD_IO_BY_R_SCRUB
         GD_IO_BY_R_SCRUB_SEC
         GD_IO_BY_R_SM
         GD_IO_BY_R_SM_SEC
         GD_IO_BY_W_LG
         GD_IO_BY_W_LG_SEC
         GD_IO_BY_W_SM
         GD_IO_BY_W_SM_SEC
         GD_IO_ERRS
         GD_IO_ERRS_MIN
         GD_IO_ERRS_SCRUB
         GD_IO_RQ_R_LG
         GD_IO_RQ_R_LG_SEC
         GD_IO_RQ_R_SCRUB
         GD_IO_RQ_R_SCRUB_SEC
         GD_IO_RQ_R_SM
         GD_IO_RQ_R_SM_SEC
         GD_IO_RQ_W_LG
         GD_IO_RQ_W_LG_SEC
         GD_IO_RQ_W_SM
         GD_IO_RQ_W_SM_SEC

Exadata Cell Server CL_CPUT DETAIL

CL_CPUT DETAIL is the Percentage of time over the previous minute that the system CPUs were not idle, as can be seen from below snapshot




Wednesday 15 August 2018

Lambda function in Python

To understand Lambda function we need to see a normal function in Python first, Lets begin:

Lets define a function first and then we will convert it to Lambda function

-----------------------
def add(x, y):
    return x + y

print(add(2, 3))
-----------------------

Above function name is add, it expects two arguments x and y and returns their sum. Notice how we are printing and calling add function in last line

The output of above program is below:

-----------------------
5
-----------------------

# Now let us convert this function to Lambda function in Python

----------------------------------
add = lambda x, y : x + y

print (add(2, 3))

----------------------------------

The output of above code is below :

--------------
5
--------------

So what on earth is Lambda then ?

Basically lambda function is used for creating small, one-time and anonymous function objects in Python. In lambda x, y: x + y; x and y are arguments to the function and x + y is the expression which gets executed and its values is returned as output. Lambda functions can be used wherever function objects are required. They are syntactically restricted to a single expression. Semantically, they are just syntactic sugar for a normal function definition. Like nested function definitions, lambda functions can reference variables from the containing scope.



Function in Python

We will now write a function in Python :

-----------------------
def add(x, y):
    return x + y

print(add(2, 3))
-----------------------

Above function name is add, it expects two arguments x and y and returns their sum. Notice how we are printing and calling add function in last line

The output of above program is below:

-----------------------
5
-----------------------

Python if Statement

Lets write a Python code where we see how if statement is used

-----------------------------------
num = 3
if num > 0:
    print(num, "is a positive number.")
print("This is always printed.")

num = -1
if num > 0:
    print(num, "is a positive number.")
print("This is also always printed.")

-----------------------------------

The output of above code will be below

-----------------------------------
3 is a positive number.
This is always printed.
This is also always printed.
-----------------------------------

Explanation of the code :- Watch how we use num variable 3 and print it as positive, notice the second time positive is not printed because -1 is negative not > 0

The range() Function in Python

Lets use Range function of Python to write below code to print range of numbers between 0 to 4

------------------------------
for i in range(5):
    print(i)

------------------------------

The output of above code will be :

------------------------------

0
1
2
3
4
------------------------------

Now lets use Range function again of Python to see another scenario where 10 is not printed in the range of 5,10 but 5 is printed so it includes first number not the last
------------------------------

for i in range(5,10):
     print(i)

------------------------------

The output of above code is below

------------------------------
5
6
7
8
9

------------------------------

The given end point is never part of the generated sequence; range(10) generates 10 values, the legal indices for items of a sequence of length 10. It is possible to let the range start at another number, or to specify a different increment (even negative; sometimes this is called the ‘step’):

So lets take a scenario of below code :

---------------------------------

for i in range(0,10,3):
    print(i)
---------------------------------


The output of above code is 

------------------------------
0
3
6
9
------------------------------








Wednesday 20 June 2018

ODevCYatra 2018 event in India


If you are in Inda in one of these 7 cities, then do not miss the chance to meet Global Oracle Experts and learn from them in technical sessions about Oracle Cloud, Exadata, Oracle In Memory, Oracle Autonomous Database, Machine Learning, Performance Tuning and much more

ODevCYatra - Yatra or Tour is series of Seven events across Seven major cities in a time period of 9 days


Gurugram Registration http://odevcyatra.in/Gurugram/
Chennai Registration http://odevcyatra.in/chennai/
Pune Registration http://odevcyatra.in/pune/
Mumbai Registration http://odevcyatra.in/mumbai/
Hyderabad Registration http://odevcyatra.in/hyderabad/
Ahmedabad Registration http://odevcyatra.in/ahmedabad/
Bengaluru Registration http://odevcyatra.in/bengaluru/

Learning R for PL/SQL Developers, Part 2

Learning R for PL/SQL Developers, Part 2


Part 2 of a two-part series that presents an easier way to learn R by comparing and contrasting it to PL/SQL


Click here to read and follow the full article 

Learning R for PL/SQL Developers, Part 1

Learning R for PL/SQL Developers, Part 1

Part 1 of a two-part series that presents an easier way to learn R by comparing and contrasting it to PL/SQL.

Click to read and follow the article  here

Tuesday 20 February 2018

Introducing Oracle Database 18c

Oracle Database 18c, the latest generation of the world's most popular database is now available on Oracle Exadata.  It's the first annual release in Oracle's new database software release model, and is a core component of Oracle's recently announced Autonomous Database Cloud.

Oracle Autonomous Database Cloud is the world’s first data management in the cloud to deliver automated patching, upgrades, and tuning, including performing all routine database maintenance tasks while the system is running, without human intervention. This new autonomous database cloud is self-driving, self-securing, and self-repairing, which help to eliminate manual database management and human errors. Autonomous management also minimizes hardware resource consumption and delivers better price performance. Read more on whats new in 18C at https://docs.oracle.com/en/database/oracle/oracle-database/18/whats-new.html

Thursday 8 February 2018

RAC Internals & Machine Learning by Sandesh Rao

AIOUG-NIC Tech Day (RAC Internals & Machine Learning by Sandesh Rao)


Date & Venue: Feb 18th, 2018 @ Fidelity Gurugram

Key Speaker: Sandesh Rao

Speaker's Profile:- 


Sandesh Rao is a VP running the RAC Assurance Team within RAC Development at Oracle Corporation specializing in performance tuning , high availability , disaster recovery and architecting cloud based solutions using the Oracle Stack. With more than 14 years of experience working in the HA space and having worked on several versions of Oracle with different application stacks he is a recognized expert in RAC , Database Internals , PaaS , SaaS and IaaS solutions , solving Big Data related problems . Most of his work involves working with customers in the implementation of public and hybrid cloud projects in the financial , retailing , scientific , insurance , biotech and the tech space. His current position involves running a team that develops best practices for the Oracle Grid Infrastructure 12c including products like RAC (Real Application Clusters) , Storage (ASM , ACFS)More details at http://bit.ly/1UCL46K 

About AIOUG  - All India Oracle Users Group

AIOUG is a non profit organization started by like minded users who think such a community is required in India where the amount of Oracle user base is humongous. The idea of this group is to share what the Oracle users have learned from using Oracle technology over the years with fellow users who have similar interest.

AIOUG provides Oracle technology and database professionals the opportunity to enhance their productivity and influence the quality, usability, and support of Oracle technology. The AIOUG is composed of Oracle professionals committed to helping fellow IT professionals develop solutions to their business challenges.


AIOUG Tech Days:


AIOUG's TechDay with a focus on a specific technology area. It is an event filled with opportunities to learn and network.  AIOUG has been organizing these events across India over the last couple of years.  While our major maga event is Sangam, Techdays are organized as small one day workshops reaching out to the Oracle user community across India.


See you all there on 18th Feb 2018..... Please register, attend and get networked with Oracle Experts..!!