Friday, July 01, 2011

Why HP needs to focus more on software

Why HP needs to focus more on ES and HPSW?

Issac Newton introduced the most fundamental law of universe, law of motion. And Charles Darwin introduced the most fundamental law of Earth, survival of fittest (or natural selection). It is not surprising then that Herbert Spencer found parallels of this in Economics. The matter of truth is - in this competitive world, only the fittest survive. And this holds true for business as much as it does to principles of biology.

The context is Oracle’s decision to withdraw support for Itanium based products from their future software and HP’s consequent decision to move to court against it. The problem in this case is that HP has 140,000 customers that is shares with Oracle to lose, whereas Oracle has very little to lose if anything at all. It may just offer an alternate to customers and customers would not see a reason why they should stick to HP and jeopardize their investment remaining in a state of constant confusion. On the other hand, HP is not in a position to offer an alternate to these customers and hence stand to lose billions of dollars in revenue over years.

Why is HP in a situation like this?

The reason comes from the fact that within HP Enterprise Services is a comparatively new focus area. There is still a lot to be done. HP traditionally was a hardware vendor and moved into software services after acquisitions consolidating its position and readying itself for the top spot. Oracle on the other hand was a software company which moved into hardware with acquisitions. It should not have been too hard to predict what would be Oracle’s intention (or long-term business strategy) to acquire Sun.

Anyway, it is still not too late for HP. HP may learn from this episode for the partnership strategies for future. The matter of fact is no organization forms a partnership with another organization for the benefit of the other. Partnerships are always based on self-interests. Specifically an organization needs to be careful if it wants to have partnership with organizations such as Microsoft, which are known to have only have partnerships which benefited them single-sidedly.

A good lesson learned, and there cannot be a better motivation for HP to evolve it’s own Software Solutions and Enterprise Services to support it’s hardware business. Reliance on other vendors is futile, at least not fool-proof and future-proof.

Back into action

I stayed away from writing for quite some time. Now is the time to get back into action. Hope to come here often and post.

Thursday, August 31, 2006

Send mail from PL/SQL code

Have you ever needed to send mail from within an Oracle PL/SQL procedure or funtion? Some colleagues of mine happened to be in the need of performing this task. With some googling I was able to find some bare bones code that allowed me send plain vanilla mails. But there were many limitations to what could be achieved with them. Having some working code was great, but what lacked there was sophistication. I wanted to have some features that would allow sending a well-formatted professional looking mail. Here is what I came up with. I have two implementations of the code; in form of a procedure and a function. Both implementations can send plain vanilla mail with a minimum number of arguments, but can perform advanced functions when passed more arguments. Here is the code for the procedure.

Create or Replace Procedure RR_SendMail
-- Written by Ranjeet Rain (ranjeet.rain@gmail.com)
-- You found this code at http://expertnotes.blogspot.com/

  (Sender IN VARCHAR2, 
  SendTo IN VARCHAR2, 
  Subject IN VARCHAR2, 
  BodyText IN VARCHAR2, 
  MailHost IN VARCHAR2, 
  SmtpPort IN NUMBER := 25, 
  CCTo IN VARCHAR2 := NULL, 
  MailFormat IN VARCHAR2 := 'text', -- text or text/html
  Priority IN NUMBER := 3 -- 3 = Medium, 5 = Low, 1 = High
  ) 

IS

  v_mail_conn UTL_SMTP.connection;
  v_mailhost VARCHAR2(64) := MailHost;
  n_smtpport VARCHAR2(4) := SmtpPort;
  v_subject VARCHAR2(64) := Subject;
  v_from VARCHAR2(64) := Sender;
  v_to VARCHAR2(64) := SendTo;
  v_CC VARCHAR2(64) := CCTo;
  v_bodytext VARCHAR2(1240) := BodyText;
