Sunday, November 28, 2010

Hung Oracle Processes in the HP-UX while applying CPU

I have applied interim patches to the Oracle installations for Linux, Windows and Solaris, but only in the HP-UX, I have encountered the problem of hung processes. May be I am just lucky that I didn't encounter the error in other operating systems.

I was applying July CPU patch on 10.2.0.4 installation, when running the opatch napply, I came across the following error:

The following make actions have failed :
Re-link fails on target "client_sharedlib".
Re-link fails on target "client_sharedlib".

Also there were some warnings about the busy text files. 

In this case, check the hung oracle process through this command and kill them:

prod:oracle:xxx ) ps -fu oracle|grep sqlplus
 oracle 13694  4346  0  Aug 31  pts/3     0:00 sqlplus e4@prod

prod:oracle:xxx ) kill -9 13694

Re run the opatch, and it will go like a breeze, hopefully.

Wednesday, November 24, 2010

Physical Disk, Cell Disk, Grid Disk, and ASM Disk in Exadata

Exadata is the Ferrari of the technology world. It’s considered the technology for the select few, but everyone dreams about it. There is very little information available on the Internet right now about the architecture and the administration of Exadata, though it’s a huge subject in itself, which demand numerous high quality books, dedicated blogs, websites and special interest groups.

This blog post just mentions some of very important components of Exadata Storage Server, which are physical disks, cell disks, grid disks and ASM disks and their correspondence.

The Exadata Storage Server contains 12 physical disks.

There is one to one relationship between a physical disk and the cell disk. One physical disk corresponds to a single cell disk.

Then a Grid disk comprises of many cell disks.

And a Grid disk corresponds to one ASM disk.

An ASM diskgroup comprises of many ASM disks.

On the Exadata Storage Server, We can use cellcli command line utility in Exadata to see the information about physical disks, cell disks, grid disks and the cell.

The cellcli utility works from the root, celladmin and cellmonitor (read-only) users. The best practice is actually to run it from the last two less-privileged users, and not from the root user.


Now let’s have look at some of the disk management commands using cellcli utility.

1[root@mycell-net0 ~]# cellcli
2CellCLI: Release 11.2.1.3.1 - Production on Fri Oct 29 07:47:26 GMT 2010
3 
4Copyright (c) 2007, 2009, Oracle. All rights reserved.
5Cell Efficiency Ratio: 140

Just to give you an idea about what cellcli has on offer, look at the output of the help command:
01CellCLI> help
02 
03HELP [topic]
04Available Topics:
05ALTER
06ALTER ALERTHISTORY
07ALTER CELL
08ALTER CELLDISK
09ALTER GRIDDISK
10ALTER IORMPLAN
11ALTER LUN
12ALTER THRESHOLD
13ASSIGN KEY
14CALIBRATE
15CREATE
16CREATE CELL
17CREATE CELLDISK
18CREATE FLASHCACHE
19CREATE GRIDDISK
20CREATE KEY
21CREATE THRESHOLD
22DESCRIBE
23DROP
24DROP ALERTHISTORY
25DROP CELL
26DROP CELLDISK
27DROP FLASHCACHE
28DROP GRIDDISK
29DROP THRESHOLD
30EXPORT CELLDISK
31IMPORT CELLDISK
32LIST
33LIST ACTIVEREQUEST
34LIST ALERTDEFINITION
35LIST ALERTHISTORY
36LIST CELL
37LIST CELLDISK
38LIST FLASHCACHE
39LIST FLASHCACHECONTENT
40LIST GRIDDISK
41LIST IORMPLAN
42LIST KEY
43LIST LUN
44LIST METRICCURRENT
45LIST METRICDEFINITION
46LIST METRICHISTORY
47LIST PHYSICALDISK
48LIST THRESHOLD
49SET
50SPOOL
51START

Let’s see the output of some of the commands listed above:

01CellCLI> list physicaldisk detail
02 
03name:                   [5:3:2:0]
04diskType:               FlashDisk
05id:                     00000200000000000000
06luns:                   1_2
07makeModel:              "MARVELL SD88SA02"
08physicalFirmware:       D20R
09physicalInsertTime:     2010-10-04T21:05:46+00:00
10physicalInterface:      sas
11physicalSerial:         0000000000000000000
12physicalSize:           22.8880615234375G
13slotNumber:             "PCI Slot: 1; FDOM: 2"
14status:                 normal
15
01CellCLI> list cell detail
02 
03name:                   mycellnet0
04bmcType:                IPMI
05cellVersion:            OSS_11.2.0.1.0_LINUX.X64_100818.1
06cpuCount:               16
07fanCount:               12/12
08fanStatus:              normal
09id:                     0000X00000
10interconnectCount:      3
11interconnect1:          bond0
12iormBoost:              0.0
13ipaddress1:
14kernelVersion:          2.6.18-194.3.1.0.2.el5
15makeModel:              SUN MICROSYSTEMS SUN FIRE X4275 SERVER SAS
16metricHistoryDays:      7
17notificationMethod:     snmp
18notificationPolicy:     critical,warning,clear
19offloadEfficiency:      47,485.1
20powerCount:             2/2
21powerStatus:            normal
22smtpFrom:
23smtpFromAddr:
24smtpPort:
25smtpServer:
26smtpToAddr:
27smtpUseSSL:
28snmpSubscriber:
29status:                 online
30temperatureReading:     27.0
31temperatureStatus:      normal
32upTime:                 16 days, 14:01
33cellsrvStatus:          running
34msStatus:               running
35rsStatus:               running
36
01CellCLI> list celldisk detail
02 
03name:                   FD_15_mycellnet0
04comment:
05creationTime:           2010-07-14T02:05:06+00:00
06deviceName:             /dev/sdy
07devicePartition:        /dev/sdy
08diskType:               FlashDisk
09errorCount:             0
10freeSpace:              0
11id:                     00000000-0000-0000-0000-000000000000
12interleaving:           none
13lun:                    5_3
14size:                   22.875G
15status:                 normal
16
01CellCLI> list griddisk detail
02 
03name:                   CD_15_mycellnet0
04availableTo:
05cellDisk:               CD_15_mycellnet0
06comment:
07creationTime:           2010-07-14T02:12:55+00:00
08diskType:               FlashDisk
09errorCount:             0
10id:                     00000000-0000-000-0000-000000000000
11offset:                 528.734375G
12size:                   29.125G
13status:                 active

