Friday, January 30, 2009

Installing oracle 10g database on parallels desktop

Recently, I switched to Mac from Windows machine. I had a challenge to make Mac development environment as similar to Windows development environment. Being a java developer I usually use Oracle database. So I tried to install it first on my mac, then I found somehow that Oracle does not support my mac version. Then I had to install Parallels Desktop to make it work.
I proceeded this way

1. Install Parallels Desktop, You can find how to do it on parallels support center.

2. Install Oracle 10g database on Parallels Desktop, It is smooth, so no problem.

3. Steps to install InstantClient and Sqlplus package on mac to access Parallel's oracle DB.

4. Download InstantClient and SqlPlus packages from Oracle download site.

5. Extract these two packages to a single directory like I chose /Applications/OracleClient

6. Copy tnsnames.ora file from parallels oracle installation to the Mac's /Applications/OracleClient directory you chose for installing InstantClient and SqlPlus.

7. Modify your .bash_profile to indicate these entries

PATH=/Applications/OracleClient:${PATH}
export PATH
ORACLE_HOME=/Applications/OracleClient
export ORACLE_HOME
DYLD_LIBRARY_PATH=/Applications/OracleClient
export DYLD_LIBRARY_PATH
TNS_ADMIN=/Applications/OracleClient
export TNS_ADMIN

8. Check for the IP of the Parallel's Desktop machine and note it.

9. Check for the IP of the Mac machine and note it.

10. open vi editor and edit /etc/hosts file for Mac machine to reflect the IP obtained from parallels desktop machine(Step 7)

192.168.128.82 ahsan-javed.mydomain.com
(Note:ahsan-javed.mydomain.com is the machine name that was given in my office network.)

11. open notepad and edit C:/Windows/System32/drivers/etc/hosts file for Parallels Desktop to reflect the IP obtained from Mac machine (step 8)

192.168.128.132 ahsanjaved
(Note: ahsanjaved is the machine name I assigned to parallels desktop while installing Windows XP on it.)

12. Go to Windows Control Center and disable firewall/enable 1521,1158 and 5506 ports for communication between Parallels Oracle and Mac machine.

13. Now go to shell and type sqlplus. it should ask you for username and password. Here you go connected.

Sphere: Related Content

0 comments: