Connection error

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.

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

Yes, the 64 bit version.

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.

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

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

This is the structure under C:\Oracle

Oracle.jpeg

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

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

Oracle2.jpeg

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!

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

Oracle3.jpeg

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

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.

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.

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.

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

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

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

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

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