In the future posts, I will be touching the administration of celldisks, as how to perform operations like (import/export/create/drop/alter) on the celldisks.

The post was originally published by me at Pythian's Blog.

Tuesday, November 23, 2010

Also Blogging at Pythian

I am also blogging at the Pythian's blog and you can access my posts here.

Monday, November 22, 2010

Restrict FTP User to a Directory in Solaris

I am using Solaris 10 on SPARC.

SunOS ddw 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise

I have put some text files in a directory '/u01/network'

I want to create a ftp user which can just read the files in the network directory. The ftp user shouldn't be able to navigate or see any other directory outside of the network directory.

The user ftp_usr is the owner of /u01/network directory.

Following are settings in /etc/passwd:

ftp_user:x:3008:1::/u01/network:/usr/bin/ftp-only

The settings in the /etc/ftpd/ftpaccess:

allow-retrieve relative class=realusers /u01/network

restricted-uid ftp_user

Also set the permissions on the /u01 directory as 755.

And you are all set to go.

Saturday, November 20, 2010

Oracle Certifications in Pakistan

One of the most popular and in-demand software in the Pakistan is the Oracle database, Oracle development Tools, E-Business System, and lately the Oracle middleware products.

The quantity of Oracle professionals is increasing in Pakistan steadily. Quality is bit compromising, because many of the Oracle aspirants are confused as how to pursue their career. Given the wide range of Oracle technologies and limited training opportunities and very competitive small market, it becomes hard and frustrating for the fresh graduates to the beginner professionals to make the career decisions within Oracle technologies.

Students, fresh graduates and budding professionals think that getting certification is the surefire guaranteed way to get the job. That is not true. Certification looks good on your resume and it helps increasing your chances, but it is not a token for getting the job. This is one of the first misconception which needs to be addressed.

Secondly, don't make the decision just by fluke about getting certification. Becoming a DBA or Developer, or E-Business Consultant, or Middleware Professional is very important one and would go with your career. You should first determine your aptitude, market situation, the plus and negative attached to these pathways and then go about it. Discuss it with the existing developers, DBAs and other professionals. Ask from yourself and be honest, and only then choose the path. You must not try to be many things at a time. You can either be a full time DBA or a full time developer.

Now how to prepare for the certification. You need just three things to get prepared:

Reading Documentation from otn.oracle.com about the product in which you are getting certified.
Downloading that product from the otn.oracle.com and practice like there is no tomorrow.
Attending a course w.r.t that product from Oracle University

There is no need to waste your money on the institutes offering you courses for certifications just round the corner in flashy banners or advertisements on your local cable channel. They will waste your time and money and will pose like Oracle is something very complex and hard thing to learn. That is simply not true. Yes, there is no short cut, but it's a fun and rewarding field.

So, read the documentation again and again, practice what you read. Get the content of your certification and then again read about them and practice it. Visit the forums and the blogs. Ask questions, give answers, play around with the software and take it easy. And yes, Please avoid the dumps and other illegal things, because they will not get you anywhere in your career.

Wednesday, November 17, 2010

Oracle DBA in Urdu

Yesterday, I concluded yet another of my courses in Urdu regarding Oracle Database Administration. It was a free course at the local study center of AIOU, and ran for 5 working days, 4 hours a day. The medium of course was Urdu language, and it went so smoothly.

The course covered the Oracle 11.1 on OEL 5, and encompassed installation, backup/recovery, monitoring and architecture. The course was intended for 8 people but in a pleasant surprise, more than 15 people turned up, and we had to switch to a bigger room.

Given the scarce resources, it was a huge success I reckon. I propped my laptop high on the rostrum, as there was no projector or multimedia and the attendees circled it. Their enthusiasm and interest for the Oracle was awe-inspiring and I myself learned a lot.

Looking forward conducting a similar course yet again due to numerous requests after Eid holidays.

Saturday, November 13, 2010

Oracle Exadata V2 Documentation

Well, it's not yet publicly available, but if you are one of those lucky rare ones to have access to the Exadata, then you can find it at /usr/share/doc/oracle/Exadata, as Marc Fielding of Pythian graciously points out here. And yes he also has found that the documentation for the Exadata V1 is out for the public.

Friday, November 12, 2010

Why HP-UX doesn't have df -h?

I was doing patching for a client and was at my first encounter with the HP-UX system. The patching failed due to the space shortage at the mount point. I tried to check the space through df -h and voila there was no such command.......

df -h is so natural with the Solaris and Linux, but why there is isn't so in the HP-UX and one has to calculate the KBs to get the GBs and TBs?

Please enlighten me if the latest versions of the HP-UX have that functionality.