MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Oracle 11gR2 on Windows 7

with 182 comments

Here are step-by-step instructions for installing Oracle Database 11g Release 2 on Windows 7 (Oracle 12c is here). It’s provided in response to questions posted on my step-by-step instructions for installing Oracle 11gR1 on Windows 7. For reference, I posted the former because it didn’t work without intervention. I hadn’t updated step-by-step instructions because Oracle Database 11g Release 2 has always worked for me when installing on Windows 7.

A number of students and blog readers have mentioned that it didn’t work for them. My guess is that they had configuration issues within the Windows 7 environment. There are some Windows 7 configuration caveats before you perform this installation, and they are:

Windows 7 Configuration Steps

  1. Make sure you have at least 3 GB of memory on your Windows PC, or that you can allocate 4 GB of memory to your virtual machine (the latter typically requires 8 GB of real memory to avoid extensive disk caching of memory).
  2. Install Oracle’s SJDK and run time for Java 6 or 7 on Windows 7 (I installed Java 7). Although either work with the database, you need the Java 6 SDK 32-bit version (at least SJDK 1.6.0_4) for Oracle SQL Developer. This means you need to download the 32-bit version even when you’re installing the 64-bit Oracle Database 11g version. The SQL Developer fix is found in this blog post.
  3. Disable Microsoft’s User Access Controls (UAC). I blogged about a set of Windows 7 gripes, and the second point shows you the screen shots that let you disable UAC on Windows 7.
  4. Configure your C:\Windows\System32\drivers\etc\hosts file. Use lines 1 through 3 when you’re using a DHCP IP address, and lines 1 through 4 when you’re using a static IP address. If you want to set a static IP address, check this old post on how to set a static IP address. Please note that the hostname needs to be lowercase.
4      localhost
::1            localhost      mclaughlinmysql mclaughlinmysql
  1. Create a user account name that doesn’t have a white space, like McLaughlinM in the screen shots, and assign it Administrator privileges.
  2. The Oracle Enterprise Manager (OEM) uses port ranges above 5,000, which according to Microsoft requires that you set MaxUserPort key in the Windows Registry. You can find more details at this Microsoft Support page. Personally, I haven’t found this necessary and after adding it to please somebody without setting it everything ran fine in Windows 7.

Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Value Name MaxUserPort
Value Type DWORD
Value Data 65534
Value Range 5000-65534 (decimal)
Value Default 0x1388 (5000 decimal)
Description This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. After the release of security bulletin MS08-037, the behavior of Windows Server 2003 was changed to more closely match that of Windows Server 2008 and Windows Vista. For more information about Microsoft security bulletin MS08-037

Oracle 11g Release 2 Installation Steps

  1. The Oracle Database 11g Release 2 files are broken down into two zip files on the Oracle site. That means you need to download both files, and then expand them into an installation directory. I called my installation directory C:\OracleInstall, but you can call it whatever works for you. Here’s a screen shot of the directory after expanding both compressed files (done with WinZip 15).
