Allowing Oracle ports in Windows Firewall

If you plan to install Oracle Database XE onto a computer running Windows Firewall, which was first introduced in Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1, and then connect to it from another computer, check that the firewall has not been configured to block communication from the following incoming ports. These ports are the default ports that Oracle Database XE users.

  • 1521: Oracle Database Listener
  • 2030: Oracle Services for Microsoft Transaction Server
  • 8080: Oracle HTTP Transaction Server

To allow these ports follow the instructions below.

  1. Open Control Panel from theStart menu.
  2. Select Windows If Windows Firewall is not available, change View by to Large iconsat the top right of the Control Panel window.
  3. Select Advanced settings in the left column of the Windows Firewall
  4. Select Inbound Rules in the left column of the Windows Firewall with Advanced Security You can prevent outbound traffic by selecting Outbound Rules.
  5. Select New Rule in the right
  6. Select Port in the New Inbound Rule Wizard and then click
  7. Select which protocol this rule will apply to (TCP or UDP), select Specific local ports, type a port number (80), port numbers (80,81), or a range of port numbers (5000-5010) and then click
  8. Select Allow the connection and then click
  9. Select when this rule applies (check all of them for the port to always stay open) and then click
  10. Give this rule a name and then click Finish to add the new

The port is now open and ready to be used.


Windows 8 Consumer Preview

Windows 8 Consumer Preview is now available for download.You can either use a setup or an ISO file to download and install.

Setup file can be downloaded from:

and ISO can be downloaded from:

I’ll try to install it on my virtual machine and will post comments about how was the experience. So stay tuned for more updates.

Install Oracle XE 11g on Windows 7 64-bit

Here’s the Oracle Database 11g Express Edition step-by-step installation on Window 7 64-bit. Please bear in mind Oracle provides only 32-bit version of Oracle XE.

