SecureBridges & Oracle 9i
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
SecureBridges & Oracle 9i
My environment:
Rad Studio XE4 Update1 + Mobile
ODAC 9.1.4
SecureBridge 6.1.2
Oracle9i Enterprise Edition Release 9.2.0.8.0
I try to connect to Oracle9i via SSH tunnel.
Code example:
ScFileStorage.Path := GetHomePath + PathDelim + 'Documents' + PathDelim;
ScSSHClient.HostName := 'XX.XX.XX.XX';
ScSSHClient.Port := 2224;
ScSSHChannel.DestHost := '127.0.0.1';
ScSSHChannel.SourcePort := 1520;
ScSSHChannel.DestPort := 1521;
OraSession.Server := '127.0.0.1:1520:TDB1';
if not ScSSHClient.Connected then
ScSSHClient.Connect;
if not ScSSHChannel.Connected then
ScSSHChannel.Connect;
OraSession.Open;
quOraQuery.Close;
quOraQuery.Open;
ScSSHClient and ScSSHChannel connect succesfully but when I open OraSession I get this error: ORA-03113: end-of-file on communication channel.
How can I solve this problem?
Thanks.
Daniele
Rad Studio XE4 Update1 + Mobile
ODAC 9.1.4
SecureBridge 6.1.2
Oracle9i Enterprise Edition Release 9.2.0.8.0
I try to connect to Oracle9i via SSH tunnel.
Code example:
ScFileStorage.Path := GetHomePath + PathDelim + 'Documents' + PathDelim;
ScSSHClient.HostName := 'XX.XX.XX.XX';
ScSSHClient.Port := 2224;
ScSSHChannel.DestHost := '127.0.0.1';
ScSSHChannel.SourcePort := 1520;
ScSSHChannel.DestPort := 1521;
OraSession.Server := '127.0.0.1:1520:TDB1';
if not ScSSHClient.Connected then
ScSSHClient.Connect;
if not ScSSHChannel.Connected then
ScSSHChannel.Connect;
OraSession.Open;
quOraQuery.Close;
quOraQuery.Open;
ScSSHClient and ScSSHChannel connect succesfully but when I open OraSession I get this error: ORA-03113: end-of-file on communication channel.
How can I solve this problem?
Thanks.
Daniele
Re: SecureBridges & Oracle 9i
Hello,
Please check whether you can connect to the Oracle server directly using only ODAC (without SecureBridge).
Please check whether you can connect to the Oracle server directly using only ODAC (without SecureBridge).
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
Yes, using only ODAC I can connect to the Oracle server direcly, without any problems.
Re: SecureBridges & Oracle 9i
Hello,
Please add an OnDataToClient event handler in the SSH server, in the TScSSHServer component, with the following implementation:
and provide the message text you get on an attempt to connect to the Oracle server.
Please add an OnDataToClient event handler in the SSH server, in the TScSSHServer component, with the following implementation:
Code: Select all
var
t: TBytes;
begin
SetLength(t, Buffer[1]);
Move(Buffer[9], t[0], Length(t));
ShowMessage(StringOf(t));
end;
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
The message is:
4(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=22105))
Best regards.
Daniele Buttarelli
4(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=22105))
Best regards.
Daniele Buttarelli
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
I tried to connect to another PC with Oracle9i but the same error occurs.
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
Do you have any ideas?
Thanks.
Best regards.
Thanks.
Best regards.
Re: SecureBridges & Oracle 9i
Hello,
This error can occur due to the fact that, when connecting to Oracle, the application, at first, connects to the listener, then it is redirected to a port opened by Oracle for a new connection - and the application attempts to connect via a new port and host avoiding SSH client. To solve the problem, you can disable port redirection and work on the same port with listener. For this, disable the USE_SHARED_SOCKET option on the Oracle server.
In future, we will consider the possibility to add an event on redirection for editing values of SSH client.
This error can occur due to the fact that, when connecting to Oracle, the application, at first, connects to the listener, then it is redirected to a port opened by Oracle for a new connection - and the application attempts to connect via a new port and host avoiding SSH client. To solve the problem, you can disable port redirection and work on the same port with listener. For this, disable the USE_SHARED_SOCKET option on the Oracle server.
In future, we will consider the possibility to add an event on redirection for editing values of SSH client.
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
I solved by setting USE_SHARED_SOCKET=TRUE in Windows Registry.
Now I have another problem.
I run a stored procedure, via ssh, which should take about 1 minute.
After a few seconds, however, Oracle returns error ORA-03113 (end-of-file on communication channel).
It seems to be a timeout problem.
SSHServer Timeout Settings:
ClientAliveCountMax=3
ClientAliveInterval=0
MaxStartups=20
ServerTimeout=15
SSHClient Timeout Settings:
Timeout=15
ServerAliveCountMax=3
ServerAliveInterval=0
TCPKeepAlive=True
SSHChannel Timeout Settings:
Timeout=15
How can I solve this problem?
Thanks.
Best regards.
Daniele
Now I have another problem.
I run a stored procedure, via ssh, which should take about 1 minute.
After a few seconds, however, Oracle returns error ORA-03113 (end-of-file on communication channel).
It seems to be a timeout problem.
SSHServer Timeout Settings:
ClientAliveCountMax=3
ClientAliveInterval=0
MaxStartups=20
ServerTimeout=15
SSHClient Timeout Settings:
Timeout=15
ServerAliveCountMax=3
ServerAliveInterval=0
TCPKeepAlive=True
SSHChannel Timeout Settings:
Timeout=15
How can I solve this problem?
Thanks.
Best regards.
Daniele
Re: SecureBridges & Oracle 9i
Hello,
Please check messages from the server on execution of your stored procedure using the OnDataToClient event, as it was described above.
Please check messages from the server on execution of your stored procedure using the OnDataToClient event, as it was described above.
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
I tried but nothing is displayed.
Some message dialogs (showmessage) appear but are empty.
Some message dialogs (showmessage) appear but are empty.
Re: SecureBridges & Oracle 9i
Please specify the exact version of SSH server you are using.
Do you run your application on the same machine where SSH server is running, or on another one?
Do you run your application on the same machine where SSH server is running, or on another one?
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
My SSH Server is implemented with Delphi XE2 Update4 and SecureBridge 6.1.2.
SSH Server is running on my customer's server, on the same machine where is Oracle.
I'm trying to connect to Oracle, remotely, via a SSH client application implemented using Delphi XE4 Update1, SecureBridge 6.1.2 and ODAC 9.1.4.
This client application is running on my IPAD.
SSH Server is running on my customer's server, on the same machine where is Oracle.
I'm trying to connect to Oracle, remotely, via a SSH client application implemented using Delphi XE4 Update1, SecureBridge 6.1.2 and ODAC 9.1.4.
This client application is running on my IPAD.
-
- Posts: 56
- Joined: Fri 02 Aug 2013 07:51
Re: SecureBridges & Oracle 9i
I noticed that the session in oracle has the STATUS field set to INACTIVE.
Why?
I found it with this query:
SELECT * FROM v$session WHERE PROGRAM = 'ODAC Net'
If I have a TOraQuery with FetchAll = False, during the fetch of the record, the session remains INACTIVE.
why?
Why?
I found it with this query:
SELECT * FROM v$session WHERE PROGRAM = 'ODAC Net'
If I have a TOraQuery with FetchAll = False, during the fetch of the record, the session remains INACTIVE.
why?
Re: SecureBridges & Oracle 9i
We could not reproduce the problem.
The ACTIVE value is set into the v$session.STATUS field during an SQL statement execution only. In case there is the record in the v$session view, the connection with the client application may exist, even in case the v$session.STATUS value is INACTIVE.
The ACTIVE value is set into the v$session.STATUS field during an SQL statement execution only. In case there is the record in the v$session view, the connection with the client application may exist, even in case the v$session.STATUS value is INACTIVE.