Connect dbexpress to Oracle 10g XE

Postby Keith » Wed 15 Sep 2010 02:54

Greetings Alex,

Your last instruction ("reinstall your Oracle client") was not quite clear
to me, sorry.

If you meant reinstall the oci.dll, I have done that, and everything
behaves the same.

Here are my steps:
1) Start PL/SQL Developer: it started normally
2) remove oci.dll from the bin dir
3) verified that oci.dll was the one that was being used by attempting
to start PL/SQL Developer. PL/SQL Developer did not start
4) Copied oci.dll back into the bin dir
5) Started PL/SQL Developer: it started normally


However, if you meant reinstall the Oracle client ('SQL*Plus'), I have done
that too. When I opened the Oracle Client app, it opens as a shell window
displaying the following:

==========================
SQL*Plus: Release 10.2.0.1.0 - ...
SQL>
==========================

When I enter a known valid sql select statement:
==========================
SQL> select * from employees;
SP2-0640: Not connected
SQL>
==========================

Next, I attempted to connect:
==========================
SQL> connect
Enter uer-name: hr
Enter password: hr
ERROR:
ORA-12560: TNS:protocol adapter error
==========================

I hope this is what you wanted me to do.

Note: I have never used SQL*Plus.

Thanks, Alex,
Keith
Keith
 
Posts: 12
Joined: Tue 31 Aug 2010 18:55

Postby AlexP » Wed 22 Sep 2010 12:50

Hello,


Removal and recovery only the oci.dll file makes no sense.

Please run the OracleUniversal Installer from the Start menu ->Oracle .... ->Oracle Installation Products->Universal Installer, and click the Deinstall Products button, select Oracle Client and click the Remove button. After that install the Oracle client again and try to connect.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Postby Keith » Tue 28 Sep 2010 16:22

Greetings Alex,

I am familiar with the Oracle Universal Installer. I used it several years ago. However my version Oracle 10g XE does not install with the OUI.

Instead, my version uses the "Oracle Client 10g Express Edition - Install Wizard." (Oracle must have decided to use InstallShield.)

Here are my steps:

1) Removed Oracle 10g Express Edition
2) Received message "Uninstall Complete"
3) Shut down and restart machine
4) Verify that the Client is no longer present by attempting to run PL/SQL Developer: PL/SQL Developer does not run
5) Reinstall the Orcale Cleint, using the Oracle Client 10g Express Edition - Install Wizard. (Location: "C:\XEClient\")
6) Received message: "InstallShield Wizard Complete"
7) Shut down and restart machine
8.) Verify that the Client is present by attempting to run PL/SQL Developer: PL/SQL Developer does run
9) In my Delphi app, using the 'DevartOracleDirect' DriverName, I tried to connect with: "Owner-PC:1521:XE" and then "localhost:1521:XE" and then "127.0.0.1:1521:XE".

In all cases, I received the same Windows socket error ('requested address is not valid ...').

Alex, I must be doing something wrong.

I think I read somewhere that Devart is in Germany (or at least somewhere in Europe). I was wondering, do you have an office or representative anywhere here in the US? If so, I would be willing to fly there and take my machine to them, personally. (I don't think I could afford to fly to Germany to have someone there at Devart take a look at it.

Thank you for all your hard work Alex,

Keith
Keith
 
Posts: 12
Joined: Tue 31 Aug 2010 18:55

Postby AlexP » Thu 30 Sep 2010 11:11

Hello,

The Oracle client is not required to connect in the direct mode.
Please try connecting in "OCI" mode with the following code:

SQLConnection:= TSQLConnection.Create(nil);
SQLConnection.DriverName := 'DevartOracle';
SQLConnection.Params.Add('DataBase = XE');
SQLConnection.Params.Add('User_Name = hr');
SQLConnection.Params.Add('Password = hr');
SQLConnection.Connected:= true;
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Postby Keith » Thu 07 Oct 2010 13:37

Greetings Alex,

I tried the following:

SQLConnection:= TSQLConnection.Create(nil);
SQLConnection.DriverName := 'DevartOracle';
SQLConnection.Params.Add('DataBase = XE');
SQLConnection.Params.Add('User_Name = hr');
SQLConnection.Params.Add('Password = hr');
SQLConnection.Connected:= true;

and received the ORA-12154 exception.

Thanks,
Keith
Keith
 
Posts: 12
Joined: Tue 31 Aug 2010 18:55

Postby Keith » Thu 28 Oct 2010 13:54

Greetings Alex,

I have FINALLY discovered the answer.

It has nothing to do with DBX, specifically, nor even Delphi, generally.

It seems that Oracle 10g XE regards the parentheses as an 'invalid' character for a directory path and forbids a connection, if it finds one.

Therefore, ANY executable under the 'C:\Program Files (x86)' directory, including a running Delphi IDE, will throw an exception when it attempts to connect to Oracle 10g XE (local).

This also explains why all of the Embarcadero database tools, if installed in their default locations, will each throw an exception when attempting to connect to Oracle 10g XE.

Would Microsoft intentionally do something to break Oracle XE (local)? Hmmm ... :-D

Anyway ... I hope this answer finds its way into your Answer database.

To all you folks at DevArt, please keep up the good work.

Thank you,

Keith
Keith
 
Posts: 12
Joined: Tue 31 Aug 2010 18:55

Postby Celestejonas » Wed 21 Sep 2011 13:58

Anyway thanks for the answer and desire to help other people!! just became aware of your blog through Google, and found that it is truly informative.
Celestejonas
 
Posts: 1
Joined: Wed 21 Sep 2011 13:51
Location: 121312er

Previous

Return to dbExpress driver for Oracle