georeference.org
Subscribe to this thread
Home - General / All posts - Manifold with Oracle Instant Client
chrismarx

815 post(s)
#13-Nov-08 11:23

Ok,

The instuctions i followed precisely matched with those posted here by Adam, except that some of my folder names are named differently (the names still match in the environmental variables values)

http://forum.manifold.net/forum/t37255.39

Here's the excerpt, its a long thread

Well, let's try one more time:

0. Uninstall all instances of Oracle. Do a clean reboot.

1. Download Oracle Instant Client (Basic / OCI) from this Oracle URL.

2. Create a new local folder, eg, C:\Oracle. Copy all files from the downloaded archive into that folder (so that the path to Oci.dll is C:\Oracle\Oci.dll).

3. Add the path to the created folder to the system PATH variable.

4. Delete all user and system environment variables named TNS_ADMIN. Add a system environment variable named TNS_ADMIN and point it to the created folder.

5. In the created folder, create a text file named TNSNAMES.ORA and populate it with connection data using the template below. localservice is the name you will use to refer to the connection on the connecting machine, server is the name or IP address of the database machine (if you are running Oracle on the local machine, use "127.0.0.1" or "localhost"), remoteservice is the name of the instance of Oracle on the database machine (if you have Oracle XE, use "XE").

localservice =

  (DESCRIPTION =

    (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = server)(PORT = 1521)))

    (CONNECT_DATA = (SERVICE_NAME = remoteservice))

  ) 

Restart Manifold. Try to connect to "localservice" or whatever name you used for that. Does it work?

But, I'm still getting this error from the database console:

"Can't establish connection to data source"

I'm trying to connect using the Oracle Data source, I'm running 32bit Manifold on Server 2003. I can connect to the oracle database using both sqlplus and sql developer (which is using the environmental variables, so at least something is right).

Here are the environmental variables and values I use:

Path C:\Python25\;E:\oracle;C:\Program Files\Windows Resource Kits\Tools\;C:\Program Files\Support Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; E:\oracle\bin

TNS_ADMIN E:\oracle\network\admin

SQL_PATH E:\oracle

The E:\oracle\bin folder has the oci.dll

The network/admin folder has the tnsnames.ora file in it, and both sql developer and sqlplus can connect , so I assume the connection information is correct.

The sql_path variable was created because of a suggestion on configuring sqldeveloper for use with instant client

Any ideas?

chrismarx

815 post(s)
#13-Nov-08 12:11

Couple of additional details

I downloaded the latest version of the instant client

Version 11.1.0.6.0

And in the oracle data source window, I'm using (as Adam specified), just the name of the entry in the tnsnames.ora file. here is the sample tnsnames.ora

servicename_mydb =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = mydb.ornith.cornell.edu)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = servicename.ORNITH.CORNELL.EDU)

    )

  )

volker

372 post(s)
#13-Nov-08 12:30

Are you able to do an ODBC-connection (with Manifold) to the Oracle DB ?