You should notice that the two expanded compressed files put everything into a database directory (or folder). Within the installation folder (C:\OracleInstall\database), you double click on the oui icon to launch (start) the Oracle Universal Installer. It’ll open a command prompt that may dwell on the screen for a few seconds up to maybe fifteen seconds.

  1. It’s a good idea to provide an email address for security updates no matter what. You can uncheck the box if you don’t want updates via Oracle Support Services. Click the Next button to continue.

  1. Most developers want to Create and configure a database. If that’s your desire, leave the default radio button checked. Click the Next button to continue.

  1. Most developers install their test instance on a desktop or laptop. If that’s your desire, leave the default Desktop Class radio button checked. Click the Next button to continue.

  1. These are default settings and generally the easiest to use. I’d suggest you change the Character Set drop down to Unicode. Then, enter a password twice. Oracle requires that you use at least one capital letter and one number in a 6 character or more long password. Click the Next button to continue.

  1. The next screen is a progress bar that checks for prerequisites. You shouldn’t have to do anything here because it automatically advances you to the next dialog screen. This generally takes less than a minute to run but can take two or so. If you’re much beyond 3 minutes there may be a resource problem with your Windows PC or virtual machine.

  1. This shows you all the selected values for the installation. Unless you want to abort the installation, click the Finish button to proceed.

  1. This screen is the main progress bar, and you’ll be here somewhere between 5 and 10 minutes. The downside is that there are some dialogs that will popup during this phase and you need to authorize them, so it’s a bad time to take a break.

  1. The first popup screen requires you to authorize the Java runtime to call home. You should click the Allow Access button to proceed.

  1. When the progress bar starts configuring the instance, failures can occur. The first may occur during the network configuration, which typically happens if you didn’t preconfigure the hosts file. You don’t need to do anything but watch here unless the installer triggers an error.

  1. The following progress bar is launched by the Oracle Database Configuration Assistant. It typically runs without a problem. You don’t need to do anything but watch here unless the installer triggers an error. This takes a few minutes, and unfortunately requires you to stick aroung to again authorize Java.

  1. The second popup screen requires you to authorize the Java runtime to call home. You should click the Allow Access button to proceed.

  1. The third and last popup screen asks you to whether you want to open other scheme. Generally, you should click the OK button to proceed.

  1. The next dialog shows you that the network and database instances are configured. It’s also running the OEM (Oracle Enterprise Manager) installation. You can wait here but it won’t be a long wait.

  1. This is the last dialog and says you’ve installed Oracle Database 11g Release 2 successfully. You can the Close button to complete the installation.

The next step is probably running Oracle Enterprise Manager (OEM). I’ve recently added this post, which arose from a question. It shows you how to run the DB Console.

Also, it’s possible that you could have a problem launching SQL Developer. If so, check how to set the proper JVM for SQL Developer post.

As always, I hope this helps folks.

182 Responses to 'Oracle 11gR2 on Windows 7'

Subscribe to comments with RSS or TrackBack to 'Oracle 11gR2 on Windows 7'.

  1. Open your Windows’ services with the following command from a shell:


    Check if the Oracle listener and databases are running. If they’re running, you can try to check resolution of the Oracle network stack by using the following command (assuming the default orcl is the TNS alias in the tnsnames.ora file):

    tnsping orcl

    Please post the results, so I can tell you what to do next.


    30 Apr 14 at 7:57 pm

  2. opw.msb missing while trying to create the to resolve this issue?


    21 Aug 14 at 6:58 am

  3. i m using win 7 32 bytes.. it is taking too much time around 2 hour after that it got struck at 55%..what to do.. normally how much time it takes during installation

    ashish Sharma

    29 Oct 14 at 12:11 pm

  4. Ashish, I’ve never seen it take more than about 15 minutes on an old laptop. What’s your hardware configuration?


    12 Nov 14 at 10:21 pm

  5. i always got the same warning error no matter what version o windows i use x86 or x64 or version of Oracle x86 or x64. Error starting database control, please execute following command(s).

    1. Set the environment variable ORACLE_UNQNAME to database unique name.
    2. E:\app\product\11.2.0\dbhome_1\bin\emctl.bat
      Start dbconsole

    i followed the steps in your tutorial Reconfigure Oracle EM but nothing, i can’t get the em to work, when i log in using sys in the explorer i got internal error check the logs


    5 Mar 15 at 11:17 am

  6. Sergio, I can’t really help unless you post the error you encountered.


    15 Mar 15 at 6:53 pm

  7. Hello Sir,

    When i was trying to install Oracle 11g on my windows 8 64 bit machine , after selecting system class as desktop class , it won’t be proceeding for further steps, i tried so many times but it strucking there it self, so Please tell me what to do for resolve this issue.


    17 Mar 15 at 1:51 pm

  8. Akram, What version of Windows 8? It possible to fail here when networking can’t resolve. Did you setup the hosts file?


    20 Mar 15 at 12:43 am

  9. Hi,
    I have setup a Windows 7 x64 VM server with Oragle 11g x64. Oracle is working on the VM. I can’t telnet to the Oracle server on any port. I can’t connect to Oracle on port 1521. There is no firewall installed on either the server or the client.

    Also, it has been a long time since this article was posted. I installed Java JRE 8u40. The JRE mentioned in this article are no longer available.

    Any help or guidance you can provide will be appreciated. Oracle has been much easier to use in the past.


    31 Mar 15 at 4:26 pm

  10. MurphyID, Oracle’s not the problem with connecting to the instance. Likewise the version of Java isn’t relevant.

    When you say “telnet“, are you trying to connect from a base operating system where the Oracle client software is installed? What’s your base operating system and how are you trying to connect to it?


    31 Mar 15 at 6:35 pm

  11. I have a Win 7 x64 workstation that I’m trying to connect from. I have a Win 7 x64 VM that I have the Oracle instance running on. On the Win 7 VM I am able to login as SYSTEM in sqlplus without error. When I try to connect to the Oracle server (Win 7 VM) from my workstation I get:

    TNS-12535: TNS:operation timed OUT

    On the Win 7 VM I have also installed the Windows telnet server service which I have set to start automatically on boot. When I try to telnet to the Oracle server from my workstation I get “Could not open connection to the host, on port 23: Connect failed”. I have added my domain account to the telnet group on both my workstation and my Oracle Server (my VM).

    I can ping the Oracle VM with no problem. When I do a tracert to the Oracle VM I only get one hop with no problems noted. As I stated in my previous post there is no firewall or virus scanner on either host.

    At this point I think that Oracle and telnet can’t connect because of some network issue.

    It might also be worth mentioning that the Oracle VM is a Windows Server 2012 R2 Hyper-V VM.

    I’ve been searching Google for telnet connection issues hoping that would fix my Oracle connection problem but nothing I have found fixes either problem.


    1 Apr 15 at 4:08 pm

  12. Murphy,

    You have a base Windows installation, a Windows VM, and you’ve installed some type of service that mimics telnet (bad idea because passwords are sent in clear text). I would suggest that you install the Oracle Client software on the base Windows OS. Then, you launch the SQL*Plus from your base OS and connect to the subordinate Windows OS VM. The concept is similar to how I described connecting from a Mac OS X to a Windows VM in this older post of mine. I hope this helps.



    1 Apr 15 at 7:32 pm

  13. Michael,

    In step 4 of your Windows 7 Configuration Steps you add this line to your host file:

    // mclaughlinmysql

    It means that your computer account belongs to some domain, right? So in my case I don’t have access to any domain, what should I do?

    Thank you,


    4 Apr 15 at 8:12 am

  14. Marcel, The * domain doesn’t exist but you need one to resolve the network, it’s more or less like URI that you use for a non-existent namespaces in XML.


    4 Apr 15 at 1:50 pm

  15. Hi Michael,

    thanks for your soon reply. So for this purpose I need some more machine to install a server there and then to be connected to it with my own PC,right ? If so, then it is hard in my case, ’cause I own just one machine, where the server is based (Oracle XE 11g release 2). I thought its enough for running the database…hm..


    6 Apr 15 at 3:30 am

  16. Michael,

    Let me ask you one more question:

    After installation of Oracle DB XE 11g Release 2 64 bit to my Windows Pro 7 x64, I found out that my XE folder is empty, I do not see any database files (.DBF) inside.

    While looking into XE.bat file I can see following errors:

    Instance created.
    DIM-00019: create service error O/S-Error: (OS 1387)
    Unable to add or remove a member from the local group because this member does not exist.

    Installation is running from the Administrator account with all rights granted.

    Have you ever faced such an error and have Idea what’s actually going on? Many thanks for your attention.



    6 Apr 15 at 4:01 am

  17. Marcel,

    A DIM- error message is raised by the Oracle Service Manager. This particular error typically means you’ve got a prior installation in your Windows’ Registry that interferes with an installation.

    You have two options to fix this type of error. You can manually edit the Windows’ Registry and fix it. Alternatively, you can return to a prior point or re-install your Windows Operating System.

    Hope that helps.


    7 Apr 15 at 12:14 am

  18. Your Windows 7 installation should have at least 3 GB of memory on your Windows PC, or that you can allocate 3 GB of memory to your virtual machine (the latter typically requires 8 GB of real memory to avoid extensive disk caching of memory).


    7 Apr 15 at 12:18 am

  19. Michael,
    Okay thank you, I’ve got it, will try to clean my register properly.

    I asked you yesterday as well if it is possible to be added to windows domain on a single machine? I decided to follow your step-by-step instructions here and to install 11gR2, not XE.


    7 Apr 15 at 4:50 am

  20. Michael,

    my Oracle 11g R2 Database is finally on board and is working really amasing. Many thanks for your nice and helpful blog!

    P.S. I did not add my account to Windows domain. Was installing from Administrator account and put to hosts file just my username and userdomain in addition to localhost of course.

    Have a nice day!



    7 Apr 15 at 6:22 am

  21. Michael,

    I figured out why I couldn’t connect to my Oracle VM from my workstation. It was the firewall on the host server. After I disabled the firewall on the host server I was able to connect.

    Another thing is that I didn’t have to do anything to the hosts file because DNS is working and the names are being resolved.

    I appreciate your time and help. I have enjoyed your website.

    Thank you and have a good day,


    10 Apr 15 at 2:29 am

  22. Hello. Great step by step explanation!

    I’m trying to install Oracle11g Release2 in my laptop, Windows 7 Home edition, 64bit. The installation process is getting stuck after I choose the installation method ‘Desktop Class’. I have installed jdk8u45 for 64 bit. I do not know why it is getting stuck. Please guide me what should be done to install successfully.



    23 Jun 15 at 10:59 pm

  23. i have installed oracle 11g on my os(windows 7 ultimate) 64 bit. during installation i have got an error “Listener is not up or database is not registered with it.Start the listener and register database service and run em configuration assistant again” .I have selected okay on this error and continued installation. i have opened my sql plus with scott user and observed that after 2 or 3 mins my sql plus window automatically closes. can u help me how to resolve this.


    29 Jun 15 at 3:45 am

  24. Ramya, Sorry for the delay in replying. It won’t work with the Windows Home edition because that version doesn’t support the network stack required for the Oracle listener. You need to use Windows 7 Professional or Business Editions.


    1 Jul 15 at 9:47 pm

  25. Sathya, Are you using Windows 7 Home Edition? If so, you need to change to Windows 7 Professional Edition. The Windows 7 Home edition doesn’t support a networking option adequate to support the Oracle listener.


    1 Jul 15 at 9:51 pm

  26. i want this software

    shivam tiwari

    29 Aug 15 at 1:07 am

  27. Shivam, You can download it from Oracle’s web site.


    31 Aug 15 at 10:31 am

  28. Hello.
    I read this article and others in your blog for help me.
    I isntalled oracle server in windows server 2012 R2 and have one errore at the end.
    The listener is ok, and i can work on the system, but the enterprise manager not working.

    At the end of installation display this error:

    Configuration of enterprise manager finish with warning.
    error on begining of database control, run this command:
    1. set the ambient varaible ORACLE_UNQNAME in name of database unico
    2. run …oraclehome\emctl.bat start dbconsole

    I try to config windows ambient variable, hostname…
    I drop emca a and recreate
    i cancel sysman user and recreate with encam

    Then i unistall all, cancel trace, reboot and install with this guide and the result is negative again. The oracle enterprise manager not working.

    Can you helpme?
    The system is cleaned, only windows and oracle are installed.

    note. In the previus test for solutions and drop de repos, and ther create repo and ok, when config repo i have the error. The error are in config repo, working with OC4J_DBConsole


    23 Oct 15 at 9:46 am

  29. JRCepero, Can you qualify the error messages from your log files?


    20 Nov 15 at 11:57 pm

  30. Having issue with oracle 11g database some time like 3 or 4 months one’s the oracle ORCL service stop always, i will try lot of thing like restart the service and editing the lisner.ora file etc to up the database but i did’t get proper response anywhere then finally we have to reinstall the database server. oracle location is D drive and os location is c drive. Running on server 2012 standard.

    Please help me for this thanks.

    Mohammed Mateen

    15 Aug 16 at 4:20 am

  31. Mohammed, Services stopping abruptly on the Windows server is typically an installation problem and linked to incorrectly set user privileges.


    19 Sep 16 at 11:58 am

  32. Mohammed, The ORCL service intermittently fails typically because of a privilege error that affects the network.


    16 Oct 16 at 8:37 pm

Leave a Reply