问题描述
在Orafce中提到 Install.orafunc
:
As mention in Orafce Install.orafunc
:
- .. install Orafce函数,请使用pgAdmin SQL工具运行orafce.sql脚本。.
我尝试运行orafce--3.0 pgAdmin sql编辑器中的.sql。这给了我错误
错误:无法访问文件 MODULE_PATHNAME:没有这样的文件或目录。
I tried running the orafce--3.0.sql in pgAdmin sql editor. This give me errorERROR: could not access file "MODULE_PATHNAME": No such file or directory.
模块路径是什么意思?
已安装程序:
strawberry perl with DBD::Oracle
postgresql 9.3
pgAdmin III
未完全安装:
ora2pg
我尝试安装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.
建议的解决方案:
我从下载了一份orafce的副本
将文件解压缩到文件夹 D:/ Postgresql / orafce-master
I downloaded a copy of orafce from okbob githubUnzip the file to folder D:/Postgresql/orafce-master
我仅复制 以下文件
orafce--未包装--3.0.6.sql
orafce--unpackaged--3.0.6.sql
orafce--3.0.6.sql
orafce--3.0.6.sql
orafce.control
orafce.control
到文件夹 C:\Program Files\PostgreSQL\9.3 \share\扩展名
然后我尝试在pgAdmin III sql工具中运行此命令。
Then I try running this command in pgAdmin III sql tools.
创建扩展orafce;
我收到此警告和错误。
[警告]创建扩展orafce
错误:文件 C:/ Program Files / PostgreSQL / 9.3 / share / extension / orafce.control中的语法错误第1行,靠近行尾
我检查了 orafce.control
c专心。它具有此配置。
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?
推荐答案
因此,您正在处理源原始文件。您应该先编译这些文件-然后再使用它。它相对简单,在通常使用C编译器的Unix之类的平台上,而在MS Windows(要先安装C编译器)上则相当困难。
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.
恐怕我们会丢失pgFoundry归档文件,而该文件是由orafce预编译和打包的。
I afraid so we lost pgFoundry archive, where was orafce precompiled and packed.
几乎所有Linux发行版都支持直接使用orafce-您可以安装它而无需从存储库进行编译。
Almost all Linux distributions support orafce directly - and you can install it without compilation from repositories.
请参见
$ libdir是符号,用于PostgreSQL扩展目录。对于任何平台,它都可以不同-在编译阶段,它会被实际值替换。 MODULE_PATHNAME具有相似的含义。在编译阶段,使用已编译的代码替换为有效的库实际实际路径。
$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.
很抱歉-我们不提供已编译文件-主要是由于MS Windows的高风险。我们没有力量和工具来安全地维护所有Win。在这一刻,您可以:
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:
- 尝试联系使用orafce Windows备份orafce安装程序的人
- 尝试自行编译此扩展名(Microsoft Visual Studio Express版本是免费的,可以在Internet上下载)。
- 另一种可能性是将数据库服务器迁移到Linux-几乎所有数据库维护和那里的使用更简单,更可靠(由于缺少病毒,防病毒和更少的资源请求)。 Linux也是Oracle的主要平台。
一些教程:
- http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/
- http://www.scribd.com/doc/40725510/Build-PostgreSQL-C-Functions-on-Windows
这篇关于在Windows 7中安装Orafce.sql 3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!