Saturday, October 30, 2010

Email Protocols: IMAP, POP3, SMTP and HTTP

Email Protocols: IMAP, POP3, SMTP and HTTP

A protocol is about a standard method used at each end of a communication channel, in order to properly transmit information. In order to deal with your email you must use a mail client to access a mail server. The mail client and mail server can exchange information with each other using a variety of protocols.
IMAP Protocol:
IMAP (Internet Message Access Protocol) – Is a standard protocol for accessing e-mail from your local server. IMAP is a client/server protocol in which e-mail is received and held for you by your Internet server. As this requires only a small data transfer this works well even over a slow connection such as a modem. Only if you request to read a specific email message will it be downloaded from the server. You can also create and manipulate folders or mailboxes on the server, delete messages etc.
SMTP Protocol:
The SMTP (Simple Mail Transfer Protocol) protocol is used by the Mail Transfer Agent (MTA) to deliver your eMail to the recipient's mail server. The SMTP protocol can only be used to send emails, not to receive them. Depending on your network / ISP settings, you may only be able to use the SMTP protocol under certain conditions .
POP3 Protocol:
The POP (Post Office Protocol 3) protocol provides a simple, standardized way for users to access mailboxes and download messages to their computers.

When using the POP protocol all your eMail messages will be downloaded from the mail server to your local computer. You can choose to leave copies of your eMails on the server as well. The advantage is that once your messages are downloaded you can cut the internet connection and read your eMail at your leisure without incuring further communication costs. On the other hand you might have transferred a lot of message (including spam or viruses) in which you are not at all interested at this point.
HTTP Protocol:
The HTTP protocol is not a protocol dedicated for email communications, but it can be used for accessing your mailbox. Also called web based email, this protocol can be used to compose or retrieve emails from an your account. Hotmail is a good example of using HTTP as an email protocol.

Error : Shared Memory realm while opening db

Issue of Shared Memory realm faced while starting the db 11.1.0.7  installed on HP-UX 11.31
I changed the OS kernel parameter as hostname length is =8 characters so I changed the
expanded_node_host_names=1 so that hostname length will be increased from 8 -64 characters.
And did sytem restart. But while opening the database I got Shared memory realm error.
SQL> startup
Assertion failed: uname(&name) >= 0, file snlrn.c, line 395
ORA-03113: end-of-file on communication channel
SQL> shutdown immediate
ORA-01033: ORACLE initialization or shutdown in progress
SQL> startup
ORA-27100: shared memory realm already exists
HPUX-ia64 Error: 17: File exists
The uname_eoverflow kernel parameter is by default set to 1 and when I changed the expanded_node_host_names value to 1 we started facing the above issue.
If anyone takes a first look on this error, it seems that there is still shared memory occupied by previous Oracle Sessions and try to clean it up using ipcs and ipcrm commands.
uname_eoverflow: The setting of this boolean parameter determines what happens when uname gets a long hostname (and it isn't set up for long hostnames). If this kernel tunable is true (1), then generate an error EOVERFLOW; if the tunable is false (0), then silently truncate the host name before returning it in the uname system call.
expanded_node_host_names: The setting of this boolean parameter affects whether long host names (and node names) are supported. If this tunable is set to true (1), then the host and node names can be up to 255 characters (actually, 255 bytes); if set to false (0), then the limits are 8 bytes and 64 bytes for the host and node names respectively. The actual current host name (or node name) is unaffected, no matter the setting.
If both parameter values will be 1 then they will conflict each other and it will create issue to resolve HOSTNAME, which in our case was happening.
So afterwards when we changed the parameter value of uname_eoverflow to 0, above issue resolved and our database and application started smoothly.

Create Tar file and unpacking of Tar File.

Create TAR File

$ tar -cvf archivename.tar name_of_file
     v - provides a descriptuion of archived contents (optional)
     c - to create an archive
     f -  to specify a name for the archive
     archivename.tar -- name given to the archive
     name_of_file    -- name of folder or directory to be archived.
e.g tar -cvf tech_st.tar tech_st

Unpacking the TAR File

 $ tar -xvf archivename.tar
      v - provides the contents of the unpacked files
      x - to extract files
      f - designate the archive containing the files.
      arhivename.tar - the name of the archive to retrieve.

  e.g $ tar -xvf tech_st.tar

Create zipped tar ball

     # tar -cvf temp.tar tmp
     # /usr/contrb/bin/gzip temp.tar
     This creates temp.tar.gz
      You can then copy to any directory you want.

 To Uncompress zipped tar ball
     # cd /directory_you_want
     # /usr/contrib/bin/gunzip temp.tar.gz
     # tar -xvf temp.tar
     # ll tmp