Saturday, July 26, 2008

Traveler IQ




This Traveler IQ has been calculated by the Web's Original Travel Blog, TravelPod.com from comparing this person's geographical knowledge to millions of travelers.

Thursday, July 24, 2008

Easy Clone / Duplicate Oracle 10G database

Today I had a task to clone or duplicate a Oracle 10g database. Being a novice, I took to google and looked for answers. After some research came with a few ways:
  1. Using EM :: Maintenance :: Deployments :: Clone Database option : The problem with it is its needs "An open database in ARCHIVELOG mode" which I dont have. Hence it requires a restart as mentioned in here. Hence I left this option here itself.
  2. Duplicate database using RMAN : A nice article about it is available in here. I tried it and then spend another 2-3 hours to connect to the newly created database. Thereafter I left this method to.
  3. The command line way : Its all using sqlplus and is pretty technical. Details are available here. It works but looked for an easy alternative.
  4. The DBCA way : This I found to be the easiest and the fastest option but sadly it not available in the top results of google. Looks like its one of the least used way to duplicate an Oracle DB but its the best one. To promote it I write this post.

Here's how its done:
  1. Start the Database Configuration Assistant (DBCA). Found at All Programs :: Oracle - OracleDb10g_home1 :: Configuration and Migration Tools :: Database Configuration Assistant. The same can be invoked by typing in "dbca" at the command prompt.
  2. On the "Welcome" screen click the "Next" button.
  3. On the "Operations" screen select the "Manage Templates" option and click the "Next" button.
  4. On the "Template Management" screen select the "Create a database template" option and select the "From and existing database (structure as well as data)" sub-option then click the "Next" button.
  5. On the "Source database" screen select the relevant database instance and click the "Next" button.
  6. On the "Template properties" screen enter a suitable name and description for the template, confirm the location for the template files and click the "Next" button.
  7. On the "Location of database related files" screen choose either to maintain the file locations or to convert to OFA structure (recommended) and click the "Finish" button.
  8. On the "Confirmation" screen click the "OK" button.
  9. Wait while the Database Configuration Assistant progress screen gathers information about the source database, backs up the database and creates the template.
  10. Depending upon the size of the database it will take some time. For my 8 Gig database, it took like 8 mins. Now we have a template created and we will use to create our new database.
  11. Click on "Next Operation".
  12. Select "Create a Database" option and click "Next".
  13. In "Select a template from the following list to create a database" - select the template name which you provided in Step 6 and click "Next".
  14. Provide the new Service Name for the new database. The SID will automatically be set to the service name entered above. Click "Next".
  15. Let the "Configure the Database with Enterprise Manager" remain checked and "Use Database Control for Database Management" remain checked. Click "Next".
  16. Provide the sys password and click "Next".
  17. Let the "File System" option remain checked unless you want to use ASM or raw for your new database.
  18. Let the "Use Database File Locations from Template remain checked. This is important. Click "Next".
  19. Let the default values for Flash Recover Area remain as they are and click "Next".
  20. Let the "No Scripts to run" remain checked an click "Next".
  21. You can keep the default values for Memory and Sizing over here or change it as per your need and Click "Next".
  22. You are now at the final screen wherein you can all your configurations and verify that they are correct. Clicking next, DBCA will do all your job and your DB should be up and running in next 15-20 mins.
  23. Finally before logging in to the new DB using EM, check the tnsnames.ora and see an entry is created for the new database else add one. You can add a new listenere too in you listener.ora if you want and the do a "lsnrctl reload" to reload the listeners.
  24. Finally do a tnsping on your new database to check all's fine.
  25. Log in using EM and you should have you DB ready in Open mode.
  26. Note all user accounts besides the system account are locked and expired so you need to unlock them to allow users to connect to the new DB.
The whole process took some 30-35 mins and it was all Gui and no scripts or errors. Seem to be the best way out to duplicate an Oracle 10g database :)

Saturday, July 19, 2008

A picture can tell it all

