Categories
Oracle Tips

TNS Protocol Adapter Error in Oracle

I like to spend time with Oracle DB just as much time I spend with SQL Server, but we exclusively use SQL Server at our work so I am not getting enough time with Oracle anymore. And another reason is it with Oracle there are way too many variable to consider when you are troubleshooting something. So when couple of days back when I boot up my VM of Oracle, I ran into this strange error and I was genuinely surprised to find how minute the cause could be.

So, this how the story goes …. after booting my VM, I started SQL PLUS utility (it is kind of SQLCMD equivalent of SQL Server, it is CLI to access Oracle DB to be exact). When I was asked to provide login credentials, when I provided ‘em I was greeted with following error message,

ERROR:

ORA-12560:  TNS: protocol adapter error

 

Oracle_11g_error

Categories
Database How To Oracle Tips Windows

Oracle 11g R2 and Windows 7 … dealing with Enterprise Manager Troubles

So, this weekend I thought to refresh my experience with Oracle. And in that attempt, I decided to install latest of Oracle DBMS family, Oracle 11g. Now, it’s been a while since I used oracle, it was version 10g. And they have been significantly improved in version 11g, so I wanted to try them. But I think something that have not changed or may be will never change is their web interface for EM (a.k.a. Enterprise Manager). If you have not used Oracle before then for info, EM is basically their central management console for installed Oracle instance.

Now if you are installing Oracle DBMS in a system which as “Static” IP (think of it as an IP that doesn’t change with time), then you have no problem at all. But if you are like me and installing in a machine which has DHCP enabled, and its IP gets changed frequently … or just say it is your laptop or desktop at home network, then you will not be able to access this EM after sometime. The reason is, It is sticked with your IP that it assumes is static !! So, you will get  “Page Not Found” message when you will try to access EM, once your IP gets changed. And worse thing is in Oracle 10g, before installation the UI (Universal Installer) checks for pre-requisites and it warns you about having DHCP enabled but in Oracle 11g you will not see anything like that.

So, back to my experience. I installed Oracle 11g R2 as usual, and I fired up the EM. It worked just fine at first, but after sometime when I tried to run it again I was greeted with same old message “Page Not Found”. And I almost smashed my laptop smile_teeth (I know, sometimes I over react to things) … then I realized then I forgot the most important step of preparation, Installation of Microsoft Loopback Adapter !!

Installing Microsoft Loopback Adapter

Things look very different in Windows 7, so it was a bit difficult to find “ADD Hardware Wizard” to add an adapter. Then I found that I can run it using “hdwwiz.exe” and after that it is same as we used to with older windows versions. Following are screenshots of whole installation and configuration procedure.