?
Solved

connecting from delphi to oracle express

Posted on 2008-10-08
16
Medium Priority
?
2,329 Views
Last Modified: 2013-12-18
I'm using delphi 2009, and downloaded the oracle express for testing.
I've downloaded and installed the two files of the oracle 10g xe version (OracleXEClient.exe, OracleXEUniv.exe)

At first it needed in order to connect to oracle the oci.dll, so I've put in the path the bin directory of the server,.
Now, Whenever I try to connect to the oracle database it raises an exception and restarts delphi,.

How do I set the environemnt in order for the process to work?
0
Comment
Question by:amitbueno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 2
16 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 22676394
How are you connecting to ORACLE? Are you using the direct oracle access component set?
0
 

Author Comment

by:amitbueno
ID: 22676412
I am connecting via dbexpress panel it uses the native connection using oci.dll
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 22676525
did you install the oracle client completely ?

can you make connection to the oracle database with a .udl file ?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:amitbueno
ID: 22676987
I've installed the client completely -- and even reinstalled it.

You'd have to explain yourself with the .udl file because I am new at this...
0
 

Author Comment

by:amitbueno
ID: 22677049
seems it doesn't crash now, yet I do not know how to create a database on oracle...
does it have to do with table naming convention DATABASENAME$TABLENAME?
it seems that all the tables reside on the same main database...
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 22677163
You might need to reference the database name before the table in any queries if you don't set your UDL file to the appropriate database.
0
 

Author Comment

by:amitbueno
ID: 22677181
How do I set a reference?
0
 

Author Comment

by:amitbueno
ID: 22677259
now I am having the following error code:
http://www.cryer.co.uk/brian/oracle/ORA12154.htm

In the tnsnames.ora it specify the below code.
I tried putting in the database XE for the database name.

didn't work also..
XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MiniCosmos)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

Open in new window

0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 22677270
hmm i haven't tried this oracle version yet

a .udl is just a file to make connection to the database with a connection string

create a new file on your desktop
new.txt
rename it to new.udl
open it
you can specify to what database you want to connect using ODBC

after this works, you know you can connect to the database.

you now have a connection string in the extended properties of the .udl file

does the install create a database for you ?
if not then you probably don't have a database.
The server install installs the engine and sometimes a sample database ...

Check the computer with the Oracle database for the service Oracle ...
and see if there is a Oracle Listener running too, otherwise no connection (unless direct)
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 22677277
you need to connect to your database with sys as sysdba account for creating a database
0
 

Author Comment

by:amitbueno
ID: 22695467
I rechecked a couple of things,. and it seems that the basic installation of the oracle XE install a sample database called "HR" as well... that is good for a test case.

Anyhow, I viewed your solution.. and it seems that you might have misunderstood me -- I do not want to connect to oracle using ODBC. I would like to use a direct connection using the delphi dbexpress and the oci.dll which is a part ofthe oracle client to connect to.
0
 

Author Comment

by:amitbueno
ID: 22719405
since the database started properly, but I couldn't access it either with delphi or visual studio.... I've downloaded the ODAC for .NET from Oracle... and installed it (hoping that this will sort the problem with the connection)

It installed a service called OracleODACHome1TNSListener -- which started a TNSListener. Yet, after installing that I couldn't access or start the database service called OracleServiceXE.

Now the question is how to start properly the database service?
0
 
LVL 38

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 23406321
since my first post, some things have changed, i got a little more experienced ...
and started using 2009.

how to make a connection to the XE database

connecting to a normal user (not sys and not system)
in D2009, open the Data explorer, open the oracle leaf, right click on the Oracle connection
click modiy connection.  Enter the user and password.  The database name is XE.
Hit test and it should work.

I haven't found how to connect with sys as sysdba yet.
But there should be a Web client to connect to XE too:
http://localhost:8080/apex
with this you can create a user and giving the DBA role and create session privilidge you can create a user which can create tables, views, etc ...
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question