Found something interesting which I believe is the reality for most of us:




Its very true, most of us dont know our true potential and are in our comfort zones. Getting out of it (due to some reasons) makes us use all our skills. And our aims are something which we can't achieve as we are now but we need something more to achieve them.

Best War Movies

I am always fascinated by war movies. In the last year of my college, I started watched those and ended up burning a few dozen CDs. The CDs are now gone but now I have a broadband Wimax connection so why not download it.

Looked around for a list of good movies and got them at http://www.moviefone.com/insidemovies/2007/03/07/best-war-movies/.

In order it is:
  1. Apocalypse Now
  2. Platoon
  3. Saving Private Ryan
  4. Schindler's List
  5. Full Metal Jacket
  6. Das Boot
  7. Paths of Glory
  8. The Great Escape
  9. Lawrence of Arabia
  10. Braveheart
  11. The Deer Hunter
  12. The Bridge on River Kwai
  13. Glory
  14. The Longest Day
  15. Three Kings
  16. Letters from Iwo Jima
  17. All Quiet on the Western Front
  18. Patton
  19. Downfall
  20. M*A*S*H
  21. The African Queen
  22. The Thin Red Line
  23. Stalag 17
  24. Sergeant York
  25. The Pianist

Monday, July 14, 2008

Minimize App to System Tray

Recently I made a Tata Indicom web dialer. The problem I faced was that Tata Indicom (my ISP) logs me out if I dont use internet for a few hours. When back I need re login and then my internet will be up. I wished to automate it so I used the 'Axshdocvw' way to set the user name and password whenever I reached the login page. That done, the app was supposed to run as a service. I did not want to code that much so just ran the app. The problem was that it stayed in my task bar and looked odd. So I wanted it to minimize to system tray and here's how its done:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MinimizeToTray
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

// make the icon invisible to start with
notifyIcon1.Visible = false;
}

private void Form1_Resize(object sender, EventArgs e)
{
notifyIcon1.BalloonTipTitle = "Minimize to Tray";
notifyIcon1.BalloonTipText = "You have successfully minimized your App to tray.";

if (FormWindowState.Minimized == this.WindowState)
{
notifyIcon1.Visible = true;
notifyIcon1.ShowBalloonTip(500);
this.Hide();
}
else if (FormWindowState.Normal == this.WindowState)
{
notifyIcon1.Visible = false;
}

}

private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
this.WindowState = FormWindowState.Normal;

}

private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
// Create Menu here
}
}
}
}

Tuesday, July 8, 2008

Kenya singing for India

Nice rendition of the India's National Anthem by Kenyans:

Thursday, July 3, 2008

Rapidshare says bye bye to captcha

Rapidshare.com, the 12th most popular site [via Alexa], and the most most popular file hosting site on the planet has finally,for the goodness of the eyes of common being, bid farewell to its notorious CAPTCHA.

This news is big owing to the status of rapidshare. They say rapidshare is a goldmine if you learn to use it wisely and efficiently. Many people prefer it over torrents and p2p apps like Limewire. Other benefit will be that we wont need magnifying lenses to spot the cat(etc) hidden somewhere in the CAPTCHA. I really had some tough time cracking the image code.
There is more.

Free users can now upload or download files upto 200 Mb in size. Though, they have limited the download speed for free users to 500 kilo bits/sec to compensate for the automated downloading that will result from removal of CAPTCHA. But again, they have eliminated waiting period between two downloads for free users.Though you will still have to see a 25 sec refractory period prior to every download if you are a free user.

Premium users can now download upto 10 GB/day[w.e.f. 26 June,2008]. If they are unable to use their allowed usage, their remaining usage is carried forward to the next day, the maximum accumulation limit being 50 Gbs.

Wednesday, July 2, 2008

After the good news : here's the bad news

So India lost its trillion dollar status today. Thanks to the falling rupee.

Indian economy loses trillion dollar status

Tuesday, July 1, 2008

Barcode

Got a new identification for myself and here it is: