5 Replies Latest reply: Mar 3, 2013 12:26 PM by Mark Malakanov (user11181920) RSS

    Access Windows Oracle database from Linux in VM

    user12050217
      Hello,

      I am having below setup :

      - Oracle database ORCL 11.2.0.1 on Windows 7 64 bit is running fine.
      - Installed Oracle Virtualbox on the same machine
      - Created Virtual Machine Ubuntu 10.04 LTS 64 bit in above Virtualbox software.

      Now, I want to access ORCL database from Ubuntu. What should I install/configure for it? Is it possible?

      Thanks.
        • 1. Re: Access Windows Oracle database from Linux in VM
          EdStevens
          user12050217 wrote:
          Hello,

          I am having below setup :

          - Oracle database ORCL 11.2.0.1 on Windows 7 64 bit is running fine.
          - Installed Oracle Virtualbox on the same machine
          - Created Virtual Machine Ubuntu 10.04 LTS 64 bit in above Virtualbox software.

          Now, I want to access ORCL database from Ubuntu. What should I install/configure for it? Is it possible?

          Thanks.
          Other than the fact that oracle does not certify any of their product to run on Ubuntu, you'd install the same thing as you would if the vm were a physical machine ... the Oracle client software. And you would have to configure the $ORACLE_HOME/network/admin/tnsnames.ora and the /etc/hosts files. Then, again apart from the issue with ubuntu itself, you'll have to deal with the fact that your Windows host most likely is running with a DHCP-assigned IP address. That's like you getting a new telephone number every day, but still expecting people to be able to call you.


          What 'edition' of Win 7? Please note that Oracle does not certify their products to run on any 'home' editions.

          Most people would set it up just the opposite of what you did ... install a certified version of linux (like Oracle Linux) under Vbox, then install an oracle client on the host Windows system.

          To get a general understanding of what is needed to get one system to connect to an Oracle database on another system ...
          read: [url http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/] Help! I can’t connect to my database
          read: [url http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/] Help! I can’t connect to my database (part duex) 
          • 2. Re: Access Windows Oracle database from Linux in VM
            mseberg
            Hello;

            Ed has answered your question very well. VM makes a nice personal lab for Oracle. If your DHCP assigns the same IP address you can add entries to the host file like this :
            # Do not remove the following line, or various programs 
            # that require network functionality will fail. 
            127.0.0.1 localhost.localdomain localhost 
            192.168.0.21 primary.localdomain primary 
            #::1 localhost6.localdomain6 localhost6 
            So "192.168.0.21 primary.localdomain primary" is the key. If you add entries for both "servers" at both ends you should be able to setup the listener so you can connect.

            Best Regards

            mseberg
            • 3. Re: Access Windows Oracle database from Linux in VM
              sb92075
              user12050217 wrote:
              Hello,

              I am having below setup :

              - Oracle database ORCL 11.2.0.1 on Windows 7 64 bit is running fine.
              - Installed Oracle Virtualbox on the same machine
              - Created Virtual Machine Ubuntu 10.04 LTS 64 bit in above Virtualbox software.

              Now, I want to access ORCL database from Ubuntu. What should I install/configure for it? Is it possible?

              Thanks.
              Oracle has no inherent networking capability.
              Oracle depends upon OS for any & all networking capability.
              If both OS are properly configured, then Oracle will be able to inter-operate between the two system.
              The problem & solution are external to Oracle.
              • 4. Re: Access Windows Oracle database from Linux in VM
                EdStevens
                user12050217 wrote:
                Hello,

                I am having below setup :

                - Oracle database ORCL 11.2.0.1 on Windows 7 64 bit is running fine.
                - Installed Oracle Virtualbox on the same machine
                - Created Virtual Machine Ubuntu 10.04 LTS 64 bit in above Virtualbox software.

                Now, I want to access ORCL database from Ubuntu. What should I install/configure for it? Is it possible?

                Thanks.
                Another resource you might find helpful: http://edstevensdba.wordpress.com/category/personal-test-systems/
                • 5. Re: Access Windows Oracle database from Linux in VM
                  Mark Malakanov (user11181920)
                  Now, I want to access ORCL database from Ubuntu. What should I install/configure for it? Is it possible?
                  Firs of all you may have to configure your Ubuntu / Oracle Virtualbox IP to communicate with the host network.
                  First, it may already work, just ping WIndows IP from Ubuntu. If it works, do `telnet <win-ip> 1521'. If it works, it means you can connect to Oracle from Ubuntu.