What`s your Server String in the Database Console ? xe ?

chrismarx

815 post(s)
#13-Nov-08 12:40

Hi haven't tried an odbc connection, I would need to add additional odbc dll's for that connection using the instant client, and its slower, so I'd like to make the OCI connection work.

I'm connecting to a oracle 10g database, the server entry is just the name of the database connection from the tnsnames.ora file, as it specifies in the help-

volker

372 post(s)
#13-Nov-08 12:59

Yes, i thought the ODBC-connection only for testing and you don`t need any dll`s

Manifold-Help:

Do not use the native Oracle ODBC driver. Use the Microsoft OLE DB Provider for ODBC and use Microsoft ODBC for Oracle. The native Oracle drivers are limited to forward-only cursors (which is by far the simplest and the lowest performance type of database cursor allowed in ODBC drivers) and thus are unusable in Manifold or many other programs, such as Microsoft Access. Future editions of Manifold will add special routines to allow use of the Oracle driver.

Works the ADO.NET Oracle Data Sources ?

chrismarx

815 post(s)
#13-Nov-08 14:06

Ok,

I'm trying the ado.net oracle data souce. What should be entered for the server? is it the name from tnsnames.ora? I tried that, and I got this error

"System.Data.OracleClient requests Oracle client software version 8.1.7 or greater"

chrismarx

815 post(s)
#13-Nov-08 14:12

adding odbc or ole db souces also resulted in errors about missing oracle client libraries. I've never tried to make these connections with only the oracle instant client installed...

volker

372 post(s)
#13-Nov-08 23:32

"System.Data.OracleClient requests Oracle client software version 8.1.7 or greater"

I found this for the error above:

it requires Oracle10g Release 2 ODAC 10.2.0.2.20 to be installed on the Application server

http://www.oracle.com/technology/software/tech/windows/odpnet/index.html

http://www.oracle.com/technology/support/patches.htm

and there is an Oracle Forum i think there you will find help

volker

372 post(s)
#13-Nov-08 23:50

About the OCI (Oracle Call Interface):

http://www.oracle.com/technology/tech/oci/index.html

volker

372 post(s)
#14-Nov-08 00:03

I found this about the Instant client:

Zur Windows-Registry unter \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE eine neue Zeichenfolge TNS_ADMIN eintragen, die auf das Verzeichnis verweist, in dem sich die tnsnames.ora befindet (z.B. "C:\oracle\network\admin").

I try to translate:

In WIN Registry under \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE put down a new sign result with TNS_ADMIN and this must must refer to the folder where the "tnsnames.ora" considers

Hope this helps...

chrismarx

815 post(s)
#14-Nov-08 00:53

thanks,

I'll look into the odac installation, but I still want to get the OCI connection working. I read about the registry key, the sites seem to indicate that setting either the registry or the environmental variable would be sufficient (i did the latter).

I think i'm just going to have to install the full client, oh well-

chrismarx

815 post(s)
#14-Nov-08 01:43

finally some good news!

I got the instant client working, and it was the stupidest of problems. Apparently, the values of oracle in the "PATH" environmental variable, have to come before all the other values. Perhaps this fact should be added to the docs (at least for win server 2003).

Edit: Also, all the connection types work now, not just the oci

chu_man_fu36 post(s)
#20-Nov-08 14:51

Finally someone else who is having Oracle manifold problems. Thanks for the info in the thread.

I got manifold 8 working with OLE but never with OCI. I will follow you instructions and give it a go.

However, when I try and link an oracle table to a drawing in manifold, the panel showing the table available takes an age to load. Have you had these same problems?

Regards

Chris

chrismarx

815 post(s)
#20-Nov-08 18:23

Well it depends, how many records are in your tables? It does take a while when i bring in a table with 1/2 million + rows, but thats to be expected i think, i mean, its gotta just take time to physically import all that data.

If you're working with spatial tables, and only need a geographical subset of the data, manifold supports bringing in a portion of the table, as long as it has a spatial index (i believe). Also, if you don't need to work with the entire table, then i just link to a query, rather than the whole table.

I've been using the instant client, it works great, I've had no other problems since i got the installation straightened out-

chu_man_fu36 post(s)
#21-Nov-08 08:27

It is the acutally listing of the tables which is taking it's time.

1) File -> Link -> Drawing

2) Select data source

3) Enter data source details (tnsname, user name, password etc..)

Now I have to wait 20 minutes+ to get just get the list of tables/views.

After this stage I can understand having to wait to get the data into Manifold and for Manifold to establish a link. I don't see why it takes so long to present me with a list of tables.

Manifold 6.5 worked like a dream .

chrismarx

815 post(s)
#21-Nov-08 08:32

hmm... so did you get the instant client working? is this 20min with the oci client? how many tables are available for browsing in your schema? i have hundreds of tables in my schema, and the listing takes only a few seconds. What version of oracle?

volker

372 post(s)
#21-Nov-08 11:33

To chu_man_fu:

1) Why not use the database console ? If you work with databases take the Enterprise Edition

and with Enterprise Edition you have direct connection to OCI, don`t take the OLE if you can

connect with the Oracle Data Source, or try for example the ADO.NET Oracle... (Read Only)

2) Database Console

3) the connection details are saved

20 minutes is to long, something must be wrong. I don`t have experiance with Oracle but with SQLServer and Postgres and it never takes longer than a minute...and if you have large drawings in this tables take the AOI-function (the greatest advantage of working with databases with huge datas) or link a part of the table with a query in database console.

0 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.