1. TOAD Database Connections Problems
One of the mostcommonTOAD questionsorproblemareasiswithconnectingtoremote and/orlocal
databases.The processandrequirementsare actuallyquitesimple –yetthisremainsahighfrequency
questionthatseems tocause remarkable confusion.Andnotjustfornew Oracle or new TOADusers,as
sometimesevenoldproscanforgetand ask.Theyjustoftendo a HomerSimpson“Doh”once theyhear
the answer
Nowthere are literallydozensof scenariosthatyoumightencounter,Iamnot goingto show themall.
InsteadI’ll showyoua commonyeteasyone to understandandtroubleshoot.Thenyousimplyneedto
applyyournew “detective skills” to solve the otherscenariosyoumightruninto.Justremember,TOAD
has twomillion+users–and if we had a real connectionproblemwe’dhave heardaboutitandfixedit.
Almosteverytime yougetanunable toconnect to database error message –it’sa local PC or possibly
evena database serverlistenerconfiguration problem.I’mnotsimply tryingtopassthe buckhere.I’m
justtellingyouthatit’sthe rare exceptionandnotthe rule – connectionerrorsare mostlikelyonyour
end,soinvestigate before justsayingTOAD’sbroken.
The most commonscenariowe run intoisthat people say“Ican connect withOracle SQL*Plusonmy PC
and TOADgivesan Oracle error – so TOAD doesnotworkfor me or my very special conditions.Sohere’s
a screensnapshotof SQL*Plusworkingonmy WindowsXPPC.
2. OK – so SQL*Plusworkson myPC. Nowlookat thisscreensnapshot – same PC yetTOAD won’tconnect.
So let’ssee whatIdidto get thiswonderful Oracle errorORA-12154 (justone of the three to fourerror
messagesyou’re likelytosee whileyourSQL*Netenvironmentorconfigurationisnotright).Lookat the
firstthree solidarrows– I gave the correct user ID andpassword,plusthe correct Oracle SID or instance
ID. So whydidI getthisdatabase connectionerror?Lookat the crossed,fattererrorsnearthe bottom
righthand corner– these are youclues.
I have instructedTOADto use the Oracle 11g clientonmy PC,and the red “X” nextto the “TNSNames
Editor”button indicatesthatthere isno TNSNames.orafile.OK –buy thenwhydidSQL*Pluswork?Look
againback at the firstscreensnapshot. ItappearsthatI have runSQL*Plusfrom Oracle 10g somehow?If
I thendo a righthand mouse on“MY Computer”on mydesktopandchoose properties,the Windows
“SystemProperties”window will pop-up. Now if I nextchoose the “Advanced”taband thenpressthe
“EnvironmentVariables”button,the window inthe nextscreensnapshotcomesup.Ifinallydouble click
the “PATH” so I can reviewandpossiblyeditmyPATHenvironmentvariable –because here’swhere the
problemlies.Lookatthe screena momentbefore readingon.
3. OK – my environmenthasthe Oracle 10g home firstinmyPATH order.So whenI runSQL*Plusit starts
the binary from Oracle 10g andby defaultlooksforthe TNSNames.orafile underthe same home –so it
worksbecause there isa TNSNames.orafilethere.We know thatforsure because asthisnextand final
screensnapshotfromTOADshows,whenIuse the Oracle 10G home the red “X” turns to a green-> and
the “TNSNamesEditor”buttonindicatesthatthere isa validTNSNames.orafile. Thisattempttoconnect
usingTOADworks – and worksjustfine.
4. So the keylessonorconclusiontotake away fromthisblogisas follows:TOADcan connectto Oracle
databasesandit works99.99% of the time.If youhave a problemandgetsome Oracle connectionerror
message,oddsare that youhave one of the followingproblems:abadSQL*netinstall,are pointingto
the wrong Oracle Home,have a WindowsPATHenvironmentorderingproblem, orsome otheruser
setupandconfigurationproblemrelatedtoyourWindowsand/orOracle home.
So please applythistype of investigativeprocessandthinkinganytime thatyoucannotconnectto your
database withTOAD.TOAD couldneverhave achievedsuchhuge adoptionandsuccessif itcouldnot
connectto peoples’databases.Thusthe problemismostlikelysome minorlittlethingspecifictoyour
PC.Because inthe lasttenyearsI can counton one hand the real database connectionproblemsthat
people have runinto. It’sthatrare.