I was having a hard time trying to connect to one of my test databases. It took a lot of trial and error until I realized it was because I was using an Oracle 19c client to connect to an Oracle 11g database—and they are not compatible.
What saved me a lot of time in testing and figuring this out was installing different versions of the Oracle instant client rather than having to install the full client for each test.
Instant clients are really helpful when you don't need to install all the utilities and drivers of a full client. It's also helpful when you don't have access to run full clients on the computer you're using – for example, a contractor who is using a loaner laptop. And sometimes, like in my situation, they're just handy to have in order to quickly test compatibility between different client, database, and application versions.
Here are my steps to quickly install an instant client and connect to a database using Toad® for Oracle.
How to quickly install an Oracle Instant Client and connect to a database using Toad for Oracle
- Visit Oracle.com and search for "instant client" or click here. Download the instant client for Windows. If you’re going to be using a 64-bit version of Toad for Oracle, then you should download and install the 64-bit version of the Instant Client. If you need a 32-bit client, then download that and install 32-bit version of Toad for Oracle.
- The latest version is 19.6.0 and basic light package has all you need to connect to a database and run some queries in about a 40 megabyte zip file.
- Extract the contents of the zip file to a folder, such as C:\instantclient_19_6
- There are several ways to go about this next step and it depends on your version of Windows too. Go into Windows Start Menu or Windows Settings and search for “Environment Variables.” You can use the quick search like shown in my first screenshot. You can edit system environment variables for all users on the computer if you have administrator permissions, or you can just edit environment variables for your current user login account.
Searching from Start Menu:
Searching from Windows Settings:
For older Windows, you can right click on My Computer (or This PC), and select Properties:
Then select the Advanced tab, then Environment Variables:
- Once you get to the Environment Variables, the top half of the window are variable settings just for your Windows account and the bottom half is for everyone who uses this computer, which you may or may not have access to change. We’ll focus on the top half user variables.
In the user variables, select “Path” then click on Edit.
- Click on New, and create an entry with the directory where you extract the zip file from step 1. In my case that directory was C:\instantclient_19_6. Then move the entry to the top of the list by clicking on “Move Up”. This makes it easy for Toad to find if you have a lot of entries. It should look something like the following screenshot:
Click OK and OK again.
- Now you can launch Toad for Oracle. It should pick up your Oracle Instant Client if that's the only client you have. Enter your User / Schema, Password, then select the Direct tab and enter in Host, Port, and Service Name or SID. You should get this information from your DBA.
That should be all you need to connect most of the time. Of course, you may have extra security, firewalls, and settings like languages that you may have to set up. Run select * from dual as a test:
- Bonus steps – using a TNSNAMES.ORA file is handy if you’ve got a lot of connections to work with and don't want to manually type them in each, one by one. Place a TNSNAMES.ORA file somewhere on your computer. In my case, I’ll also put it in C:\instantclient_19_6
- Go back to the environment variables. This time, select “new” to create a new variable.
- Enter the name TNS_ADMIN and point it to the directory where your TNSNAMES.ORA file is.
Select OK and OK again.
- Now when you launch Toad for Oracle you can use the TNS tab and drop down to select your database from your TNSNAMES.ORA file. You can also select TNS Editor to modify your TNSNAMES.ORA file from Toad.
Ta-da. That's it. A light weight, quickly installed Oracle Instant Client to play around with. You can test or keep this instant client. You just won't have access to some utilities like import/export exe, tkprof, data pump, etc – but if you don’t need them, then you’re good to go.
Try Toad for Oracle now
Already in a trial? Talk to sales or buy now online.
Already a loyal fan of Toad for Oracle? Renew now.
Related Toad World posts
Technical brief: Top Five Reasons to Choose Toad Over SQL Developer
Have questions, comments?
Head over to theToad for Oracle forum on Toad World®! Chat with the me, the other Toad developers, and lots of experienced users.
Help your colleagues
If you think your colleagues would benefit from this blog, share it now on social media with the buttons located at the top of this blog post. Thanks!