Toad World® Forums

Connection error


#1

I’m trying the trail version of SQL Optimizer on a Windows 7 client using Oracle CClient 12 (64 bit). When I make the connection, I get the following:

SQLOpt.jpeg

I’m unable to cut/paste my sql statement into the Alternativ Detail Pane. Trying to evaluate this software package.

Thanks for any help.


#2

Since you have a 64-bit Oracle client are you using the 64-bit of SQL Optimizer?


#3

Yes, the 64 bit version.


#4

By any chance are you using the Instant Client?.Looking through some previous reports with that issue I’m seeing that there is one where the Instant Client was being used but the environment variables were not set.


#5

I am using the Instant Client. Do you know what variables and values are needed? Is see a PATH entry but no ORACLE variables.


#6

You need to set the TNS_ADMIN variable to the location of your tnsnames.ora and sqlnet.ora files.

Here is the command that I use: set TNS_ADMIN=c:\app\kstern\product\11.2.0\client_1\network\admin


#7

This is the structure under C:\Oracle

Oracle.jpeg


#8

Looks like you need to create a TNSNAMES.ORA file. Here’s a link that shows how to do it:

docs.oracle.com/…/post_install.htm


#9

If I’m using Direct and not TNS, is the TNSNAMES.ORA needed? Also, the status indicates Connected.

Oracle2.jpeg


#10

Looks like you might have the full connect string in the Host box. Try entering the information as shown below and see if that helps. Thanks!

Capture.jpeg


#11

I changed form SID to Service and I get this message.

Oracle3.jpeg


#12

Go ahead and leave that option as SID and see if that works.


#13

Using the SID, I can make a connection to the DB. I guess I don’t know where to copy the SQL I want to test. Optimize SQL | SQL Write 1 | then there are 3 tabs: SQL Details, Compare and Report. Not sure where to place the SQL to test.


#14

You just paste the SQL text into the window and then you can select on the toolbar Auto-Optimize (the far left icon) which will create rewrites and then test them, Rewrite (the blue tuning fork by itself) which just rewrites the SQL (if you want to test later or only test certain rewrites), Rewrite and Index (the tuning fork plus key icon) which performs rewrites and index recommendations as well. If you choose not to do Auto-Optimize - you can Test Run the rewrites by clicking on the icon with the runners. Hope that helps.

Capture4.jpeg


#15

That’s what I originally thought following the tutorial guide. All the icons under SQL Details are grayed out. That’s why I was thinking a connection problem.

Oracle4.jpeg


#16

The icons won’t activate until there is SQL pasted or loaded into the optimization window. Were you able to get it to work?


#17

I really don’t mean to be so dense but where is the optimization window? I see tabs for SQL Details, Compare and Report.


#18

The optimization window is the blank area - in the screenshot above it’s underneath Alternative Details.


#19

I don’t get Alternative Details under the SQL Details tab.

Oracle5.jpeg


#20

Installed on a different machine and it works fine. Sorry for wasting your time Kevin. Thanks for the help.