Charlesliam
Charlesliam

Reputation: 1313

Installing Orafce.sql 3.0 in Windows 7

As mention in Orafce Install.orafunc:

I tried running the orafce--3.0.sql in pgAdmin sql editor. This give me error ERROR: could not access file "MODULE_PATHNAME": No such file or directory.

What do you mean by module path?

Installed program:

strawberry perl with DBD::Oracle

postgresql 9.3

pgAdmin III

Not fully installed:

ora2pg

I tried installing ora2pg...with a problem.

H:\PostgreSQL\ora2pg-12.1>perl makefile.pl
Unparsable version '' for prerequisite DBD::Oracle at makefile.pl line 553
Generating a dmake-style Makefile
Writing Makefile for Ora2Pg
Writing MYMETA.yml and MYMETA.json
Done...

H:\PostgreSQL\ora2pg-12.1>dmake && dmake install
"Installing default configuration file (ora2pg_dist.conf) to C:\ora2pg"
Appending installation info to C:\strawberry\perl\lib/perllocal.pod
dmake:  Warning: -- Target [install] was made but the time stamp has not been up
dated.

Suggested Solution:

I downloaded a copy of orafce from okbob github Unzip the file to folder D:/Postgresql/orafce-master

I copy only the following files

orafce--unpackaged--3.0.6.sql

orafce--3.0.6.sql

orafce.control

to folder C:\Program Files\PostgreSQL\9.3\share\extension

Then I try running this command in pgAdmin III sql tools.

CREATE EXTENSION orafce;

I received this Warning and Error.

[WARNING ] CREATE EXTENSION orafce ERROR: syntax error in file "C:/Program Files/PostgreSQL/9.3/share/extension/orafce.control" line 1, near end of line

I checked orafce.control content. It has this config.

# intarray extension
comment = 'Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS'
default_version = '3.0.6'
module_pathname = '$libdir/orafunc'
relocatable = false`

I can't pass to this wall. What seems the problem?

Upvotes: 0

Views: 3283

Answers (1)

Pavel Stehule
Pavel Stehule

Reputation: 45795

So, you are working with source raw files. You should to compile these files first - and later you can use it. It is relative simply on Unix like platforms, where C compiler is usually available, and pretty hard on MS Windows, where you have to install C compiler first.

I afraid so we lost pgFoundry archive, where was orafce precompiled and packed.

Almost all Linux distributions support orafce directly - and you can install it without compilation from repositories.

see http://wiki.postgresql.org/wiki/Building_and_Installing_PostgreSQL_Extension_Modules

$libdir is symbol, that is used for PostgreSQL extensions directory. It can be different for any platform - and it is replaced inside compilation stage by actual value. MODULE_PATHNAME has similar meaning. In compilation stage is replaced by valid actual path to library with compiled code.

I am sorry - we don't provide a compiled files - mainly due high risk for MS Windows. We have no forces, and tools to maintain all Win safely. In this moment, you can:

  • try to contact someone who use orafce for windows for backup of orafce installers
  • try to compile this extension by self (Microsoft Visual Studio Express edition is free and downloadable on internet).
  • other possibility is migrate database server to Linux - almost all database maintenance and usage is more simply and more robust there (due missing viruses, antiviruses and less resource requests). The Linux is primary platform for Oracle too.

some tutorials:

Upvotes: 1

Related Questions