BEGIN
  v_mail_conn := UTL_SMTP.open_connection(v_mailhost, n_smtpport);
  UTL_SMTP.helo(v_mail_conn, v_mailhost);
  UTL_SMTP.mail(v_mail_conn, v_from);
  UTL_SMTP.rcpt(v_mail_conn, v_to);
  UTL_SMTP.open_data(v_mail_conn);
  utl_smtp.write_data(v_mail_conn,
    'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || utl_tcp.crlf ||
    'From: ' || v_from || utl_tcp.crlf ||
    'To: ' || v_to || utl_tcp.crlf ||
    'CC: ' || v_CC || utl_tcp.crlf ||
    'Subject: ' || v_subject || utl_tcp.crlf ||
    'X-Priority: ' || Priority || utl_tcp.crlf ||
    'Content-Type: ' || MailFormat || utl_tcp.crlf
  );
  utl_smtp.write_data (v_mail_conn, v_bodytext);
  UTL_SMTP.close_data(v_mail_conn);
  UTL_SMTP.quit(v_mail_conn);

EXCEPTION
  WHEN UTL_SMTP.INVALID_OPERATION THEN
    dbms_output.put_line(' Invalid Operation in Mail attempt using UTL_SMTP.');
  WHEN UTL_SMTP.TRANSIENT_ERROR THEN
    dbms_output.put_line(' Temporary e-mail issue - try again'); 
  WHEN UTL_SMTP.PERMANENT_ERROR THEN
    dbms_output.put_line(' Permanent Error Encountered.'); 
  WHEN OTHERS THEN
    dbms_output.put_line(' Unknown Error Occured.'); 
END;

How do you use this code? See some sample usage.
-- Send a plain vanilla mail with just 5 parameters
EXEC RR_sendmail ('ranjeet.rain@gmail.com', 'ranjeet.rain@gmail.com', 'Subject', 
'Body text',  'Mail_host_name') 


-- Send a plain vanilla mail using a host running on Secure SMTP
EXEC RR_sendmail ('ranjeet.rain@gmail.com', 'ranjeet.rain@gmail.com', 'Subject', 
'Body text',  'smtp.gmail.com', 465) 


-- Send a text mail with a CC
EXEC RR_sendmail ('ranjeet.rain@gmail.com', 'ranjeet.rain@gmail.com', 'Subject', 
'Body text',  '130.1.3.1', 25, 'ranjeet.rain@gmail.com') 


-- Send a HTML mail with a CC
EXEC RR_sendmail ('ranjeet.rain@gmail.com', 'ranjeet.rain@gmail.com', 'Subject', 

'Hello World! from <a href="mailto:ranjeet.rain@gmail.com">Ranjeet</a>', 'Mail_host_name', 25, 'ranjeet.rain@gmail.com', 'text/html') -- Send a high priority HTML mail with a CC EXEC RR_sendmail ('ranjeet.rain@gmail.com', 'ranjeet.rain@gmail.com', 'Subject',
'Hello World! from <a href="mailto:ranjeet.rain@gmail.com">Ranjeet</a>', 'Mail_host_name', 25, 'ranjeet.rain@gmail.com', 'text/html', 1)
So, as can be seen, the procedure is rather versatile and capable of sending all kind of text-based mails, very useful for sending small notificationmails. Only thing this procdure does not handle is multimedia mails (mail with MIME content). May be in future, if I write anything like that I'll update the page. Till then, happy mailing!!!


Tuesday, August 01, 2006

Dedicated IT Governance blog

Some time ago I embarked upon my little stint with IT Governance Tool from Mercury Interactive. I'd like to tell you that this is an interesting tool and I am working with it full-time now. I add a thought or two dedicated to the tool here -> http://itgplus.blogspot.com/ Get onto the next channel if you are interested!

Friday, July 29, 2005

Learning to use RCS on Windows

Keywords: UNIX, RCS on Windows, Revision Control System, Tutorial

Yesterday, I was faced with the challenge of integrating RCS with Mercury Change Management. RCS is one of many available version control software on UNIX. As such Mercury ITG has out-of-the-box support for RCS. However, it is critical to understand the functioning of the actual software in order to integrate it with ITG. In order to understand the functioning of RCS, I searched the Net looking for tutorials. I found many, but none of them was specifically written keeping in mind Windows users. So, I decided to post what I did.

I had to post the article on my other site, as I originally created the document in MS Word and you know how difficult it is to get MS Word generated HTML to get accepted anywhere. Following the exact steps as given in the article, you can develop a good understanding of the product. The target of this article is to make you learn the basics of RCS on your own.

The article is available at: http://www13.brinkster.com/ranjeetrain/tutorials/