安裝ora2pg
- 安裝 perl-DBD-Pg
yum install perl-DBD-Pg - 安裝ora2pg
tar -xvf ora2pg-8.4.tar.bz2
cd ora2pg-8.4
perl Makefile.PL
make
make install
- 執行 ora2pg -h
若出現下列的結果請先安裝『perl-DBD-Pg』套件
[root@DB ora2pg-8.4]# ora2pg
Can't locate DBD/Pg.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/5.8.8/Ora2Pg.pm line 921.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Ora2Pg.pm line 921.
Compilation failed in require at /usr/local/bin/ora2pg line 27.
BEGIN failed--compilation aborted at /usr/local/bin/ora2pg line 27.
- 設定ora2pg
vim /etc/ora2pg/ora2pg.conf
資料庫連接修改內容如下:
ORACLE_HOME /opt/oracle/product/10.2.0/db_1
ORACLE_DSN dbi:Oracle:host=localhsot;sid=hccg
ORACLE_USER hccg
ORACLE_PWD xxxxx
0 意見:
張貼留言