When you download the software from Oracle, you’ll need an account and you’ll need to accept the license agreement.

  1. You’re prompted to accept the license agreement and can’t proceed without doing it.
  1. After accepting the license agreement you can download the software.
  1. Unlike, the Oracle 10g XE MSI file, you’ve downloaded a compressed ( file, and you’ll need to explode the zip file and write it to a directory. When you write it to a directory, it looks like the following and you double click on the setup file.
It’s recommended that you right click on the setupprogram and run it as the Administrator. If you’ve not disabled Microsoft User Access Controls (UAC), I’d do that first.

  1. After launching the setup file, you see the Install Shield wizard screen while the file loads, like this:
After launching the setup file, and loading the MSI file, you see the first dialog box of the installation. Click the Nextbutton to start the installation.

  1. The second dialog box is the license for the installation. Click the I accept the terms in the license agreement. radio button and then the Next button.
  1. The third dialog box lets you accept the default location or provide an override location. If you accept the default location, click the Next button to continue.
  1. The fourth dialog box lets you specify the TNS, MTS, and HTTP Ports. The default values are shown in the following screen shot but I’ve change my TNS port to 1621, which you’ll see later. Click the Next button to continue.
  1. The fifth dialog box lets you enter the password for the SYS and SYSTEM users. You must enter it twice and naturally they must match each other. Click the Next button to continue.
  1. The sixth dialog box lets you see the configuration options you’ve chosen. Note that this installation is using a TNS port of 1621 rather than the default of 1521. Click the Next button to continue.
  1. The seventh dialog box lets you see the progress bar, take a break it can run for two or three minutes. Click the Next button to continue.
  1. The last dialog box lets you see that you’ve installed the product. Click the Finish button to complete the installation.

You’ve now installed Oracle Database 11g Express Edition. You can start the command line by typing sqlplus system/password in command shell or the Get Started option in your Program Menus, as shown below.

You should see this console when you launch Get Started or manually type http://localhost:8080/apex.

Hope this helps folks.


Connecting to Amazon Linux/UNIX EC2 Instances from Windows Using PuTTY

To connect to your Linux/UNIX instance from a Windows machine, use an SSH client. The following instructions explain how to use PuTTY, a free SSH client for Windows machines.

Converting Your Private Key

PuTTY does not natively support the private key format generated by Amazon EC2. Fortunately, PuTTY has a tool called PuTTYgen, which can convert keys to the required PuTTY format.

To convert your private key

  1. Start PuTTYgen (e.g., from the Start menu, click All Programs > PuTTY > PuTTYgen).
  2. Click Load and browse to the location of the private key file that you want to convert (e.g., GSG_Keypair.pem). By default, PuTTYgen displays only files with extension .ppk; you’ll need to change that to display files of all types in order to see your.pem key file. The private key file must end with a newline character or PuTTYgen cannot load it correctly.



  3. Select your .pem key file and click Open.

    PuTTYgen displays the following message.



    When you click OK, PuTTYgen displays a dialog box with information about the key you loaded, such as the public key and the fingerprint. The keys that Amazon EC2 generates are 1024-bit SSH-2 RSA keys.

  4. Click Save private key to save the key in PuTTY’s format.

    PuTTYgen asks if you want to save the key without a passphrase.



  5. Click Yes.
    [Note] Note
    A passphrase on a private key is an extra layer of protection, so even if your private key is discovered, it will not be usable without the passphrase. The downside to using a passphrase is that it makes automation harder because human intervention is needed to log on to an instance, or copy files to an instance. For this exercise, we’re not using a passphrase.
  6. Name the key with the same name you used for the key pair (e.g., GSG_Keypair). PuTTY automatically adds the .ppk file extension.

Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY’s SSH client.

Connecting Using PuTTY SSH

You’ll connect by starting a PuTTY SSH session.

To use SSH to connect

  1. If you’ve launched a public AMI that you have not rebundled, run the ec2-get-console-output command on your local system (not on the instance), and locate the SSH HOST KEY FINGERPRINTS section. For more information, go to ec2-get-console-output in the Amazon Elastic Compute Cloud Command Line Reference.
    PROMPT>  ec2-get-console-output instance_id
     ... ec2: -----BEGIN SSH HOST KEY FINGERPRINTS----- ec2: 2048 bc:89:29:c6:45:4b:b3:e2:c1:41:81:22:cb:3c:77:54 /etc/ssh/ ec2: 2048 fc:8d:0c:eb:0e:a6:4a:6a:61:50:00:c4:d2:51:78:66 /etc/ssh/ ec2: 1024 b5:cd:88:6a:18:7f:83:9d:1f:3b:80:03:10:17:7b:f5 /etc/ssh/ ec2: -----END SSH HOST KEY FINGERPRINTS-----

    Note the fingerprints so that you can compare them to the fingerprints of the instance.

  2. Start PuTTY (e.g., from the Start menu, click All Programs > PuTTY > PuTTY).

    A dialog box opens with a Category menu on the left side. On the right side, the basic options for your PuTTY session are displayed.

  3. In the Host Name field, enter the public DNS name of your instance (available through the AWS Management Console or theec2-describe-instances command). You can optionally prefix the DNS name with [email protected] to automatically log in with superuser privileges when the session opens.



  4. In the Category menu, under Connection, click SSH, and then Auth.

    The options controlling SSH authentication are displayed.

  5. Click Browse and navigate to the PuTTY private key file you generated in the preceding section.



  6. Click Open.

    An SSH session window opens and PuTTY displays a security alert asking if you trust the host you’re connecting to.

    [Important] Important
    If you’ve launched a public AMI, verify that the fingerprint in the security alert matches the fingerprint from the output of the ec2-get-console-output command. If it doesn’t, someone might be attempting a “man-in-the-middle” attack.
  7. Click Yes.
  8. In the SSH session window, log in as root (or ec2-user) if you didn’t as part of starting the SSH session.
    [Note] Note
    Some AMIs let you log in as root, but some require you to log in with the username ec2-user. For log in information for your chosen AMI, contact your AMI provider directly or go to Amazon Machine Images(AMIs) page, then locate and click your AMI on the list.
    If you specified a passphrase when you converted your private key to PuTTY's format, you must provide that passphrase when you log in to the instance.


Map Windows Live SkyDrive to access via Windows Explorer

Windows Live SkyDrive provides 25GB of space which you can use to backup your stuff. But using Browser is sometimes not desirable. But you can access your Windows Live SkyDrive storage in Windows Explorer.

1. Visit SkyDrive ( and login with your Live ID.

2. If you have not used SkyDrive before click on the My Documents folder.

My Documents in Windows Live Skydrive

3. Now look at the address bar. You should find your unique ID there in the URL ( – see the screenshot below; it’s in the greyed out area and is unique to you). Copy this ID to the clipboard, as we’ll need it shortly. Use the back button in IE if you don’t see the ID right away.
Unique ID in address bar

4. Now, open your Computer in Windows Explorer (either go Start menu / Computer, or just press WindowsKey +Eto go straight there), and you’ll see “Map Network Drive in the menu. Click that.

Which Network woudl you like to map?

5. In the new dialog box that choose your drive letter using the dropdown. I will be choosing S: for mine (Sky Drive). Now in the Folder field (just below the Drive dropdown) type, \\[email protected]\your_skydrive_id\^2Documents (replacing “your_skydrive_id” with the ID you copied in Step 1). Press Finish  and wait a little while, and you’ll get a logon box… enter your Windows Live ID and press OK.

Connect to

6. You’ll now have mapped your Network Drive, and might notice that you have your Unique ID included in the name. So for security, just right mouse click on the name within Windows Explorer, choose rename from the drop down and call it anything you want.

That’s it! You can now use your Windows Live Skydrive just as your local drive 🙂

How do I: check if DLL has been loaded

Few days back I developed an ISAPI filter and when I installed on IIS server and tried to test it was not running. To troubleshoot I thought how would I know that DLL has been loaded by the IIS server successfully and there is no error. If you used Windows Task Manager it does not tell you which DLL has been loaded. There is a cool command line utility to check this. That is tasklist. According to its description:

“This tool displays a list of currently running processes on either a local or remote machine.”

To check whether a DLL has been loaded or not use the following command.

> tasklist /m yourdll*

The /m switch lists all tasks currently using the given exe/dll name. It also support wildcards. If the module name is not specified all loaded modules are displayed.

So, I used this command to check if my DLL has been loaded. It’s a really handy command to check some other stuff as well. Try to use /? to get complete list of switches and their description.

Windows 8 installation error: HAL_INITIALIZATION_FAILED

I downloaded the Windows 8 Developer Preview from and tried to install on Virtual PC, but got the following error.

Your PC ran in to a problem that it couldn’t handle,and now it needs to restart.

You can search for the error online: HAL_INITIALIZATION_FAILED

I also tried VMWare Player, but to no avail.

To fix this problem you need to use VirtualBox or VMWare Workstation 8.

Try these and you will be up and running Windows 8 Developer Preview 🙂

[Note: This post is about Windows Developer Preview. Microsoft has now launched Windows 8 Consumer Preview. You can see my post on it at]

What kind of IIS documentation is this from Microsoft?

IIS documentation blank template
IIS documentation blank template

Today I was searching online MSDN library for IIS ISAPI filter development, and you know what? I came across a MSDN page which was a bare template and didn’t have any content. Look at the snapshot taken on August 15, 2011 🙂

If page is still not updated then you can visit now:

Xdebug in WebMatrix

Xdebug is a very popular PHP extension that helps with debugging and profiling of PHP scripts by providing a lot of valuable debug information. Microsoft WebMatrix is a development tool for building web applications. When WebMatrix is used to build or modify a PHP-based web application the debugging tasks can be greatly simplified if Xdebug extension is used. This post explains how to install and use Xdebug extension with WebMatrix.

Step 1: Enable PHP in WebMatrix from the site “Settings” page:

Note that if you installed any of the PHP applications from the Application Gallery then PHP will be automatically enabled.

Step 2: Download the appropriate build of Xdebug extension from downloads page. If your site uses PHP 5.2 then download “5.2 VC6 Non-thread safe (32 bit)”. If your site uses PHP 5.3 then download “5.3 VC9 Non-thread safe (32 bit)”. Use 32 bit build even if your Windows OS is 64 bit.

Step 3: Install the extension by copying the downloaded file to the following locations:

  • For PHP 5.2 on Windows 64 bit:
    C:\Program Files (x86)\IIS Express\PHP\v5.2\ext\
  • For PHP 5.2 on Windows 32 bit:
    C:\Program Files\IIS Express\PHP\v5.2\ext\
  • For PHP 5.3 on Windows 64 bit:
    C:\Program Files (x86)\IIS Express\PHP\v5.3\ext\
  • For PHP 5.3 on Windows 32 bit:
    C:\Program Files\IIS Express\PHP\v5.3\ext\

Step 4: Open the php.ini file located in the PHP installation folder, e.g.
C:\Program Files\IIS Express\PHP\v5.2\php.ini and append the following at the end (make sure that the absolute path is correct for your version of PHP and Windows.):

zend_extension = C:\Program Files\iis express\PHP\v5.2\ext\php_xdebug-2.1.0-5.2-vc6-nts.dll

Step 5: Configure PHP to display errors by changing these PHP settings in php.ini file:

display_errors = On
error_reporting = E_ALL & ~E_NOTICE

Step 6: Test that extension is enabled and works by either calling a phpinfo() function from a script or by running a buggy script:

The Xdebug extension provides a lot of useful features that help with debugging of PHP applications. You can learn more about them from the Xdebug documentation. For example you can use it to profile a PHP application. Just change the php.ini file as shown below and then make a request to a PHP script:

zend_extension = C:\Program Files\iis express\PHP\v5.2\ext\php_xdebug-2.1.0-5.2-vc6-nts.dll
xdebug.profiler_enable = On
xdebug.profiler_output_dir = C:\Windows\temp

The profile log will be saved into the specified directory and will have a name cachegrind.out.* Use WinCacheGrind to open and analyze it: