Question

I have a problem trying to conect to an Oracle database via sqlplus.

The command line looks like this:

C:\oracle\product\11.2.0\client_1>sqlplus
Error 46 initializing SQL*Plus
HTTP proxy setting has incorrect value
SP2-1502: The HTTP proxy server specified by http_proxy is not accessible

C:\oracle\product\11.2.0\client_1>http_proxy
'http_proxy' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

Acording to this blog post! it apears to complain about the value on the http_proxy variable, but this variable don't even exist in the client machine.

Anyone had this same problem over windows?


Edit:

Sorry guys. I had http_proxy set as a user variable. I was just trying to look at it the wrong way.

Wrong:

C:\Users\ilson.bolzan>http_proxy

Right:

C:\Users\ilson.bolzan>echo %http_proxy%
Was it helpful?

Solution 2

http_proxy is variable, so on Windows you must set this value

c:\>set http_proxy = whatever

unset value

c:\>set http_proxy =

IMHO U have problem with your ORACLE_SID variable or ORACLE_HOME variable. Please check this variables that are correctly filled with this command: c:\>set

OTHER TIPS

I got the same problem on Linux.

When I unsetted 'http_proxy' environment variable as

unset http_proxy
or
export http_proxy=

the problem was repeated.

I found, that 'no_proxy' environment variable spoils the case.

I had right value for http_proxy

http_proxy=http://localhost:3128/

but I had no_proxy=localhost,127.0.0.0/8,::1 too.

I've unset 'no_proxy' environment variable and sqlplus start to work as expected.

I realise that this is an old question but am adding this as I've had a similar issue a few times and keep coming back to this post, so it may help others.

In Linux, I had both "NO_PROXY" and "no_proxy" set (different case matters). I had to unset both of these, and left HTTP_PROXY populated.

The correct way to set http_proxy and so on is the following:

set http_proxy="http://<proxy_address>"

Note - the 'http://' at the start - some tools do a parsing on the variable and it might fail in case the protocol is missing at the start! The quotes are there for completeness; if you set it like this you will not have errors like SP2-1502.

<h1><u>Just Run these command .</u></h1> 
<h3>
administrator@Rizwan:~$ unset http_proxy <br>
administrator@Rizwan:~$ unset no_proxy <br>
administrator@Rizwan:~$ sqlplus sys as sysdba<br>
</h3>

Same issue happens if the proxy uses authentication, as e.g. with

HTTP_PROXY=http://domain\\user@192.168.178.1

This blocked it for me. What worked to fix it was either to unset the HTTP_PROXY variable entirely, or kick out the domain\\user@ part – i.e., based on above example, change it to:

HTTP_PROXY=http://192.168.178.1

The NO_PROXY variable however didn't disturb the process in my case.

Edit your bash script. It runs everytime you open a new terminal.

sudo nano ~/.bash_profile

set on the last line

unset no_proxy

I was under a proxy. So when I added unset http_proxy sqlplus worked but curl fucntion stopped working.

Removing https_proxy from the env file helped me.

You can use printenv to see the env variable, and unset https_proxy to remove it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top